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

burek burek021 at gmail.com
Sat Feb 18 02:05:02 CET 2012


[00:01] <burzum> something else im not sure about is how to create an mp3 with dynamic bitrate using ffmpeg, any hints?
[00:02] <Mavrik> um, I think you have to use -aq instead of -ab
[00:02] <burzum> also whats the difference between mp3lame and the regular mp3 implementation in ffmpeg?
[00:02] <Mavrik> so use a "quality factor" instead of bitrate
[00:02] <burzum> -aq works for vorbis but not mp3, the file came out as 192kbps file
[00:02] <Mavrik> burzum, hmmm... afaik libmp3lame is the only way to encode mp3 in ffmpeg
[00:02] <Mavrik> the other one is just a decoder
[00:02] <burzum> Mavrik but im ending up with a mp3 file that plays
[00:03] <Mavrik> burzum, ah... you'll have to check on google for "ffmpeg libmp3lame vbr" then, I don't use that particular encoder
[00:03] <Mavrik> yeah, because libmp3lame encodes it.
[00:03] <Mavrik> check the mapping at the end of output
[00:03] <burzum> $params = "-i $in -ab 320k -ar 44100 -f mp3 $out";
[00:03] <Mavrik> -f sets container format, not the codec
[00:03] <burzum>     [12] =>     Stream #0.0: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 320 kb/s
[00:04] <burzum> oh my fault
[00:04] <burzum> --enable-libmp3lame
[00:05] <burzum> i missed it the first time i was looking for it
[00:05] <Mavrik> that's just a parameter with which ffmpeg has been compiled, has nothing to do with that you're currently encoding
[00:08] <VooDooNOFX_> why does ffmpeg insist on outputting via stderr instead of stdout?
[00:09] <sacarasc> To annoy you!
[00:09] <VooDooNOFX_> heh, no kidding!
[00:09] <relaxed> so you can pipe the output
[00:10] <relaxed> you can redirect stderr with 2>ffmpeg.log
[00:12] <VooDooNOFX_> yeah, it's just more annoying when video encoding process and ffmpeg headers are both on the same output.
[00:13] <relaxed> I don't follow
[00:13] <VooDooNOFX_> while encoding a video, you get the configuration information printed out everytime
[00:13] <VooDooNOFX_> I know I can do -v quiet, but then I don't even get error messages
[00:15] <VooDooNOFX_> i'm using ffprobe -print_format json to grab frame and stream information out of a file
[00:15] <relaxed> and?
[00:16] <VooDooNOFX_> if I run it with a bad command, or on a file that doesn't exist, or anything goes wrong, I get an empty {} string instead of a useful error message when also using the -v quiet flag
[00:16] <VooDooNOFX_> otherwise, without -v quiet, I get the ffmpeg configuration information, followed by by json string.
[00:17] <VooDooNOFX_> if i'm asking for print_format, shouldn't ffmpeg also output the error messages and the like using that format as well, perhaps even including configuration params.
[00:17] <relaxed> check the exit status
[00:17] <VooDooNOFX_> yeah, I can check exit status to "that" it failed. I'm more interested in seeing "why".
[00:18] <relaxed> ffprobe blah returns: "blah: No such file or directory"
[00:19] <VooDooNOFX_> try 'ffprobe -v quiet blah -print_format json'
[00:20] <VooDooNOFX_> or ffprobe -v error -print_format json blah
[00:21] <relaxed> it returns: blah: No such file or directory\n{\n}
[00:21] <VooDooNOFX_> or even much worse: ffprobe -v error -print_format xml blah
[00:22] <relaxed> if this is for a script you should test the input file exists
[00:22] <relaxed> what do expect to happen?
[00:22] <VooDooNOFX_> any number of things can cause ffprobe/ffmpeg to not process a file. missing codecs, bad params, etc
[00:23] <relaxed> WHAT DO YOU EXPECT TO HAPPEN?
[00:23] <VooDooNOFX_> I would expect that asking print_format json would output { 'error': True, 'error_message': 'blah: No such file or directory' }
[00:23] <VooDooNOFX_> formatted output
[00:23] <relaxed> the error is right before the JSON output
[00:24] <VooDooNOFX_> try the xml option
[00:25] <relaxed> yes
[00:27] <VooDooNOFX_> what is the intention of print_format then?
[00:28] <relaxed> it's self-explanatory
[00:30] <relaxed> it's not -print_ffprobe_errors_in json :P
[00:30] <VooDooNOFX_> the answer for me was I just saw the -show_errors flag ;)
[00:31] <VooDooNOFX_> just not as intui
[00:31] <VooDooNOFX_> intuitive as I thought. heh. I'm kind of slow like that.
[00:31] <VooDooNOFX_> Is there a -show_all option by any chance?
[00:33] <pyoor> Hi all.  I'm new to the mpeg format and was hoping someone here might be able to answer some questions for me.  Viewing an m4a in atomboxstudio I see a number of fields in the mvhd atom similar to what's outlined here (https://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap2/qtff2.html).  Why are only half of these listed in the ISO (jaadec.sourceforge.net/specs/ISO_14496-12_ISOBMFF.pdf)?
[00:34] <pyoor> ahh sorry, just realized this might be better suited for ffmpeg-devel
[00:46] <OsmanB> hello , can i send webcam stream thru rtmp on ffmpeg C++ ? i didnt see any sample ?
[00:46] <OsmanB> if(avformat_open_input(&pFormatCtx, "rtmp://82.222.191.3/webtv/webtv_wowza1" , NULL, NULL)!=0) <= i do this for reading
[00:46] <OsmanB> how can i do output to rtmp ?
[00:47] <OsmanB> live out
[02:41] <Freakshow> -f flv rtmp rtmp://your.server.whatever:port/path/to/stream
[02:41] <Freakshow> and um... really? http://pastebin.com/cnQ99H5k
[03:22] <T3mp3sT> OK so I have calculated the bit streams to make a 1GB file. One Q thought on my cmd:
[03:23] <T3mp3sT> ffmpeg -i Drive.2011.BluRay.1080p.x264.DTS-LTT.avi -pass 1 -vcodec libx264 -preset veryslow -b:v 1226.72134943k -f matroska -sn -an -y /dev/null && ffmpeg -i Drive.2011.BluRay.1080p.x264.DTS-LTT.avi -pass 2 -vcodec libx264 -preset veryslow -b:v 1226.72134943k -acodec libfaac -ab 128k -ac 2 -sn drive2.mkv
[03:24] <T3mp3sT> On the second pass should I be using the avi output or the motroska as defined in pass 1
[03:26] <T3mp3sT> As you see the input is an avi and I tell pass one to dump to motroska. In pass 2 I am still using the input file as avi but the output is mkv
[03:27] <relaxed> you can overwrite the 1st pass output
[03:27] <T3mp3sT> relaxed could you elaborate?
[03:28] <relaxed> for the second pass use -y drive2.mkv
[03:28] <relaxed> also, +1 for floating point bitrate
[03:28] <T3mp3sT> Thx
[03:32] <relaxed> oh, omit the -y as your first pass is sent to /dev/null.
[03:33] <relaxed> but yes, matroska is a better, more modern, container than avi
[03:34] <MindSpark> hello
[03:34] <T3mp3sT> so you are saying: ffmpeg -i movie.avi -pass 1 -vcodec libx264 -preset veryslow -b:v 1226.72134943k -f matroska -sn -an  /dev/null && ffmpeg -i movie.avi -pass 2 -vcodec libx264 -preset veryslow -b:v 1226.72134943k -acodec libfaac -ab 128k -ac 2 -sn -y drive2.mkv . Not where I am using the avi and the motroska (pass 1) and output.mkv (pass 2)
[03:34] <relaxed> VooDooNOFX_: glad you found a solution
[03:35] <relaxed> T3mp3sT: looks good, you're using matroska for both passes.
[03:35] <MindSpark> I  am trying to make ffserver read a rtmp feed and stream to rtp. For some reason, when I play using vlc or mplayer from my local computer, I get timeouts, as if the file is empty. But I can see the encoding being done by ffserver
[03:35] <T3mp3sT> relaxed nice. Thx for your help
[03:36] <MindSpark> can anyone help with that?
[03:37] <T3mp3sT> relaxed calculating all the bit rates was a pain in the butt to get a 1GB file. Are there any scrips around to do this. If not Ill write one.
[03:38] <MindSpark> I need to understand the whole rtp/rtsp/unicast/multicast/rdp concept
[03:38] <MindSpark> can someone tell me what all that does and how ffserver utilizes them?
[03:44] <T3mp3sT> Seems that on Debian kernel 3.2 is really handling ffmpeg well. I have a 12% speed increase. On Debian
[03:45] <T3mp3sT> Think it is dealing with the threading in a "smarter" way...not sure.
[03:47] <relaxed> T3mp3sT: add -threads 0 to use all your cores
[03:47] <T3mp3sT> I thought that was default?
[03:48] <relaxed> I think it is but you never know how old someone's build is
[03:49] <T3mp3sT> using the newest gits for x264, ffmpeg and all the goodies you can think of. Pulled them today.
[03:53] <relaxed> here's an easy way to calculate the 2pass bitrate: bc -l <<<((($size_in_kilobytes - ($length_in_seconds * ($audio_bitrate / 8)) ) / $length_in_seconds) * 8)"
[03:54] <relaxed> where $audio_bitrate is in kbs, like 192
[03:54] <T3mp3sT> Dang, is Linux actually using Turbo Boost starting with this kernel? Since I am using a very nice water cooling system my CPU is at 21C. Normally Boost is dictated by core temps (thus normally useless for this kind of stuff). AFAIK Boost is was not even supported in Linux without weird hacks? Might explain the speed increase.
[03:54] <relaxed> missing quote, bc -l <<<"((($size_in_kilobytes - ($length_in_seconds * ($audio_bitrate / 8)) ) / $length_in_seconds) * 8)"
[05:05] <Logos01> Howdo, folks. I have an flv file I'm trying to strip the audio out of, but every time I do it introduces distortion at the peaks. (Sounds like the speakers are maxed out even when at 50% volume, to more clearly illustrate my meaning.)
[05:06] <Logos01> Is there a pointer of directing of what I could do to address this? I'm already making sure I'm keeping the same ab rate.
[05:07] <sacarasc> Logos01: ffmpeg -i foo.flv -vn -acodec copy output.mka
[05:07] <sacarasc> \o/
[05:10] <Logos01> Hrm.
[05:10] <Logos01> I need these to be mp3 format at the endstate.
[05:10] <sacarasc> What is it in the flv? If it's already mp3, just change mka to mp3 and you should be good.
[05:11] <Logos01> mp2
[05:11] <Logos01> aac actually, looking more closely.
[05:15] <Logos01> This distortion is severe, too.
[05:15] <Logos01> Every peak is just torn up.
[05:26] <pasteeater> according to what player?
[05:26] <Logos01> mplayer
[05:26] <Logos01> And Audacity.
[05:26] <pasteeater> what about ffplay?
[05:26] <pasteeater> use a pastebin site to show your ffmpeg command and the complete console output
[05:28] <darkstarbyte> How would I copy 1 video stream 2 audio streams and 2 subtitles streams that are in one video?
[05:31] <darkstarbyte> I keep getting an error
[05:31] <darkstarbyte> codec id 94210 not found
[07:17] <mjb_> Greetings. Not sure if this is the best place to ask, but a recent (Feb. 15) build of ffmpeg is giving me grief about timestamps in a .flv I'm trying to read via the CLI.
[07:17] <mjb_> I get a gajillion messages like "DTS 1169265, next:1178010980 st:1 invalid droping" (that's the very last one) and then I get "[flv @ 0000000001C78C80] pts < dts in stream 1" and "av_interleaved_write_frame(): Invalid argument".
[07:17] <mjb_> The file plays fine in VLC, but I can't do anything with it in ffmpeg because of this error. It seems to be related to a patch from Feb. 7. I am wondering if the timestamps are actually being parsed correctly or if there's a way to get around this.
[07:24] <mjb_> http://pastebin.com/kVdcPpes
[07:25] <aidalgol> While re-encoding an MPEG, I got the message "[mp2 @ 0xbffae0] incomplete frame" and then "Error while decoding stream."
[07:26] <aidalgol> It appears to have aborted at that point but I can't be sure.  Is this a fatal error?
[07:35] <aidalgol> OK, I just ran it again, and it failed at the exact frame.
[07:36] <aidalgol> Is there any way to make ffmpeg keep going past bad frames?
[14:01] <sym-> hi, I'm trying to use ffmpeg.exe to determine duration and frame size for a video file
[14:01] <sym-> but am unable to redirect ffmpeg's console output to a text file
[14:02] <sacarasc> sym-: Try using something like mediainfo. It's awesome at this kind of job.
[14:02] <sacarasc> But you'd have to redirect stderr to stdout to a file.
[14:04] <sym-> thank you sacarasc, I see mediainfo is a GUI program? I'm need this information for a ruby script, so it would be more convenient to have it as text though
[14:04] <sacarasc> There are GUI and CLI versions.
[14:04] <sym-> ah...
[14:05] <ubitux> just run ffprobe
[14:06] <sym-> ffprobe has the exact same problem unfortunately
[14:06] <sym-> sacarasc, thank you very much! mediainfo console version gives me what I need
[14:07] <ubitux> ffprobe -show_format -print_format json input > out.json
[14:07] <ubitux> this works here
[14:07] <sym-> wow, that worked for me too
[14:08] <ubitux> you also have xml, compact and various other outputs
[14:08] <ubitux> the dump format you wanted to get is printed on stderr, thus ff.. 2> out should work
[14:09] <sym-> what does the 2 stand for ?
[14:09] <ubitux> file descriptor 2, stderr
[14:10] <sym-> wow. I had no idea. :-| thanks
[14:11] <ubitux> ffprobe -show_format input.avi 2>/dev/null | grep -E '(duration|size)'
[14:11] <ubitux> this works too.
[14:14] <sym-> thank you so much sacarasc and ubitux, this saves me a lot of poking about
[14:36] <matthiaskrgr> how do I convert several jpgs to a mp4 movie?  there were several tutorials on the net but most of them seemed to be outdated :(
[14:38] <bgmarete> Hi. With regard to the `vob' format, what option(s) force the generation of a GOP header on each GOP?
[14:41] <ubitux> matthiaskrgr: http://ffmpeg.org/ffmpeg.html#Video-and-Audio-file-format-conversion  ffmpeg -f image2 -i foo-%03d.jpeg [...] ?
[14:41] <ubitux> bgmarete: -g 1 maybe?
[14:42] <bgmarete> ubitux: Thanks but that can't be right... That would mean an I-Frame every two frames, which is different from what I want..
[14:43] <ubitux> ok, i don't know then
[14:47] <matthiaskrgr> ubitux: hmm, the images are named like  current.jpg.1329385713
[14:48] <matthiaskrgr> do I use %011 then ?
[14:48] <matthiaskrgr> *%011d
[14:53] <matthiaskrgr> current.jpg.* fails as well
[15:00] <ubitux> current.jpg.%d ?
[15:03] <matthiaskrgr> http://pastebin.com/R3bEgSWT
[15:10] <matthiaskrgr> ... the awkward moment when you decide to use  "convert" instead of "ffmpeg".. :/
[15:26] <matthiaskrgr> ok, got it working with convert and mencoder :p
[16:59] <Freakshow> just in case I missed a reply to this yesterday
[16:59] <Freakshow> http://pastebin.com/cnQ99H5k
[17:00] <Freakshow> it's curious that I have a version newer on this bsd box and yet configure is complaining that it can't find anything to use
[17:01] <Freakshow> enabled libmp3lame && require  "libmp3lame >= 3.98.4" lame/lame.h lame_set_VBR_quality -lmp3lame
[17:01] <Freakshow> oh sorry...
[17:01] <Freakshow> that's indicating the reverse
[17:20] <Freakshow> so more over... are there any rundowns on installing for bsd? I see CentOS and Ubuntu
[17:20] <Freakshow> in the wiki
[17:21] <Freakshow> I guess I could look at the macos on ramdisk setup
[17:21] <Freakshow> any thoughts?
[17:53] <relaxed> Freakshow: why don't you install ffmpeg-devel from /usr/ports ?
[18:06] <Freakshow> relaxed: would that get me latest?
[18:07] <Freakshow> I'm trying to test forcing -rtsp_transport tcp and it doesn't seem like it's available until 0.9.1
[18:13] <Freakshow> relaxed: I'll ping you once I'm in the office... gotta get on the road
[19:31] <Freakshow> relaxed: the version that's in devel is too old to do what I need... plus I'll never get input from folks here if I'm running anything close to 0.7.1
[19:31] <Freakshow> :(
[20:31] <pasteeater> Freakshow: unfortunately nobody has volunteered to make a BSD ffmpeg guide.
[20:32] <pasteeater> ...and i'm a *BSD noob.
[20:35] <brontosaurusrex> pasteeater: what, ubuntu is not good enough for ya?
[20:40] <pasteeater> brontosaurusrex: i have 6 Ubuntu VMs. should i get more?
[20:40] <brontosaurusrex> pasteeater: :) bo
[20:40] <brontosaurusrex> no*
[20:43] <relaxed> Freakshow: install the lastest binutils and gcc from ports, then point ffmpeg's configure to the new gcc and `as`
[20:44] <relaxed> Freakshow: Are your ports up-to-date? This looks current to me. http://www.freshports.org/multimedia/ffmpeg-devel/
[20:52] Action: pasteeater votes relaxed as *BSD guide volunteer
[21:24] <Freakshow> ugh! relaxed: something is clearly wrong with my ports tree then
[21:25] <Freakshow> ours showed a much, much older version
[21:25] <Freakshow> I'll look into it
[21:25] <Freakshow> thanks for bringing that to my attention
[21:43] <Mattias> I'm trying to use ffserver, I got the sample config file and haven't changed much. when I try to do fmpeg -i videofile.mkv http://localhost:8090/feed1.ffm  I get this: [tcp @ 0x155bdc0] TCP connection to localhost:8090 failed: Connection refused  <-- and a HTTP 503 error
[21:43] <Mattias> on server side I see: Fri Feb 17 21:40:31 2012 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 503 308
[21:44] <Mattias> I can access the stat page fine
[21:50] <burek> Mattias, probably access problems
[21:50] <burek> check file permissions
[21:50] <burek> oralso, try with an empty config (as much as possible empty), and uncomment things slowly, until you get 503 again
[21:51] <burek> -oralso +or
[21:58] <Mattias> burek: thanks, somehow I got it to work by commenting stuff
[22:02] <burek> :beer: :)
[22:09] <Mattias> burek: you don't happen to have awesome settings for lan streaming? ^.^ so I kind of get the same hd quality the video has that I want to stream.
[22:09] <Mattias> I've tried increasing things a lot but doesn't seem to help much beyond a certain point, lots of small "boxes" can be seen
[22:10] <Freakshow> pasteeater / relaxed: do either of you know which version that the current devel branch is going to give me?
[22:23] <burek> Mattias, to be honest
[22:23] <burek> I couldn't manage to config ffserver]
[22:23] <burek> so I temporarily switched to vlc
[22:23] <burek> but I'll check back ffserver soon to test if things are any better now
[22:26] <Mattias> I've tried experimenting a little now, using avi, video and audio gets out of sync, using mpeg, I get loads of blocks. using asf, sound hardly works.. I wonder if I should just crank up bitrate over 10000
[22:26] <Mattias> with mpeg
[22:31] <Mattias> yeah, gotta experiment some more with mpeg, getting good quality now but I probably cranked it up too much :)
[22:37] <Mattias> great, got it good now :)
[22:47] <pasteeater> Freakshow: i do not know. sorry.
[23:00] <Freakshow> no worries
[23:57] <Austen> anybody know why this error shows up when building ffmpeg?
[23:57] <Austen> libopenjpeg.a(cio.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
[23:57] <Austen> ive turned on -fPIC and enable-pic
[23:58] <Austen> and with libopenjpeg as well...
[00:00] --- Sat Feb 18 2012


More information about the Ffmpeg-devel-irc mailing list