[Ffmpeg-devel-irc] ffmpeg.log.20161015

burek burek021 at gmail.com
Sun Oct 16 03:05:01 EEST 2016


[00:14:53 CEST] <kittyfoots> So it seems that avcodec_encode_video2 is deprecated but the documentation doesn't really give guidance as to what to use in its place, the latest git snapshot has the encode/decode sample code using avcodec_encode_video2 still.  What is the correct api function moving forward?
[01:55:01 CEST] <MrMonkey31> hey
[01:55:52 CEST] <MrMonkey31> guys, what's the command to start encoding at frame x?  I know how to just cut off at a frame before the end of the file already
[01:59:51 CEST] <kepstin> MrMonkey31: you have to use the trim filter, e.g. -vf trim=start_frame=42
[02:03:23 CEST] <MrMonkey31> thx kepstin, I see.  next q: can ffmpeg choose to concentrate bits?  I'd like to achieve the bitrate I specified with -v:b overall but with specific ranges getting fewer of the bits, like 60 second ranges
[02:03:59 CEST] <kepstin> MrMonkey31: usually you'll want to use a 2-pass encode, so the encoder can decide for itself how to allocate bits over the video
[02:04:27 CEST] <kepstin> I don't think there's any interface in ffmpeg to do that, although you can do it if you e.g. use x264 directly :/
[02:04:45 CEST] <kepstin> but yeah, just do a 2-pass encode unless you really need something different
[02:06:21 CEST] <MrMonkey31> kepstin: you seem to know about it so I'll take your word for it.  I was hoping to avoid splitting up the videos, but I guess I could write a script that uses that trim feature to separate the streams first
[02:06:51 CEST] <kepstin> why do you need to manually allocate bitrate?
[02:07:14 CEST] <MrMonkey31> I just don't care about certain segments, already know which segments
[02:07:37 CEST] <MrMonkey31> I could just order them to be converted to a blank frame
[02:07:54 CEST] <MrMonkey31> that will preserve my frame count
[02:10:41 CEST] <MrMonkey31> alright, thx for the tips!
[03:50:00 CEST] <ossifrage> I'm grepping on the ffmpeg source and I can't seem to find where '-vf drawtext' is implemented?
[03:52:14 CEST] <ossifrage> [ah my tree didn't have libavfilter]
[07:25:53 CEST] <kode54> huh
[07:27:52 CEST] <kode54> why can Handbrake stuff dvd_subtitle into MP4, but ffmpeg cannot?
[09:51:42 CEST] <newuser123> hello. Am joining two '.vob' files using this command:  ffmpeg -i "concat:in1.VOB|in2.VOB" -f mpeg -c copy output.vob
[09:52:10 CEST] <newuser123> i get the proper Video, but there is no output. Any help would be appreciated.
[09:52:33 CEST] <newuser123> i get the proper Video, but there is NO AUDIO in the output. Any help would be appreciated.
[10:23:21 CEST] <newuser123> hello. Am joining two '.vob' files using this command:  ffmpeg -i "concat:in1.VOB|in2.VOB" -f mpeg -c copy output.vob
[10:23:48 CEST] <newuser123> i get the Output which got Video but no Audio. Any suggestions please......
[10:29:19 CEST] <relaxed> newuser123: -f vob
[10:30:04 CEST] <newuser123> relaxed, oh right, let me try that.
[10:32:49 CEST] <newuser123> relaxed, thanks ! it worked !!
[10:53:26 CEST] <relaxed> \o/
[13:54:57 CEST] <kuse> Is it possible to capture a frame ,providing percentage of video and not an exact time?
[13:55:42 CEST] <BtbN> no
[13:56:29 CEST] <BtbN> Unless you do that calculation yourself, of course. If you know the precise length
[13:58:32 CEST] <kuse> ok thanks
[15:49:24 CEST] <Phi> Heyo folks
[15:49:42 CEST] <Phi> can anyone help me with passing options to libx264 encoder
[15:49:45 CEST] <Phi> C++, not commandline
[15:51:12 CEST] <JEEB> the libx264 avcodec wrapper or libx264 itself?
[15:51:30 CEST] <Phi> the wrapper
[15:51:34 CEST] <Phi> passing vprofile/profile options to avio_open2 seem to get ignored
[15:52:59 CEST] <JEEB> avio sounds like avformat stuff :P
[15:53:34 CEST] <Phi> I'm new to the whole thing so I sort of glued stuff together
[15:53:42 CEST] <JEEB> anyways, av_dict_set on the avcodec context's matching thing
[15:54:33 CEST] <JEEB> it's used in the demuxing/decoding example f.ex.
[15:55:23 CEST] <Phi> I'll give it another shot
[15:55:39 CEST] <Phi> av_dict_set what am I passing as the dictionary?
[15:56:25 CEST] <Phi> or did you mean av_opt_set?
[16:02:18 CEST] <JEEB> Phi: related example http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/demuxing_decoding.c;h=49fb6afae13dd0c2e1c2f4135599c28006e7ec7e;hb=HEAD#l150
[16:02:30 CEST] <JEEB> for you the avcodec context would of course be an encoder
[16:03:45 CEST] <Phi> The odd thing is, avcodec_is_open is always false for the encoder context
[16:03:48 CEST] <Phi> even if a video file is produced
[16:05:31 CEST] <Phi> and if I do call avcodec_open2 on the encoder context, I get error -1
[16:08:38 CEST] <Phi> I have the code in a question here
[16:08:39 CEST] <Phi> http://stackoverflow.com/questions/40053873/ffmpeg-rtsp-stream-to-mpeg4-h264-file-using-libx264
[16:09:21 CEST] <Phi> I need to be able to receive RTSP, encode it into an MP4, and display frames as they come
[16:09:33 CEST] <Phi> the output MP4s don't play properly, but it does produce some
[16:22:10 CEST] <NapoleonWils0n> hi all
[16:22:18 CEST] <Phi> yo
[16:22:49 CEST] <NapoleonWils0n> is there a way to work out the correct bitstream filter for a particular stream
[16:23:36 CEST] <NapoleonWils0n> at the moment im manually testing streams and then going thru the possible combinations of bitstream filters
[16:25:27 CEST] <NapoleonWils0n> cat always tell if an aac atream requires -bsf:a aac_adtstoasc or you can just -c:a copy
[16:26:47 CEST] <NapoleonWils0n> thinking of either detecting the codecs used in the stream and then using the approiate bit stream filters or going thru the different options checking for errors
[16:33:15 CEST] <c_14> NapoleonWils0n: if you use a recent ffmpeg (might only be in git) bitstream filters should be automatic
[16:34:48 CEST] <NapoleonWils0n> c_14 really im running 3.1.4
[16:34:59 CEST] <NapoleonWils0n> this is my script
[16:35:01 CEST] <NapoleonWils0n> https://github.com/NapoleonWils0n/kodi-playercorefactory/blob/master/bash-scripts/rip-record
[16:35:33 CEST] <NapoleonWils0n> c_14 so ffmpeg should detect the correct bitstream filters for a stream
[16:36:05 CEST] <NapoleonWils0n> even if us -c:a -c:v it will switch to using the correct bitsrteam filter
[16:37:58 CEST] <BtbN> I don't think there is a release with the auto bsf yet.
[16:38:29 CEST] <NapoleonWils0n> right ill keep a look out for the new release thanks guys
[16:38:52 CEST] <BtbN> just use latest git master.
[16:38:58 CEST] <NapoleonWils0n> is there any documentation about the auto bitstream filters
[16:38:59 CEST] <BtbN> releases are mostly meaningless anyway
[16:39:07 CEST] <BtbN> you don't do anything, and it works.
[16:39:22 CEST] <NapoleonWils0n> i like the sound of that
[16:39:49 CEST] <Phi> I tried what you said JEEB, but that documentation is out of date
[16:39:54 CEST] <NapoleonWils0n> but if i specify -c:a -c:v it will override it with the correct bitstream filter
[16:40:00 CEST] <Phi> can't find codecpar
[16:40:07 CEST] <BtbN> a codec is not a bsf.
[16:40:39 CEST] <Phi> I tried passing av_opt_set(codecCtx, "profile", "main", 0) but it ignores me and uses high
[16:41:27 CEST] <furq> why are you using printf "%s\n" 'string' instead of echo "string"
[16:41:55 CEST] <NapoleonWils0n> line endings, printf is also faster i believe
[16:42:06 CEST] <furq> echo already adds a newline
[16:42:41 CEST] <NapoleonWils0n> im not using line endings is some situations
[16:43:03 CEST] <furq> echo -n
[16:43:35 CEST] <NapoleonWils0n> im not really worried about printf vs echo
[16:43:50 CEST] <furq> it sounds like i care more about echo than i actually do
[16:43:58 CEST] <NapoleonWils0n> mor interested in getting the right combination of bitstream filters and codecs
[16:43:59 CEST] <furq> i was wondering if echo didn't work for some reason
[16:44:33 CEST] <NapoleonWils0n> furq bit like vim vs emacs and mac vs pc
[16:44:53 CEST] <NapoleonWils0n> also the scripts have to work on windows, linux and mac
[16:44:58 CEST] <furq> well no because emacs and mac users are just wrong
[16:45:16 CEST] <NapoleonWils0n> yes furq with you on that one mate
[16:45:18 CEST] <furq> portability seems like a more reasonable reason
[16:45:39 CEST] <NapoleonWils0n> ill go with that excuse then :)
[16:46:03 CEST] <NapoleonWils0n> scripts take a url and chop it up and create the correct ffmpeg command
[16:46:10 CEST] <furq> although if you want it to be portable then you should use #! /usr/bin/env bash
[16:46:46 CEST] <NapoleonWils0n> i have it working on all versions of windows, mac and linux which wasnt easy
[16:46:53 CEST] <furq> or /bin/sh but it looks like you're actually using bash features
[16:47:41 CEST] <NapoleonWils0n> yes im using bash pattern matching in a case statement to switch on various urls
[16:47:53 CEST] <furq> well yeah there's no /bin/bash on the BSDs
[16:47:59 CEST] <furq> and probably other unixes
[16:48:14 CEST] <NapoleonWils0n> furq the scripts work on openbsd as well
[16:48:21 CEST] <BtbN> furq, "echo -n" is bash. in a plain posix shell it would print a "-n something"
[16:48:38 CEST] <BtbN> The print method works
[16:48:56 CEST] <NapoleonWils0n> apart from the printf vs echo debate any suggestions for improvements
[16:49:14 CEST] <NapoleonWils0n> always open to feedback however brutal
[16:50:16 CEST] <NapoleonWils0n> so when the auto bitstream filters is "released" i can just use -c:a copy -c:v copy
[16:50:31 CEST] <furq> echo -n works in every /bin/sh i have here
[16:50:33 CEST] <NapoleonWils0n> and not add the bitstream filters to the ffmpeg commands
[16:50:53 CEST] <furq> also this is a bash script anyway
[16:51:27 CEST] <NapoleonWils0n> ok mess of code that happens to be in a text file might be a better description
[16:51:50 CEST] <NapoleonWils0n> but it does actually work believe ot or not
[16:52:04 CEST] <NapoleonWils0n> https://www.youtube.com/channel/UCriRR_CzOny-akXyk1R-oDQ
[16:52:20 CEST] <NapoleonWils0n> youtube channel accompanying the scripts
[16:55:24 CEST] <NapoleonWils0n> cant seem to find any documentation of the auto bitstream filters, im sure it will come soon
[17:01:41 CEST] <NapoleonWils0n> in the ffmpeg examples they use printf just saying
[17:02:38 CEST] <furq> i feel like i've cast myself as some kind of echo enthusiast here
[17:02:51 CEST] <furq> i just figured maybe there was an interesting reason why echo didn't work
[17:03:19 CEST] <NapoleonWils0n> i got told in no uncertain terms on other irc channels to use printf
[17:04:04 CEST] <NapoleonWils0n> furq thanks for the heads up on the auto bitstream filters
[17:04:13 CEST] <furq> that wasn't me
[17:04:29 CEST] <furq> i haven't told you anything useful about ffmpeg
[17:04:48 CEST] <SchrodingersScat> furq: you taught me everything without saying a word
[17:05:01 CEST] <NapoleonWils0n> lol
[17:05:37 CEST] <NapoleonWils0n> been using the ffmpeg reconnect option which seems to work
[17:07:44 CEST] <SchrodingersScat> to rip stuff on kodi?
[17:08:09 CEST] <NapoleonWils0n> yes ripping stuff from kodi, can also multicast stream and schedule recordings
[17:09:09 CEST] <NapoleonWils0n> main page of git repo:
[17:09:11 CEST] <NapoleonWils0n> https://github.com/NapoleonWils0n/kodi-playercorefactory
[17:12:23 CEST] <SchrodingersScat> NapoleonWils0n: this is my equivalent, https://github.com/SchroSct/stream-creep
[17:13:18 CEST] <NapoleonWils0n> much better name, i went with descriptive name
[17:13:19 CEST] <furq> that readme becomes more interesting at the end
[17:14:43 CEST] <NapoleonWils0n> SchrodingersScat nice work ill go thru your code
[17:14:55 CEST] <SchrodingersScat> yours looks much more professional
[17:15:34 CEST] <NapoleonWils0n> thanks mate - writing all the docs did take a while
[17:15:51 CEST] <NapoleonWils0n> got more info in the docs section
[17:15:53 CEST] <NapoleonWils0n> https://github.com/NapoleonWils0n/kodi-playercorefactory/tree/master/docs
[17:16:26 CEST] <NapoleonWils0n> figured out a way to send ffmpeg commands over ssh and escape special characters like &? etc
[17:16:38 CEST] <NapoleonWils0n> https://github.com/NapoleonWils0n/kodi-playercorefactory/blob/master/bash-scripts/rip-ssh
[17:16:49 CEST] <NapoleonWils0n> using printf furq
[17:18:28 CEST] <NapoleonWils0n> SchrodingersScat nice use of netcat mate
[17:19:34 CEST] <SchrodingersScat> NapoleonWils0n: yeah, didn't want to use rtmpdump while it was live, I catch the stream with tcpflow first
[17:20:10 CEST] <NapoleonWils0n> i have a little script to extract http links from pcap files
[17:20:12 CEST] <NapoleonWils0n> https://github.com/NapoleonWils0n/kodi-playercorefactory/blob/master/bash-scripts/pcap-link-extractor
[17:20:55 CEST] <NapoleonWils0n> what i do is tcpdump open kodi and capture all the links into a pcap file and then extract them with tshark
[17:21:27 CEST] <SchrodingersScat> ah, k, that's the cli wireshark
[17:21:29 CEST] <NapoleonWils0n> i tend to use iptables and rtmpsrv
[17:21:50 CEST] <NapoleonWils0n> you can use the same wireshark filters with tshark
[17:22:23 CEST] <NapoleonWils0n> much easier than scrolling thru wireshark window
[17:23:03 CEST] <NapoleonWils0n> oh and you shoudnt run wireshark as root, add your self to the wireshark group and reboot
[17:39:58 CEST] <NapoleonWils0n> time for an egg sandwich and cup of tea
[18:56:03 CEST] <ChocolateArmpits> Does anyone know the reason for the dual mono setting for ebu r128 related filters ? The description is vague in defining the sound perception and I can't find more.
[19:15:24 CEST] <Phi> I still can't get it to change the x264 profile option
[19:17:24 CEST] <ChocolateArmpits> Phi: What's the issue?
[19:19:14 CEST] <Phi> I can't find a working option to change the profile
[19:19:25 CEST] <ChocolateArmpits> What about -vprofile ?
[19:19:33 CEST] <Phi> vprofile doesn't work
[19:19:42 CEST] <Phi> to clarify, I'm doing it in C++, not commandline
[19:20:00 CEST] <ChocolateArmpits> But you can pass cli commands to be interpreted, no ?
[19:20:47 CEST] <ChocolateArmpits> I remember reading about the api and such option was presented
[19:23:46 CEST] <Phi> supposedly
[19:23:54 CEST] <Phi> but it's not working
[21:10:33 CEST] <hseg> Hi. I'm trying to concatenate clips from some mkv files, and it seems that ffmpeg is extracting .5s more from each input video I list.
[21:11:58 CEST] <hseg> Specifically, with options -ss '01:05.500' -t '00:07.000', I get some data from beyond the 01:12 mark, but changing to -t '00:06.500' makes it stop before that mark.
[21:12:04 CEST] <hseg> Any ideas why?
[21:12:41 CEST] <hseg> (Hypothesis I'm pursuing atm: ffmpeg is rounding towards keyframes)
[21:25:01 CEST] <hseg> Hypothesis falsified by noting that the two keyframes surrounding my expected endpoint do not match the last image seen from the source video.
[23:50:42 CEST] <Ana_> Hello, I was wondering if someone could help me out: http://pastebin.com/vL8YgdCk
[23:55:53 CEST] <SchrodingersScat> tldr: why would file size double when going from mkv to mp4
[23:56:25 CEST] <kerio> *when reencoding a video repeatedly
[23:56:31 CEST] <kerio> good god
[23:56:54 CEST] <kerio> Ana_: ffmpeg -i foo.mkv -c:v copy -c:a copy bar.mp4
[23:57:55 CEST] <DHE> or just: ffmpeg -i input.mkv -c copy output.mp4
[23:58:04 CEST] <kerio> i like to be explicit :v
[23:58:09 CEST] <kerio> but ye
[23:58:23 CEST] <SchrodingersScat> -codec copy
[23:58:25 CEST] <DHE> typically, but if you're copying both...
[23:58:27 CEST] <kerio> DHE: will that copy every stream, or will it just do first video and first audio
[23:58:31 CEST] <kerio> ?
[23:58:37 CEST] <SchrodingersScat> triggered
[23:58:42 CEST] <kerio> i'm not even sure if mp4 can do multiple videos
[23:59:26 CEST] <SchrodingersScat> Ana_: did any of that help?
[23:59:27 CEST] <DHE> I can't remember how ffmpeg handles defaults. there's a -map parameter to force selection of streams for bringing into the output
[23:59:49 CEST] <c_14> It'll select 1 video, 1 audio and 1 subtitle stream
[23:59:51 CEST] <DHE> I thought the default was one of each type into the output unless overridden with -map
[23:59:57 CEST] <c_14> According to internal parameters as to which is "best"
[00:00:00 CEST] --- Sun Oct 16 2016


More information about the Ffmpeg-devel-irc mailing list