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

burek burek021 at gmail.com
Tue Feb 19 02:05:01 CET 2013


[02:36] <llogan> relaxed: were you able to work on your compile guide?
[03:09] <t4nk422> hi all, I'm trying to use ffmpeg to convert an FLV file to MP4. I managed to do this successfully for some FLV files, but other seem to be failing. The encoding on the ones that fail are saying "flv1, yuv420p". I'm running on Ubuntu and followed the following link to compile ffmpeg: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide. Am I missing a flag or a codec that I need to add, any assistance or pointers would be very 
[03:09] <t4nk422> My command line output is: http://pastebin.com/pJVyfirD
[03:16] <llogan> t4nk422: never seen that before. can you supply a sample file?
[03:17] <llogan> also please include the command and output for one that does work
[03:19] <t4nk422> Yeah sure, let me put that together
[03:26] <t4nk422> It looks like the one that was working is encoded differently (see pastebin). The working file plays in VLC & Movie Player on Ubuntu. The notworking file ONLY plays in VLC, would it be a codec I'm missing on my system that might be causing this? http://pastebin.com/Gv0eLS7N
[03:27] <t4nk422> The links listed in the pastebin, should make those random sample files playable
[03:30] <Tvilling> speex and flv1 vs. vp6 and mp3
[03:32] <llogan> t4nk422: looks like the audio stream is the source of the issue, AFAIK. probably worthy of a bug report.
[03:33] <llogan> ah, i see. i think you need --enable-libspeex.
[03:34] <t4nk422> ah thanks, I'll give that a try
[03:34] <llogan> i assumed ffmpeg can decode speex natively, but i was wrong and that error isn't very informative
[03:34] <llogan> https://ffmpeg.org/trac/ffmpeg/ticket/1668
[03:35] <llogan> so install libspeex-dev and recompile ffmpeg with --enable-libspeex
[03:35] <Tvilling> Try running it more verbosely next time.
[03:36] <llogan> the verbose output was not very useful in this case.
[03:36] <t4nk422> ah ok, thanks very much for the help to both of you, installing that now
[03:38] <llogan> t4nk422: refer to the "Upgrading FFmpeg" section of the guide
[03:38] <Tvilling> llogan: The debug level weren't helpful as well?
[03:39] <llogan> not for the general user.
[03:39] <Tvilling> Eh.
[03:43] <llogan> t4nk422: i updated the guide so it will now install libspeex.
[08:04] <defaultro> llogan, the slowmovideo result was awesome :)
[14:30] <jarno> ...using libav* and libx264 to encode and mux a video stream received from a camera and I get "nvalid DTS: PTS is less than DTS"...I'm setting PTS in my code and it indeed is monotonically increasing....
[14:30] <jarno> ...so what's the cure?
[14:32] <jarno> ...anyone?
[14:44] <Mavrik> jarno: obviously you need to set DTS on output packets as well.
[14:47] <jarno> ...I took a quick peak related to this issue and I (like others) thought that the DTS was something generated by the libx264
[14:47] <jarno> but, then again, I must have been wrong
[14:47] <Mavrik> it is
[14:47] <Mavrik> PTS and DTS is generated by libx264
[14:48] <Mavrik> so if you're getting that error
[14:48] <Mavrik> you're doing something wrong with them after encode
[14:48] <jarno> in my code I'm setting PTS for the frame but not the DTS....
[14:48] <jarno> ...since I thought it was not necessary to set the DTS....
[14:49] <Mavrik> I see,
[14:49] <Mavrik> well PTS and DTS of output packets are set by libx264 encoder
[14:50] <Mavrik> you need to make sure your frames going to the encoder have proper PTS
[14:50] <Mavrik> are you by any chance trying to set PTS on encoded frames?
[14:50] <jarno> I'm setting PTS on the frame that I give to the encoder
[14:51] <jarno> ...i.e. the frame that I want to be encoded...
[14:52] <Mavrik> well, step through the code with a debugger and find out where do your PTS change
[14:53] <jarno> ...okis...will do...however, I'm pretty much following the decoding_encoding example....
[14:54] <jarno> ...in any case, thanx for the hint...
[14:54] <JEEB> also, the reason for the error is simple -- PTS never can be smaller than DTS
[14:54] <JEEB> DTS = when is this frame decoded
[14:54] <JEEB> PTS = when is this frame shown
[14:54] <JEEB> you cannot show it before it's decoded :P
[14:55] <JEEB> but yes, if you give libx264 valid PTS values, it should give you valid PTS and DTS
[14:55] <Mavrik> yeah
[14:55] <Mavrik> jarno: basically, libx264 should never give you invalid PTS/DTS pairs, so you're breaking them somewhere in your code before passing them to the muxer
[14:56] <Mavrik> unless you have broken/buggy versions of libav*/x264
[14:56] <Mavrik> but that's extremely unlikely
[14:58] <jarno> ...ok...I'm pretty sure that I'm the cause of the problem since I'm new to this...
[14:58] <Mavrik> so I suggest you first just output PTS/DTS pairs right after encoding to see if the order there is ok (as JEEB said, DTS is ALWAYS <= PTS) and then follow your code through for changes
[14:59] <JEEB> remember to output both nominator and the denominator (timescale and the pts value) for all cases
[14:59] <jarno> ...ok...thanx guys!!!!!!!
[14:59] <JEEB> printf debugging om nom nom
[15:00] <Mavrik> ^^
[15:00] <jarno> ...okis...I'll output the whole stuff.... :) with a bit of luck I can get the initial version of this thing running today....!!!!!
[15:06] <brx_> im using an ffmpeg compiled for arm
[15:06] <brx_> on one device: ffmpeg -i a.jpg returns ifo on the file
[15:07] <brx_> on another device the same command returns "No such file or directory"
[15:07] <brx_> it does the same for png files, why is this? its the same ffmpeg binary on both devices
[15:07] <JEEB> sounds like a file rights issue
[15:07] <brx_> ahh i see
[15:10] <brx_> JEEB, i did chmod 777 on a.png, same error
[15:10] <brx_> im running the process as root btw
[15:10] <JEEB> is the ffmpeg binary run at all btw?
[15:11] <brx_> yes, it runs fine ffmpeg outputs the "file not found" error
[15:11] <JEEB> ok
[15:11] <brx_> also, when i try to overay a png using -VF it compains about the file
[15:11] <brx_> the same command works on another device
[15:11] <JEEB> I do remember someone on ARM/android having fun with rights and group ownership and other stuff
[15:12] <brx_> this is a major setback for me, the app im writing depends on overlaying an image onto a video
[15:13] <JEEB> see the code for what exactly is being checked for and how far the whole thing gets?
[15:13] <JEEB> and why it errors out
[15:13] <JEEB> that's all I can think of
[15:14] <brx_> ok thanks for the suggestions JEEB
[15:14] <Mavrik> usually strace helps with those problems
[15:16] <brx_> Mavrik, ok i will copy the console output now
[15:28] <brx_> Mavrik, JEEB http://pastebin.com/SA8ea0rF
[15:28] <brx_> both those commands work on nexus 7 but not my htc desire. both devices are rooted and im in the terminal as root
[15:30] <JEEB> first try more verbose output from ffmpeg, second of all, start tracing to th error through the source code :P
[15:30] <JEEB> also do note that there have been at least two major releases of ffmpeg since that version
[15:30] <JEEB> or three
[15:30] <brx_> ! ahh ok
[15:30] <JEEB> no, four
[15:30] <brx_> shit
[15:31] <JEEB> 0.10, 0.11, 1.0, 1.1
[15:31] <Mavrik> also, make sure your sdcard is actually mounted.
[15:31] <Mavrik> and not plugged into the computer
[15:31] <Mavrik> (which would cause difference in behaviour from Nexus 7 to Desire)
[15:31] <brx_> it is mounted, i can do cat /sdcard/image.png and it outputs the file
[15:31] <brx_> cable in or out, same errors
[15:32] <JEEB> I'm pretty sure that this is similar to that one other person's problems with rights on android devices before, but that possibly was already sorted over at the newer releases
[15:32] <JEEB> also without this person actually going there and checking where and why that error occurs we can't say anything
[15:32] <brx_> it was a bitch getting ffmpeg binary in the first place, myb thats why i went with an older version :s
[15:33] <brx_> thanks for the help ayway guys, im going to try and build the latest version of ffmpeg
[15:39] <Mavrik> well as I said
[15:39] <Mavrik> check strace and see what goes wrong
[15:46] <brx_> ok im on it now thanks
[15:58] <shevy> I have a .flv file here, which has Audio codec aac
[15:59] <shevy> I would like to snatch the audio stream and dump it somehow to a file
[15:59] <shevy> it however tells me: Encoder (codec id 86017) not found for output stream #0.0
[15:59] <shevy> is there perhaps a simplified way how to just split up audio and video data into separate streams?
[15:59] <shevy> I don't even know what aac exactly is, whether there could be a .aac file or not
[16:15] <shevy> relaxed hmm ok
[16:16] <shevy> I first tried to convert a .flv into a .mp3 actually
[16:16] <shevy> Here is the raw pastie: http://pastie.org/pastes/6213332/text
[16:19] <relaxed> Your ffmpeg version is very old. Try, ffmpeg -i test.flv -vn -acodec copy output.m4a
[16:22] <shevy> aha interesting, that created a file called output.m4a
[16:23] <shevy> now I seem to have an audio stream, thanks relaxed
[17:23] <terr1> Are there any x264 best practices for calculating which profile (baseline/main/high) and level (1-5.1) to use from a given input video source file?
[17:26] <klaxa> mhh i think profile depends more on what level of compression you want to have in your output file
[17:27] <klaxa> i don't know about the level parameter that much myself, i think this should give a general idea though? http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels
[17:28] <klaxa> preset and crf are important factors for the resulting output too, in general have a look at this guide http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
[17:29] <terr1> klaxa, ok thanks I will read thoes
[21:32] <Sander^home> DOes it exist a standar for recording video in a browser yet?
[21:32] <Fjorgynn> recording video in a browser?
[21:33] <Sander^home> Fjorgynn, Yes.. To do it without flash.
[21:34] <Fjorgynn> no
[21:34] <Fjorgynn> different for each browser
[21:34] <Fjorgynn> webm is one of them
[21:36] <Sander^home> Fjorgynn, Do you have any link on how to do it in html5?
[21:38] <Sander^home> Fjorgynn, in webkit eg?
[22:41] <teratorn> anyone can recommend an image viewer application that can handle raw formats?
[22:43] <ubitux> ffplay
[22:43] <teratorn> ubitux: I had a sneaking suspicion...
[22:44] <durandal_1707> raw formats?
[22:45] <durandal_1707> ffplay is bad because of sdl only output ...., and image viewer should try hard to display correct color
[22:45] <teratorn> durandal_1707: YUV420P, specifically... assuming adjacent plane alignment
[22:46] <teratorn> perhaps I can use image magick
[22:46] <durandal_1707> ffplay can display yuv420p just fine (though i think it messes up color range sometimes, i dunno what is workaround, -vf colormatrix?)
[22:47] <durandal_1707> image magick is so memory hungry, last time i used it ...
[22:47] <durandal_1707> generaly there is rawvideo demuxer
[22:48] <durandal_1707> and with it you can play raw frames with mplayer1/2/mpv
[22:49] <teratorn> i really wish there was some kind of text-based standard for YUV images
[22:49] <teratorn> like there are for RGB
[22:49] <durandal_1707> there is, it just some codecs use different colors, so you use colormatrix then ....
[22:50] <llogan> i wonder if graphicsmagick is a memory hog too
[22:50] <durandal_1707> so you will get correct colors with mplayer2/mpv
[22:50] <teratorn> durandal_1707: there is? what?
[22:51] <durandal_1707> teratorn: different color spaces
[22:51] <durandal_1707> BT.709, BT.601, SMPTE-240M, FCC, ...
[22:52] <durandal_1707> it really depends on your source
[22:54] <durandal_1707> and i dunno if imagemagick viewer displays correct color
[22:55] <durandal_1707> it certainly does not have opengl output IIRC
[22:55] <durandal_1707> _if_ opengl is relevant at all in your scenarion...
[22:57] <teratorn> nah, i'm just debugging a thing that makes test frames
[22:57] <teratorn> and need to dump/view them
[22:57] <durandal_1707> but there is bunch of application that use lavc/lavf/swscale to display images ...
[00:00] --- Tue Feb 19 2013


More information about the Ffmpeg-devel-irc mailing list