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

burek burek021 at gmail.com
Sat Apr 7 02:05:02 CEST 2012


[00:08] <N0hbdy> Hey all, is anybody knowedgeable about how ffmpeg calculates the FPS for a h264 video file?
[00:14] <sacarasc> It's written in the header files, IIRC.
[00:14] <sacarasc> *files header
[00:14] <beastd> N0hbdy: Not sure. But chances that someone will help out are usually higher if you describe a more concrete situation/exaple. I won't help out because I will go to sleep now. Good luck.
[00:14] <N0hbdy> beastd: thanks for the heads up, sleep well :)
[00:15] <N0hbdy> sarcasasc: thats for the tip, thats what I thought as well
[00:15] <JEEB> yes, if it's just a bit stream there can be a timestamp/whatever in the header. In most cases a bit stream is in a container tho, which means that you usually have a time stamp for every frame
[00:16] <N0hbdy> use case is simply that I have a video that ffmpeg is saying is 13.11 fps, but when i step through frame for frame, I see 25 frames go past every second....
[00:16] <N0hbdy> so I'm trying to figure out why the 13.11 is being reported
[00:16] <N0hbdy> but if its a header thing, then that helps a lot for narrowing down where to look for the issue
[00:16] <JEEB> is it a bit stream or an actually muxed file?
[00:16] <JEEB> s/file/stream/
[00:17] <N0hbdy> muxed file
[00:18] <JEEB> I would guess that in real usage the H.264 stream's header is going to be ignored and the timestamps from the container will be used
[00:19] <JEEB> also, there are many files where the frame rate is not constant, which might throw off any calculation of a "frame rate" for that file
[00:20] <JEEB> checking the container's time stamps would be a good beginning
[00:22] <N0hbdy> okay, thanks
[00:50] <ckb> can I specify an absolute path to a preset?
[00:54] <sacarasc> -fpre
[01:11] <ckb> -vpre too?
[01:12] <sacarasc> -vpre is for installed ones. -fpre is to give a file name/path.
[01:57] <ckb> ah
[01:57] <ckb> I can take the ffpresets off one machine and put it on the other?
[02:31] <relaxed> Why do you need them? Current ffmpeg uses libx264's internal presets.
[02:31] <relaxed> ckb: ^^
[02:33] <relaxed> What preset are you using?
[02:33] <ckb> fast_firstpass
[02:33] <ckb> and medium
[02:34] <ckb> but I'm moving code from one machine to another
[02:34] <sacarasc> The fast firstpass one is done automatically on the first pass now, I believe.
[02:34] <sacarasc> And medium is ridiculously out of date.
[02:34] <ckb> so what else should I use?
[02:35] <ckb> I'm doing this on a web server currently
[02:35] <ckb> I'll be looking to get a strict encoding server shortly
[02:35] <ckb> so I'm not trying to zombify the machine
[02:36] <relaxed> medium is now the default
[02:36] <ckb> hm
[02:36] <ckb> so I don't even need to specify any presets?
[02:36] <sacarasc> I was thinking of normal, then... Or something.
[02:37] <sacarasc> Sorry, ckb. I'm ill and barely coherent.
[02:37] <relaxed> ckb: If you're using a recent version, no.
[02:37] <ckb> 0.7.8?
[02:37] Action: relaxed passes sacarasc a red potion
[02:37] <sacarasc> \o/
[02:37] <ckb> sacarasc: I just came down with the flu ;(
[02:37] <ckb> broke a 101 temp last night
[02:37] <sacarasc> :(
[02:37] <sacarasc> Nice.
[02:38] <relaxed> maybe, 10.1 is the latest.
[02:38] <ckb> doc gave me some syrup though :D
[02:38] <relaxed> is it red?
[02:39] <ckb> ;)
[02:40] <ckb> so I definitely need to tell the hosting company to update ffmpeg
[02:40] <ckb> ridic
[02:40] <sacarasc> Are you using ffmpeg or libav?
[02:40] <ckb> er? libav is a codec right?
[02:40] <sacarasc> It's a fork of ffmpeg that uses the same binary names.
[02:40] <ckb> -i gives me libavutil
[02:41] <ckb> but it says ffmpeg version 0.7.8
[02:41] <sacarasc> By which dev team?
[02:41] <ckb> ffmpeg devs
[02:41] <sacarasc> Okay, that is ffmpeg.
[02:42] <ckb> so.. original question: can I use the preset from one machine to the other?
[02:42] <ckb> or should I just update ffmpeg?
[02:42] <relaxed> you may not need it.
[02:42] <sacarasc> You can, but updating is generally better anyway.
[02:44] <ckb> damn
[02:44] <ckb> my company uses managed hosting
[02:46] <joe7817> Hi all, I can't seem to be able to successfully set up a live stream to ffserver. FFserver seems to disconnect and not accept any feeds from FFmpeg
[02:47] <joe7817> I can see that ffmpeg is issuing a POST command to ffserver, but ffserver disconnects before accepting input. But if I point ffmpeg to a listening netcat, it's able to stream
[02:52] <joe7817> Any idea why this might be happening? I'm trying to look through the source now, but I can't make heads or tails of it.
[02:53] <funyun> hi. can someone help me with this error? http://pastebin.com/QZuHjcUv
[02:58] <funyun> the error is "Application provided invalid, non monotonically increasing dts to muxer in stream 0: 67 >= 33"
[02:58] <funyun> anyone know how i can fix this?
[03:01] <funyun> anyone alive?
[03:02] <funyun> i also get this error av_interleaved_write_frame(): Invalid argument
[03:16] <funyun> is everyone on spring break or something?
[03:28] <funyun> hi. can someone help me with this error? http://pastebin.com/QZuHjcUv
[03:30] <funyun> sacarasc: you there?
[03:34] <sacarasc> funyun: ?
[03:35] <funyun> sacarasc: you usually help me when i have a problem. i was wondering if you could help me with this one?
[03:35] <sacarasc> I was about to go to bed. I am ill and it's 02:35...
[03:35] <funyun> okay, thanks anyway
[03:41] <funyun> relaxed: any idea?
[04:06] <relaxed> funyun: Try demuxing the streams, encode the audio and then remux. If all else fails use mkvextract and MP4Box.
[05:03] <funyun> relaxed: i tried your last suggestion, it works but the audio is very out of sync. i don't understand your first suggestion "Try demuxing the streams, encode the audio and then remux"?
[06:42] <relaxed> funyun: extract the h264 and audio, encode the audio, then copy them into the container of your choice
[09:15] <kiloflame> trying to compile  lame + ffmpeg + ios   for mp3 export... can anyone help me with my config flags?
[09:15] <kiloflame> END /var/folders/fk/mmxfjf157b73q4t04cbfttxr0000gn/T//ffconf.jNrjMfBc.c /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -arch armv7 -mfpu=neon -miphoneos-version-min=5.1 -mcpu=cortex-a8 -std=c99 -fomit-frame-pointe
[09:16] <kiloflame> error: lame/lame.h: No such file or directory ERROR: libmp3lame >= 3.90 not found
[09:20] <grepper> kiloflame: you have libmp3lame development files installed ?
[09:21] <kiloflame> thats with these build flags: yes they are in /usr/local/lib
[09:21] <kiloflame> and lame compiles in ffmpeg fine until i add my ios5.1 flags
[09:21] <kiloflame> so its like i can have one or the other -    lame or ios,   but not both
[09:22] <kiloflame> ./configure  --enable-static \ --disable-shared --enable-pic \ --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk" \ --extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk  -miphoneos-version-min=5.1" \ --enable-debug \ --extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=5.1" \ 
[09:23] <kiloflame> --arch=arm --target-os=darwin \ --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" \ --cpu=cortex-a8 \ --enable-gpl \ --enable-debug \ --enable-small \ --disable-asm \ --enable-libmp3lame
[09:24] <kiloflame> sorry  http://pastebin.com/ES3HzTGv
[13:44] <meco> Is ffmpeg command line only? I want to rotate a video 90? but I don't understand what to write to effect this.
[13:44] <meco> Actually I want to rotate it 270?..
[13:47] <burek> meco, it is cmd line only
[13:48] <burek> take a look at transpose filter
[13:48] <meco> burek: Could you assist me and give me the command I need to this operation?
[13:48] <burek> http://ffmpeg.org/ffmpeg.html#transpose
[13:48] <meco> ok
[13:50] <burek> ffmpeg -i input.avi -vf transpose=0 -vcodec libx264 out.mp4
[13:50] <burek> ffmpeg -i input.avi -vf 'transpose=0' -vcodec libx264 out.mp4
[13:51] <meco> Cool.. I'll try it!
[13:54] <meco> "Unknown encoder 'libx264'". It's an mp4 file.
[13:54] <JEEB> then you just don't have libx264 compiled (installed) into your ffmpeg
[13:54] <JEEB> it's a separate library that provides H.264 encoding
[13:55] <meco> Can I deal with that easily?
[13:55] <JEEB> well, in most cases you would have to re-compile ffmpeg :)
[13:56] <meco> ok
[13:56] <JEEB> (if you're on windows finding another binary is also an alternative)
[13:56] <burek> ffmpeg -i input.avi -vf 'transpose=0' out.avi
[13:56] <burek> can you please use pastebin.com, to show your command line and its output?
[13:56] <JEEB> note how you are not specifying a codec
[13:56] <JEEB> it will select something most probably quite bad
[13:57] <meco> I'm on Linux
[13:57] <burek> meco, please provide pastebin
[13:59] <meco> http://pastebin.com/PAEURjkS
[13:59] <burek> Video: h264
[13:59] <burek> Audio: aac
[14:00] <burek> well for audio you can use -acodec copy
[14:00] <burek> and for video, you need libx264 if you want it to remain as h264
[14:00] <burek> are you using 64bit linux?
[14:01] <meco> I am trying 'ffmpeg -i in.avi -vf "transpose=1" out.avi'
[14:01] <burek> that command line will select some codec automatically, just like JEEB has said
[14:02] <burek> in most cases it ends up being bad quality
[14:02] <burek> but you can try your: ffmpeg -i input.mp4 -vf "transpose=1" out.mp4
[14:02] <meco> OK. I'll just check the result before proceeding.
[14:02] <burek> and see what happens
[14:02] <burek> anyway meco, are you using 64bit linixu
[14:02] <burek> linux*
[14:03] <meco> 32
[14:03] <burek> ok
[14:03] <meco> Yes, I changed to mp4..
[14:03] <burek> can you please use pastebin.com, to show your command line and its output?
[14:04] <JEEB> that just changes the output container to mp4 and still just picks some codec that happens to be possible to use in that container ^^;
[14:04] <burek> input is also mp4
[14:06] <meco> http://pastebin.com/16WuUU39 - nice result
[14:07] <burek> Stream #0.0(und): Video: mpeg4, yuv420p, 240x320, q=2-31, 200 kb/s, 15 tbn, 15 tbc
[14:07] <burek> it reencoded video as mpeg4 video
[14:07] <burek> if you want to influence the quality, you can play around with -b parameter
[14:07] <burek> for example: ffmpeg -i input.mp4 -vf "transpose=1" -b 10000k out.mp4
[14:08] <burek> see http://ffmpeg.org/ffmpeg.html for more info
[14:13] <meco> I appreciate the help. I'm jsut doing an emergency edit, so the result I've got as satisfactory.
[14:14] <meco> is
[15:26] <woozly> guys, how to make FF plays mp4 file ? without full download it?
[15:26] <woozly> I mean, FF can't play .mp4 stream
[15:26] <woozly> :/
[15:26] <woozly> it waits until .mp4 downloads
[15:27] <Mavrik> does "FF" mean "Firefox"?
[15:27] <sacarasc> Use qt_faststart on the mp4 to move the moov atom to the front of the file.
[15:27] <woozly> Mavrik: yes..
[15:27] <woozly> sacarasc: oh... I'll try!
[15:27] <Mavrik> yeah, Firefox doesn't support H.264/AAC
[15:27] <woozly> oh :(
[15:28] <Mavrik> so you're out of luck with that
[15:56] <meekohi> Guys I don't understand this "Out of tree builds are impossible with config.h in source dir." Does that just mean I need to run ./configure after cd to the source directory?
[16:07] <meekohi> staging /usr/local/src/ffmpeg-0.10.1$ yasm --version
[16:07] <meekohi> yasm 1.2.0
[16:07] <meekohi> staging /usr/local/src/ffmpeg-0.10.1$ sudo ./configure
[16:07] <meekohi> yasm not found, use --disable-yasm for a crippled build
[16:07] <meekohi> whyyyy
[16:09] <JEEB> o_O wat @ sudo
[16:13] <meekohi> JEEB: Using puppet
[16:14] <JEEB> I would check if you have the same path being used
[16:14] <JEEB> also check config.log for more info
[16:15] <meekohi> config.log is full of so much junk -- what do you look for?
[16:16] <meekohi> yasm --version
[16:16] <meekohi> ./configure: line 628: yasm: command not found
[16:18] <meekohi> So when configure runs yasm it isn't found, but when I run it, it is.
[16:18] <meekohi> Does configure use a different path?
[16:18] <JEEB> not configure itself but how you run it, possibly
[16:18] <JEEB> since you seem to run it in some specific way
[16:19] <meekohi> Right now I'm just running it on the command line with sudo
[16:19] <JEEB> sudo -s
[16:19] <JEEB> check path
[16:19] <JEEB> see the PATH difference  basically
[16:20] <meekohi> identical
[16:20] <JEEB> I dunno, in all the cases I've run configure (I've never run it under sudo tho) the PATH has been used as-is
[16:20] <meekohi> gotcha.
[16:50] <meekohi> What do the "demuxers" do? How do I know if I need them when compiling?
[17:14] <JEEB> meekohi, take a container and demux streams out of it
[17:15] <JEEB> demux/splitting usually means taking various bit streams / information out of a container
[17:15] <JEEB> also usually you don't need to disable things manually
[17:15] <meekohi> How is that different from a parser?
[17:16] <meekohi> In this case I do. I am getting weird errors when I include some things, but not others, and am trying to narrow down what causes the problem.
[17:16] <JEEB> o_O
[17:18] <meekohi> Consistent with all my previous experiences, ffmpeg is about the hardest piece of software to compile of all time.
[17:18] <meekohi> I have never had it go smoothly on any machine.
[17:18] <JEEB> funny enough my experiences have been mostly the opposite
[17:19] <JEEB> except for msys/mingw where some extra hacks were needed
[17:19] <meekohi> I'd be happy to hire you for a few hours ;D I'm trying to get it working on Amazon's Linux AMI.
[17:20] <meekohi> I can get it to compile fine with the settings I used previously
[17:20] <meekohi> Now I'm trying to add support for image2/mjpeg
[17:20] <meekohi> And am not having much luck.
[17:20] <JEEB> my configure options are usually rather minimalistic
[17:20] <JEEB> I usually just disable networking and hwaccels on windows tho
[17:21] <meekohi> It doesn't help that the compile time on ec2 is like 10 minutes :P
[17:21] <meekohi> So everything I try takes forever.
[17:22] <JEEB> on windows the configuration script and make distclean takes minutes too
[17:22] <JEEB> because windows isn't exactly liking the fork() ing
[17:22] <JEEB> har har
[17:22] <meekohi> Alas ;)
[17:22] <JEEB> I did find myself using some voodoo options I had picked up during the years some time ago
[17:22] <JEEB> like still definining the define for static w32pthreads
[17:23] <JEEB> even though I'm using w32threads
[17:23] <JEEB> (as in native win32 threading)
[17:25] <meekohi> Whatever is going wrong causes this error:
[17:25] <meekohi> libavcodec/libx264.c:73: error: duplicate member 'stats'
[17:25] <meekohi> seems like a bug in my opinion, but I am so confused about what's going on I hate to file a report.
[17:25] <JEEB> which gcc btw?
[17:27] <meekohi> 4.4.6
[17:27] <JEEB> hmm
[17:28] <JEEB> http://permalink.gmane.org/gmane.comp.video.ffmpeg.cvs/48399
[17:28] <JEEB> I would guess your source code is older than this commit?
[17:29] <meekohi> Nice find. I'm using 0.10.1 so I assume yeah
[17:29] <meekohi> Do you think this is included in 0.10.2?
[17:30] <JEEB> I have no idea, but the commit did reach the 0.10.x branch at least... I don't really keep up on the dates of various releases
[17:30] <JEEB> if 0.10.2 was released after that commit, it should have it :)
[17:30] <meekohi> Craziness. I'll try upgrading.
[17:30] Action: JEEB just usually compiles git HEAD because there are usually no real reasons to use the releases
[17:31] <meekohi> Same day lol
[17:31] <meekohi> Yeah& the guy who set this up before me is all about picking specific releases and sticking with them. We have this system for automatically configuring new servers& :P
[17:31] <meekohi> Hugely over-designed in my opinion, but whatever.
[17:35] <meekohi> Ha. That patch was the ONLY change between 10.1 and 10.2
[17:35] <meekohi> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=log;h=refs/tags/n0.10.2
[17:35] <JEEB> fun
[17:35] <meekohi> I wonder how many hours I just wasted on that...
[20:57] <ffizz> hello. i'm trying to convert a video from mp4 to flv  but the file size stays nearly the same. any tips on reducing the file size of the resulting flv?
[20:58] <burek> can you please use pastebin.com, to show your command line and its output?
[20:59] <ffizz> http://pastebin.com/gffiGwRt @burek
[21:03] <burek> ffizz, that paste is missing the output
[21:04] <ffizz> burek, wait have to convert again to capture the output
[21:04] <burek> just press ctrl+c when it starts encoding
[21:06] <ffizz> burek: http://pastebin.com/1aW1CZ0K
[21:07] <burek> your input has
[21:07] <burek> Stream #0:0: Video: mpeg4
[21:07] <burek> Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s
[21:07] <burek> and what is your goal? why do you want to convert it to flv
[21:08] <burek> because flv is a file format and an encoder, so its kinda ambiguous
[21:08] <ffizz> burek: i have a website where i want to setup streaming video
[21:08] <burek> and you use web player, like jw player or flow player?
[21:08] <ffizz> burek: flowplayer
[21:09] <burek> then you only need to remux into flv container
[21:09] <burek> did you try ffmpeg -i input.avi -acodec copy -vcodec copy -f flv output.flv
[21:09] <ffizz> burek: i also want to reduce the filesize to save on bandwith and storage costs
[21:09] <ffizz> burek: trying it now
[21:10] <burek> that will create a flv file containing the original streams (mpeg4 and mp3)
[21:10] <burek> without any quality loss (it will just copy the data)
[21:10] <burek> i see
[21:10] <burek> then use something like this
[21:12] <burek> ffmpeg -i input.avi -acodec libmp3lame -ab 64k -vcodec libx264 -preset slow -f flv output.flv
[21:14] <ffizz> burek: trying it now
[21:16] <relaxed> a ratecontrol is fine too
[21:16] <burek> yes, -b 300k for example
[21:18] <burek> ffmpeg -i input.avi -acodec libmp3lame -ab 64k -vcodec libx264 -preset slow -b 320k -f flv output.flv
[21:18] <ffizz> without the -b 300k it still creates a large file. 5 MB for 30 seconds of video. trying it now with -b 300k
[21:19] <ffizz> what i'm trying to do is get the same quality as the major adult tube sites
[21:19] <relaxed> to restream or ?
[21:20] <ffizz> relaxed: i have my own adult videos in various formats (mp4, avi, wmv) and try to stream them on my tube
[21:21] <ffizz> just very new to ffmpeg and video encoding.
[21:21] <burek> then you are probably looking for 2 pass encoding
[21:21] <burek> which can target the file size
[21:22] <ffizz> burek: how can i do that?
[21:22] <relaxed> and will give you a better average bitrate
[21:22] <ffizz> or where can i read about it?
[21:23] <burek> actually that's an old stuff
[21:23] <burek> http://ffmpeg.org/ffmpeg.html
[21:23] <burek> search for -pass
[23:55] <llrcombs> so, something weird's going on with a file I've got
[23:56] <llrcombs> I'm trying to take an MKA with one AAC audio track and reencode it using faac as an M4A (not just a remux, an actual reencode [current encode plays choppily in VLC for some reason, but reencoded, it's fine])
[23:57] <llrcombs> when I reencode it, it goes from being 2h4m to 1h59m
[23:57] <llrcombs> muxed with the video it goes with, it has a very bad desync
[23:57] <llrcombs> variable desync, which can't be corrected with a delay
[00:00] --- Sat Apr  7 2012


More information about the Ffmpeg-devel-irc mailing list