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

burek burek021 at gmail.com
Sat Jan 19 02:05:02 CET 2013


[01:05] <amaurea> Can it get the number of frames in a video stream without decoding all of it?
[01:06] <sacarasc> I believe that some containers put that info in the headers. But not all do.
[01:06] <pzich> if you pass just the input file with nothing else it should tell you what it can about the streams
[01:06] <pzich> I think
[01:07] <amaurea> where is that information available in the programming api, if the container provides it?
[01:07] <amaurea> somewhere in libavformat, I guess?
[01:08] <amaurea> (not storing the number of frames is very strange, I think. Like a picture format that does not store the number of pixels, only the intended display dimensions in cm or something)
[01:09] <sacarasc> MPEG2, for example, you can cut and paste bits together as if they were letters of a string...
[01:11] <amaurea> sacarasc: so the total duration is not available in mpeg2?
[01:12] <pzich> the weirdest thing is videos without a fixed pixel size, which digital broadcast TV uses
[01:12] <pzich> that or they're just abusing the MPEG2TS format
[01:12] <amaurea> i.e. videos vith varying resolution?
[01:12] <amaurea> I've seen that in the output from some emulators too
[01:12] <pzich> yeah, like when they splice an SD ad into an HD TV show
[01:16] <amaurea> Anyway, I'm writing a program that plays a video backwards by seeking to near the end, decoding some frames into a buffer, playing the buffer backwards, then seeking a bit earlier, and repeating. But I haven't found out how to get the list of the frames I can jump directly to yet.
[01:23] <beware> can i find out if an existing xvid avi file uses features like qpel, GMC, etc?
[03:40] <p4plus2> Is there any way to pause an ffmpeg desktop recording or would I have to stop it and splice together the videos at a later point?  I attempted "killall -STOP ffmpeg" abd "killall -CONT ffmpeg" which kinda works but that doesn't provide a good pause creating lots of sounds artifacts and cutoff sound.
[04:40] <burek> p4plus2 there is no pause/resume feature in ffmpeg
[05:15] <p4plus2> (19:42:42) burek: p4plus2 there is no pause/resume feature in ffmpeg
[05:15] <p4plus2> ah well, shouldn't be hard to make a script to fake it by setting up "sessions" which splice together all parts on the final stop
[08:53] <Zeeflo> i dont quite get the documentation for setting the PlayResX and PlayResY
[08:53] <Zeeflo> can someone explain it to me?
[08:54] <Zeeflo> Also, would I need a -preset when I define  -b:v 1200k -maxrate 1200k -bufsize 2400k ?
[09:04] <viric> Zeeflo: preset only determines how much cpu will you dedicate to the encoding
[09:04] <viric> no?
[09:04] <viric> (at least in x264)
[09:17] <Zeeflo> oko
[10:30] <studybot_> hi
[10:30] <studybot_> how can I encode a pcm data to for example mp3?
[10:47] <zap0> just do it.
[11:16] <retard> studybot_: PRES BUTAN
[11:22] <studybot_> well
[11:22] <studybot_> i found the command to do it
[12:37] <juha__> what is the correct way to convert h264 video from 59 fps to half/ 25 xvid to make it compatible with mpeg4 dvd player?? I made a conversion and it seems that the player can't handle 59 fps
[12:37] <juha__> as it plays too slowly
[12:38] <durandal_1707> -framerate ?
[12:39] <juha__> that does nothing, it fails
[12:39] <juha__> even setpts filter fails
[12:53] <klaxa> -r ?
[12:58] <juha__> i'll try it now if it works..
[12:59] <juha__> yes it works now
[13:02] <juha__> i had tried to convert it from a faulty file..  it wasnt a good idea to convert from mkv container to avi
[13:02] <juha__> it lost some frame information
[13:03] <Marcin_PL> Hello& I can't find, with what was the option -cpq replaced.
[13:03] <Marcin_PL> -cqp ofcourse
[13:06] <Marcin_PL> I'm using that with x64 codec
[13:07] <Marcin_PL> omg. x264.
[13:10] <JEEB> cqp?
[13:10] <JEEB> I don't think there ever was such a setting with x264
[13:10] <JEEB> -crf for constant rate factor (closest thing we have to 'constant quality')
[13:12] <Marcin_PL> Well, OK, let me paste my old line
[13:12] <Marcin_PL> from a script
[13:13] <Marcin_PL> ffmpeg -i src_$1.avi -an -vcodec libx264 -cqp 27 -preset veryfast tmp_$1.avi
[13:14] <Marcin_PL> That worked well& Now I got errror unrecognized option.
[13:14] <JEEB> I have an idea what that might be, but I'm not really sure why you would use that
[13:14] <JEEB> as the only reason constant quantizer should be used is for a) lossless encoding (qp 0) or b) for development purposes (I don't think you are a developer for x264)
[13:15] <Marcin_PL> Naah, lol
[13:15] <JEEB> end users should use either bit rate based, or crf. qp is a very dumb rate control system
[13:15] <JEEB> in your case I would guess crf should be good
[13:16] <JEEB> also avi output with H.264 makes me cringe
[13:16] <JEEB> because I'm pretty sure that veryfast still has b-frames
[13:16] <Marcin_PL> I'm using that on poor cpu (intel nano), and I got encode fast at possibly good quality and litthe size, to up via 3G modem to youtube
[13:16] <Marcin_PL> outdoor :)
[13:17] <JEEB> anyways, you probably want to use mkv or mp4 container for the encode, and crf is what you want. You'll probably have to test different numbers with it though
[13:17] <Marcin_PL> Maybe it's a way
[13:17] <Marcin_PL> But I used avi for now
[13:18] <JEEB> well, avi just doesn't handle b-frames correctly
[13:18] <JEEB> that's all
[13:18] <divVerent> basically
[13:18] <divVerent> to explain it somewhat differently
[13:18] <divVerent> CRF is closer to "constant quality" than constant QP is
[13:18] <JEEB> it's the closest we have to that, as far as I know
[13:19] <divVerent> QP merely stands for quantization parameter, which could as well be "anything"
[13:19] <Marcin_PL> OK, so maybe You can propose to me some other codecs? At src i got MJPEG+PCMs16le
[13:19] <divVerent> it rather defines "roughly" how much data is lost at an intermediate step of encoding
[13:19] <JEEB> Marcin_PL, just use -crf instead of -cqp
[13:19] <JEEB> and find a nice number
[13:19] <divVerent> but there are scenes where losing a lot data is ok, and there are scenes where not much can be freely lost - and deciding this is the task of a good codec
[13:19] <JEEB> and try switching to f.ex. mkv
[13:19] <divVerent> and basically CRF is one way to try doing this
[13:20] <divVerent> basically, it's unfortunate that "quality" starts with Q too... so people assumed a constant QP means constant quality :P
[13:22] <divVerent> the rough idea of CRF's scale was "CRF value N means roughly the same output file size as fixed QP N, but with quantization parameters redistributed among frames in a way yielding higher quality"
[13:22] <divVerent> but it's really just rough and depends a lot on the input
[13:23] <Marcin_PL> Yes, I'd rather want constant quality than large pixels on quick moves or huge file at static scene
[13:23] <divVerent> then CRF is what you want
[13:23] <Marcin_PL> co cbr/cfr i guess is wrong for me.
[13:23] <Marcin_PL> Oh?
[13:23] <divVerent> constant bitrate yields those large pixels
[13:23] <divVerent> that's what you do NOT want
[13:23] <Marcin_PL> Well then, OK& What should I use for ancoding? x264 is good?
[13:24] <divVerent> in fact, CRF quite likely can even use a LOWER QP (thus higher accuracy) in your fast moving frames, depending on the input
[13:24] <divVerent> x264 is the best we have
[13:24] <divVerent> so yes
[13:25] <Marcin_PL> And the container?
[13:25] <divVerent> what do you want to play it on?
[13:26] <divVerent> on PCs or other devices too?
[13:27] <divVerent> for PC only, use MKV, it's the probably most flexible container, also supports subtitles and such stuff properly
[13:27] <Marcin_PL> PC. And upload to youtube
[13:27] <divVerent> mkv it is, then
[13:27] <divVerent> for reference, if you want to play it on e.g. iPhone/iPad, MP4 would have been your only choice
[13:28] <Marcin_PL> I understand
[13:29] <Marcin_PL> But mp4 as a container may be OK for all use, right?
[13:29] <divVerent> if you don't need to e.g. embed text subtitles, or freeform metadata, or attachments, or such stuff - sure
[13:29] <divVerent> but beware, MP4 is basically Quicktime, and Quicktime stinks ;)
[13:30] <divVerent> also, mp4's main catch is that you have only a small choice of audio codecs to pick from
[13:30] <divVerent> while mkv supports basically everything, even flac if you really want it
[13:32] <Marcin_PL> ok, I'm switching to x264+mp3 at mkv&
[13:32] <divVerent> that'll work, yes
[13:32] <Marcin_PL> What about that video constant quality then?
[13:32] <divVerent> crf will do what you want
[13:34] <Marcin_PL> OK, so let's summary: ffmpeg -i src_$1.avi -an -vcodec libx264 -crf 27 -preset veryfast tmp_$1.mkv
[13:35] <Marcin_PL> I'll test with different crf
[13:35] <divVerent> sure, that looks good... except that you turned off audio for now
[13:35] <Marcin_PL> And I prefer use acodec copy later to mux with lame-based mp3
[13:35] <divVerent> why? ffmpeg can use lame too
[13:35] <divVerent> the libmp3lame codec in ffmpeg is basically identical to LAME's output
[13:36] <divVerent> if you compiled it in, that is
[13:36] <Marcin_PL> In theory&
[13:36] <divVerent> in practice too
[13:36] <divVerent> they use the same code
[13:36] <divVerent> it just may sometimes be tricky to map the options from LAME to ffmpeg
[13:36] <Marcin_PL> I'm using lame --preset medium $1.wav $1.mp3
[13:37] <Marcin_PL> And that's the point I think, and that's a half minute more to encode
[13:37] <divVerent> haha, exactly --preset is currently not supported by ffmpeg for LAME :P
[13:37] <Marcin_PL> :)
[13:37] <divVerent> so you'd have to figure out which options --preset medium implies
[13:37] <Marcin_PL> So I'm doing that in a script :)
[13:37] <divVerent> sure, you already have the script, so it's good :P
[13:37] <Marcin_PL> Easier is do like that, and easier it will be to switch to aac e.g.
[14:30] <Marcin_PL> I tested it out, at crf 27 I got 10x compession and quite goot quality, i'll test that parameter out more. Big thanks for input.
[14:47] <StaRetji> Howdy folks. I've a problem which I think someone here can help me solve. I have a folder with video files and I've made a script to load one after another and encode to flash rtmp server (make live stream from multiple video files). However, I have problem, ffmpeg encoding stops on each video file change.
[14:49] <StaRetji> I understand why, it stops, then after it loads video2.mp4 it resumes encoding to rtmp server, but this is enough to break playing on xbmc :/
[14:49] <StaRetji> so, is there a way to force ffmpeg to encode to rtmp and do not stop, no matter what?
[14:49] <sanaris> You want concatenate files in stream? There is whole man in docs, with variants
[14:50] <StaRetji> yes!
[14:50] <StaRetji> I read ffmpeg concate, but not sure if I understand it
[14:51] <StaRetji> ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2] concat=n=3:v=1:a=2 [v] [a1] [a2]' -map '[v]' -map '[a1]' -map '[a2]' output.mkv
[14:55] <StaRetji> I dont understand what is this lol, I was hoping to work like: for i in videos/*/*.avi; do concat -f flv rtmp://10.0.1.1/live/video
[14:58] <sanaris> solution to interrupts lies somewhere in streaming software
[14:59] <StaRetji> ehm
[14:59] <StaRetji> okay :D
[15:01] <sanaris> 'pause' things are provided by many streaming utils, just save time 'n' quality dont recode where is no much need))
[15:01] <StaRetji> well, here problem is, that on input when video changes, encoding stops
[15:02] <StaRetji> so, streaming stops, and receiving stops also
[15:02] <StaRetji> I will play with concat, thx sanaris
[15:05] <sanaris> then You will need some 'new funny opening' or voice from another ip..
[15:05] <sanaris> broadcasting client + server
[15:09] <StaRetji> btw, how to prevent audio/video out of sync? I've tried -async, but nothing changes. Input stream goes out of sync after several hours. Any suggestions?
[15:44] <stulluk> Hi, how to transcode an MKV file ( h264 video, ac3 audio) into TS file ( h264 video, AC3 audio) ? I mean, just changing container, no transcoding, by using ffmpeg ?
[15:45] <juanmabc> -vcodec copy -acodec copy
[15:45] <stulluk> Is that possible on 216Mhz Arm Cpu? Is this enough speed?
[15:46] <juanmabc> copy would be the less intensive of operations
[15:46] <juanmabc> i.e. try it yourself, i guess
[16:03] <juha__> im trying to encode h264 mkv to xvid avi and ffmpeg fails at same position everytime with error [matroska,webm @ 0x1ff8720] Read error at pos.
[16:03] <sacarasc> Is the file complete?
[16:03] <juha__> no
[16:03] <juha__> yes yes it is
[16:03] <juha__> it plays well in vlc
[16:04] <juha__> but ffmpeg fails always at that same position
[16:05] <juha__> is it possible to skip the errors and just continue?
[16:29] <afm> morning all&. compiling the latest git ffmpeg& ran into an issue with librtmp&  http://pastebin.com/Tddacwam
[16:36] <durandal_1707> afm: and where is config.log?
[16:36] <afm> will add& stby
[16:40] <afm> updated	http://pastebin.com/ds13xrAb
[16:43] <grepper> afm: do you have the development package of librtemp installed ?  librtmp-dev or somesuch ?
[16:43] <afm> neg just the git rtmpdump
[16:44] <durandal_1707> afm: you have librtmp.pc?
[16:45] <durandal_1707> what "pkg-config --libs --cflags librtmp" gives you?
[16:46] <afm> Perhaps you should add the directory containing `librtmp.pc'&.. found in /usr/local/lib/pkgconfig/librtmp.pc
[16:47] <afm> looking for how to add& thanks
[16:53] <afm> score!  thank you for the help
[17:06] <simonpatapon> hi guys
[17:06] <simonpatapon> i'm trying to capture my webcam with avconf and would like to know hot to set autofocus and if I can zoom
[17:11] <Mavrik> that's not something you set in ffmpeg :)
[17:14] <simonpatapon> ok i'll look in the v4l chan
[17:14] <simonpatapon> thx!!!
[17:41] <tekzilla> any documentation on the pattern matching for the input filename(s) ?
[17:42] <tekzilla> is the %..d notation printf-like ?
[17:55] <cbsrobot> tekzilla: yes
[17:55] <durandal_1707> tekzilla: AFAIK pattern matching is for image2 demuxer only any other just use your shell
[18:02] <beastd> tekzilla: as others said -- docs for image2 are here http://ffmpeg.org/ffmpeg-formats.html#image2-1
[18:05] <tekzilla> ah ok great, thanks everyone
[18:07] <beastd> tekzilla: you are just curious? or you have a use case?
[18:11] <tekzilla> beastd: i'm using it to compile a bunch of frame images from cctv cameras into a video stream
[18:12] <beastd> tekzilla: ah nice. then image2 to should be good for you, right?
[18:12] <beastd> tekzilla: do you use glob pattern or printf-like pattern now?
[18:14] <tekzilla> beastd: yes image2 seems to be what i need
[18:15] <tekzilla> using a printf-like pattern, when using a glob like *-capture.jpg i got a segfault!
[18:16] <tekzilla> or even with *.jpg..
[18:16] <beastd> tekzilla: huh? which ffmpeg version? also did you escape your glob pattern properly like \*-capture.jpg?
[18:16] <tekzilla> well no i didnt, guess there was my problem then
[18:17] <tekzilla> 0.8.4-6:0.8.4-1
[18:17] <beastd> depends can you try if it works with proper escaping? (you need the glob chars to get through to ffmpeg, if you don't escape them they will be expanded by your shell)
[18:20] <tekzilla> mh when i escape the asterisk, it doesnt seem to match
[18:22] <beastd> tekzilla: what is ffmpeg saying as error.
[18:22] <cbsrobot> tekzilla: are you on ubuntu ?
[18:22] <beastd> tekzilla: OMG. i think there is trouble waiting for us
[18:22] <tekzilla> it just returns to the shell immediately because it doesnt seem to match any files to process
[18:22] <tekzilla> cbsrobot: debian
[18:22] <beastd> i guess you don't have ffmpeg installed at all :(
[18:23] <tekzilla> ah ok its some bastardized version ?
[18:23] <beastd> tekzilla: can you post the output of your command on pastebin?
[18:23] <cbsrobot> tekzilla: you can read about it ^
[18:25] <beastd> tekzilla: also look if you can get FFmpeg: http://ffmpeg.org/download.html#LinuxBuilds
[18:27] <tekzilla> ok thanks for clearing that up! if i invole it without args i also get the notice about the switch to avconv
[18:27] <elbeardmorez> hi can ffmpeg process mpeg-ps / vcds ? i'm just looking for stream info. mplayer copes  (though only with a track number explicitly specified). do i need to rip the track from the disc?
[18:28] <beastd> tekzilla: that is a shameless scam by libav people.
[18:28] <tekzilla> i`ll have to read some more about to find out if this is actually a bad thing, or if there are any deb repos with the actual ffmpeg so i dont have to maintain it by hand
[18:28] <beastd> FFmpeg is actively developed
[18:29] <beastd> tekzilla: We have problems getting near Debian because a developer of the forked ffmpeg version is also debian developer responsible for many debian multimedia packages including ffmpeg previously
[18:31] <tekzilla> yeah it sounds like a big mess and the fork seems rather pointless :/
[18:33] <beastd> tekzilla: it is especially messy because the fork did not rename their libs (instead they named even named the fork after the common stem of the libs). so now it is even technically difficult to provide e.g.  debian ffmpeg packages let alone political issues.
[18:35] <LukeL> gd forkers
[18:43] <mgeary> hi folks
[18:44] <mgeary> i've captured some .dv files from a MiniDV camera with iMovie, and i am hoping to convert them to mp4 with ffmpeg. FFmpg gave me this message when i started: "Incompatible pixel format 'yuv411p' for codec 'libx264', auto-selecting format 'yuv422p'"
[18:44] <mgeary> and my resulting file had audio, but the video was completely black
[18:45] <mgeary> any suggestions?
[18:45] <durandal_1707> mgeary: you play file in what player?
[18:45] <mgeary> QT pro
[18:46] <durandal_1707> than use yuv420p
[18:49] <mgeary> durandal_1707: that's not in my -formats list
[18:49] <mgeary> i have "yuv4mpegpipe"...?
[18:50] <mgeary> are you saying use it like this: ffmpeg -i in.dv -vcodec yuv420p out.mp4 ?
[18:52] <durandal_1707> yuv420p is pixel format
[18:52] <mgeary> so&? can you give me a sample ffmpeg command?
[18:53] <durandal_1707> add -pix_fmt yuv420p
[18:53] <durandal_1707> because qt pro plays only h264 with that pix fmt
[18:53] <mgeary> ah
[18:53] <mgeary> ok
[18:53] <mgeary> trying that now. thank you
[18:54] <durandal_1707> IIRC this is in FAQ
[18:54] <tekzilla> beastd: hmpf, sounds like theres no easy way to a clean ffmpeg install then.. i dont fancy compiling all the dependencies, not using ffmpeg that much
[18:55] <tekzilla> but thanks for pointing me to this whole issue
[18:55] <tekzilla> as lazy as i am i might just wait it out.. we'll see after some reading :)
[19:00] <beastd> tekzilla: waiting it out can go a long way. the fork started in early 2011...
[19:03] <beastd> tekzilla: on which linux distro are you? also ffmpeg does not have many deps so building should be really straight forward! anyway you can have a look at our wiki, where you will find compilation guides amongst many more things.
[19:24] <viric> Some JVC camcorders say to have "DSC Function"
[19:24] <viric> Can anyone guess what can be that about?
[19:31] <teratorn> viric: I think that might be the feature that lets it act as a digital camera
[19:31] <teratorn> for still shots?
[19:36] <viric> Ahh
[19:36] <viric> umh may be
[21:36] <amaurea> Can I use avformat_seek_file to do frame-accurate seeks by setting min_ts and max_ts to the same number?
[21:40] <amaurea> also, is there a way to get a full list of the frames one can seek efficiently to?
[00:00] --- Sat Jan 19 2013


More information about the Ffmpeg-devel-irc mailing list