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

burek burek021 at gmail.com
Tue Mar 11 02:05:01 CET 2014


[01:29] <lindenle> HI all i am getting invalid argument from av_interleaved_write_frame. What does that mean?
[01:43] <lindenle> Hello71: im using libavcodec i figured it out by looking at the source code
[02:36] <Jack64> what's the best way to create a video from images ? like image1 from 0:00:00.000 to 0:01:00.000, image2 from 0:01:00.000 to 0:01:30.000, etc losslessly from png images?
[02:36] <Jack64> image2 would actually start at 0:01:00.001 but who cares
[02:47] <braincracker> hello my friends
[02:47] <braincracker> can ffmpleg play .mid file?
[02:50] <Hello71> I https://encrypted.google.com/search?q=ffmpeg+midi
[02:50] <Hello71> https://encrypted.google.com/search?q=ffmpeg+midi
[02:50] <Hello71> ffmpeg is not a midi synthesizer.
[03:16] <klaxa> braincracker: you might want to try something like timidity or rosegarden
[03:21] <Jack64> klaxa: hey there
[03:21] <klaxa> hi
[03:23] <Jack64> so I tried using the script on other videos... still getting those damn duplicate frames where the stitching goes wrong :S I figured I'd do it right and convert the images to video and then overlay the video but I can't seem to find the command that tels me how to do it like image1 from 0:00:00.000 to 0:01:00.000, image2 from 0:01:00.001 to 0:01:30.000, etc losslessly from png images
[03:23] <Jack64> you got any ideas ?
[03:54] <klaxa> good point, no clue
[03:54] <klaxa> hmm...
[03:54] <klaxa> you could hack around it a little
[04:02] <braincracker> thanks, almost installed timidy
[06:57] <adyzx> guys running ffmpeg 0.8.6-4 in *nix terminal, deprecated version, but just wanting to hardcode subs onto .mp4 file. i'm I still safe in using this version for this particular task?
[08:03] <adyzx> how can i add libass to ffmpeg, even if its a deprecate version?
[08:03] <adyzx> *deprecated
[08:07] <JEEB> the binary you have at hand doesn't have the libass-based subtitling stuff (although even if you had a newer binary, the Libav project doesn't have that video filter), so you would have to build your own current ffmpeg from the FFmpeg's source code
[08:08] <JEEB> the libass-based video filter is kind of messy so I recommend that if you want to do simple hardcoding, it's better to build a video player called mpv that uses libav* on the background
[08:08] <JEEB> it would let you read the subtitles and fonts straight off a matroska file, for example
[08:08] <JEEB> instead of extracting it all first
[08:11] <adyzx> JEEB: ^ take it as with matroska, this applies to mp4 too
[08:11] <JEEB> pardon me?
[08:11] <JEEB> *I beg your pardon?
[08:13] <adyzx> JEEB: in your last response, you used matroska file as an example, what i meant to say this would also apply to an mp4 file (replace matroska file in your comment with mp4)
[08:14] <JEEB> that doesn't exactly work because mp4 files don't usually contain fonts or stylized subtitles :P
[08:14] <JEEB> the output can be mp4 just as fine as with ffmpeg
[08:14] <JEEB> it's just that in many cases people want to hardcode subtitles from a source that already has them, and the libass-based filter sure doesn't make that simple
[08:15] <adyzx> JEEB: problem is i'm working for with a beginning mp4 file and .srt subs file
[08:15] <JEEB> well that (in theory) should be as hard with either, I _think_ the current workflow of that filter will convert it to ASS internally and then render it
[08:16] <JEEB> I don't really use that filter because it's a mess, unfortunately :s (esp. since I see files with fonts and stylized subtitles multiplexed into matroska almost daily)
[08:18] <adyzx> JEEB: given your expertise, btw, newb in this video realm, your advice, given what i mentioned starting with .mp4 and .srt file, what's my best option to handle this?
[11:57] <wiretap1> Hi there, I have a xeon server (4cpu with 6 cores each= total 24 cores) and I want to use ffmpeg to catpure a TS stream from http link (local) and transcode it to libx264 with low cpu usage and good quality (not more than 1000kbits). input is 720x576i and i want to keep the same resolution. my target is to encode as many streams as possible by utilising all the cpu
[11:58] <wiretap1> any suggestions what to look out for?
[11:58] <wiretap1> now i am using this format
[11:59] <wiretap1> ffmpeg -i "http://127.0.0.1/stream.ts -acodec libmp3lame -ac 2 -ar 44100 -ab 128k -vcodec libx264 -crf 28.5 -r 25 -g 25 -vprofile High444 -level 3.1 -preset veryfast  -f flv "rtmp://192.168.1.1/stream1"
[12:00] <wiretap1> also i would like to know if deinterlacing is suggested and if it kills the cpu
[13:50] <jnvsor> Anyone know an ffmpeg 2.1 PPA for ubuntu users? The official PPA only goes to 0.7 :/
[13:51] <sacarasc> Just grab one of the static downloads.
[13:53] <jnvsor> Ooh, didn't know ffmpeg came in anything but source :P
[14:03] <Keshl> It also comes in a balanced breakfast. oÉo.
[15:49] <justMaku> hello
[15:50] <justMaku> Any idea how can I output ffmpeg to a stdout on linux?
[15:50] <justMaku> ffmpeg -i http://media.dev/TV/WeebTV/1246/stream -c:v libx264 -crf 23 -c:a libfaac -q:a 100 -f mp4 -
[15:50] <justMaku> unfortunatelly doesn't work for me
[15:50] <sacarasc> MP4 requires having the whole file to be able to be indexed. Use a different container.
[15:50] <justMaku> sacarasc: any idea which container should I use for html5 live streaming?
[15:50] <sacarasc> Nope.
[15:51] <sacarasc> There might be a streaming MP4 thing available in ffmpeg, but I don't know the name for the option.
[15:51] <sacarasc> (Sorry, llogan.)
[15:51] <sacarasc> From a little bit of googling, this might work: -f segment -segment_format mp4 -segment_time 10 -
[15:52] <sacarasc> But, I've never used them options, so they might not.
[16:08] <justMaku> sacarasc: thanks for help, i think movflags option should work too
[16:08] <justMaku> unfortunately osx binaries from homebrew project doesn't have that one
[16:08] <justMaku> need to compile ffmpeg by my own then
[16:10] <sacarasc> movflags would just wait until you have completed the file, then move the moov atom to the start.
[16:11] <sacarasc> It wouldn't output anything until the entire file had been finished.
[16:11] <justMaku> ah, okay
[16:11] <justMaku> -f segment doesn't work unfortunately
[16:11] <justMaku> :D
[16:12] <justMaku> sacarasc: using -f segment give me:
[16:12] <justMaku> Output file #0 does not contain any stream
[16:13] <sacarasc> Check the manual, I have never used it before, so I don't know what to do.
[18:27] <RenatoCRON> hello people. i'm using ffmpeg to record a ipcam, using -f mjpeg, and i'm getting timeout, i guess, after 100 seconds (or so) http://i.imgur.com/oGW14Pt.png
[18:27] <RenatoCRON> each squere is 20 secs
[18:27] <RenatoCRON> red= no file for this time.
[18:27] <RenatoCRON> command line is:
[18:28] <RenatoCRON> http://pastebin.com/raw.php?i=GQpRjUbS
[18:29] <RenatoCRON> I tried to add -loop 20 but it doest not 'reconnect'
[18:38] <klaxa> i have never used half of those arguments
[18:48] <RenatoCRON> I put a clock in front of it and i'm watching it now. it looks continuous, so no problem found. maybe this is on my side when I group by the files to show on screen. I will record for more 30mins
[18:48] <RenatoCRON> http://i.imgur.com/iidqdTn.png << pretty odd way to debug, but it works! haha
[19:21] <RenatoCRON> hey guys, now I know what is happing, but don't now how to solve.
[19:21] <RenatoCRON> happening*
[19:23] <RenatoCRON> in a 20 secs video, in video time 0, my clock marks '06:04', on 8 sec of the video, the clock is '06:16'. 16-4 = 12. this frame should only be on 12 second of the video!
[19:23] <RenatoCRON> I will provide this video for you
[19:28] <RenatoCRON> https://www.dropbox.com/s/gn1hql9ctaydqhk/what.mp4
[19:28] <RenatoCRON> let me try with use_wallclock_as_timestamps
[19:33] <RenatoCRON> looks fine now!
[22:01] <camspark> hello guys
[22:02] <camspark> i was wondering if anybody here could help me out, I'm trying to live stream from cent os using ffmpeg to youtube live and I'm getting 20 second delays, I tried messing around with all the settings and nothing seems to help even --tune zerolatency
[22:06] <JEEB> then something else is creating the latency. x264 with tune zerolatency most definitely should be within milliseconds by itself
[22:06] <JEEB> and I have no idea how good or bad ffmpeg is at being low latency
[22:08] <camspark> i could turn on teamviewer and you could take a look at my setup, perhaps you can spot something out of the ordinary
[22:09] <camspark> i thought it was something with youtube live, but twitch tv has the same delay
[22:09] <camspark> i know my upload speed on the vps is pretty good so it cant be a connection issue and im streaming like 10kb a second
[22:10] <camspark> very small area with like 256 colors and libfdk-aac sound
[22:10] <camspark> also compiled the latest ffmpeg from git and i've included everything (before i did the yum install ffmpeg old version) same delays no difference
[22:11] <camspark> here is what the configuration looks like
[22:11] <camspark> ffmpeg version git-2014-03-10-53eb4e0 Copyright (c) 2000-2014 the FFmpeg developers   built on Mar 10 2014 10:23:36 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)   configuration: --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libtheora --enable
[22:12] <camspark> --enable-postproc --enable-pthreads --enable-x11grab --enable-libpulse
[22:12] <camspark> perhaps this will hint you on to whats wrong, when I use --tune zerolatency, the stream fps drops from 30 to 3 or 4
[22:13] <JEEB> yes, zerolatency is actually slower than the same preset without it :P Although that sounds kind of lulzy. Anyways, I have no idea about ffmpeg and I only know that x264 itself can be quite low latency by itself
[22:14] <camspark> ya alright
[22:14] <camspark> i'll keep tweaking it around i guess
[22:14] <brontosaurusrex> low-latency should mean less options for multithreading i imagine
[22:15] <camspark> i also use preset ultrafast
[22:15] <brontosaurusrex> but don't quote me
[22:15] <JEEB> x264 switches from picture-based threading to slice-based
[22:15] <camspark> and  i used compression 51 and 0 both same delays
[22:15] <JEEB> which gives you pictures quicker
[22:15] <JEEB> (and is somewhat slower than picture-based threading
[22:15] <JEEB> anyways, just try calculating the latency locally first, possibly without libx264 even first :P
[22:15] <camspark> all i know i use VNC to that server and i get realtime desktop.. no delays at all and streaming gives me 20 second delays
[22:16] <JEEB> also make sure whatever you're testing the latency isn't just doing lulzy things as well
[22:16] <JEEB> in any case, I only know of x264, nothing else :P
[22:16] <camspark> I used  -f flv "/tmp/test.flv"     the file gets generated every second no problem and when i download it it has no problems
[22:17] <camspark> it something maybe with my udp? or whatever RTMP uses?
[22:18] <camspark> well i have to use libx264 thats what youtube recommands what should i try instead of that vcodec?
[22:20] <camspark> ill try rawvideo and report the findings
[22:23] <camspark> can't use rawvideo it can't even get me 1 second of a stream it just shuts off
[22:23] <camspark> frame=   11 fps=2.2 q=0.0 size=     339kB time=00:00:00.36 bitrate=756
[22:23] <camspark> bitrate=7561.5kbits/s
[22:23] <camspark> people were wondering how to get good bitrate this is the way to go
[22:25] <camspark> heres how my parameters look like guys
[22:25] <camspark>              -vcodec libx264 -qp $CONSTANT_RATE_FACTOR -preset $PRESET -profile:v baseline -g 250 -s $OUTRES \
[22:25] <camspark> CONSTANT_RATE_FACTOR="51"  OUTRES="426x240" PRESET="ultrafast"
[22:26] <camspark> i changed it from -cpr to -qp cause thats what fellow ffmpegers recommanded is a better compression overall
[22:27] <camspark> crf*
[22:28] <JEEB> if someone recommended -qp instead of -crf for libx264, they should be slapped :P
[22:28] <JEEB> constant quantizer should never be used, except for development purposes
[22:28] <JEEB> the only exception is when you want to do lossless compression
[22:29] <JEEB> which is crf or qp 0 with 8bit x264, and qp 0 with >8bit x264
[22:30] <dv_> crf is kind of a higher level option, right?
[22:30] <dv_> and qp applies to a lower level
[22:31] <camspark> the guy on the forum said that both options are identical in terms of compressing speed but that qp is better quality
[22:31] <JEEB> no
[22:31] <JEEB> unless he meant lossless with crf 0 or qp 0
[22:31] <JEEB> where it's exactly the same
[22:32] <JEEB> dv_, not... really. you are kind of right that ffmpeg/libavcodec has a generic option for constant quantizer encoding (since it's an older mode and available with pretty much everything), and crf is an encoder-specific option ("private option")
[22:32] <JEEB> but they all set the same way a rate control mode in libx264
[22:32] <dv_> oh hm. I recall 0-51 being the range of constant quantization in the encoding process
[22:32] <JEEB> yes, for 8bit H.264
[22:33] <dv_> so what is qp supposed to be then
[22:33] <JEEB> that's a setting to set that, yes
[22:33] <dv_> but qp is in the 0-69 range
[22:34] <JEEB> well the range can be higher because of 1) x264's "emergency mode" and 2) bit depth, for example 10bit has +12
[22:34] <dv_> oh right, forgot about the 10bit modes
[22:34] <camspark> all i know if u want good quality you use divx haha
[22:34] <JEEB> 51 + 12 = 63, plus emergency mode
[22:34] <JEEB> which probably is something like 69, yes
[22:35] <dv_> okay, so why is setting qp instead of crf a bad idea then?
[22:35] <JEEB> why would you take constant quantizers instead of actual rate control?
[22:35] <dv_> ah, see, thats what I meant. crf might end up setting the qp internally
[22:35] <JEEB> yes, naturally
[22:35] <JEEB> all rate control modes set quantizers for all pictures
[22:35] <dv_> so crf is kind of higher level :P
[22:35] <JEEB> uhh, yes and no
[22:36] <JEEB> constant quantizer mode just sets constant values for I,P,B slices
[22:36] <JEEB> ABR (CRF or 1pass bit rate) does variable quantizers depending on the calculations of the rate control mode (+ the slice type differences)
[22:37] <JEEB> and then 2pass does similar variable stuff with multiple passes to hit a specific average bit rate
[22:37] <JEEB> I'm talking in x264 terms of course, where 1pass ABR and CRF share a lot of code, except the other limits the bit rate and the other uses the rate factor value
[22:37] <dv_> hmm okay that makes sense
[22:37] <dv_> so what forum was that camspark?
[22:38] <dv_> doom9?
[22:41] <dv_> JEEB: oh speaking of h264, I have a question about number of pictures. I recall that thanks to frame reordering, a decoder might have to allocate up to 17 frames just to get enough room for all the B-frames etc. but I noticed that some decoders also require sometimes about 5 or 6 extra frames just to decode one
[22:41] <JEEB> I think the amount of maximum refs is either 15 or 16
[22:42] <dv_> I mean, 5 or 6 output frame buffers just to decode one. is this typical in decoders? do they need to use these extra buffers for temporary storage of something?
[22:42] <JEEB> and yes, decoders will usually only output pictures in the correct PTS order
[22:42] <JEEB> which is how libavcodec does it too
[22:42] <dv_> I noticed this in some hardware decoders where the buffer pool is allocated once, prior to playback, and do not allow reallocation afterwards
[22:42] <dv_> I had to add logic to ensure there are always at least 6 buffers free
[22:42] <JEEB> so you feed it pictures until you get your first decoded pictures
[22:43] <JEEB> and after that the pictures given out should be in the correct PTS-wise order
[22:43] <dv_> so this amount might be caused by the POC?
[22:44] <JEEB> isn't POC just something like the DTS?
[22:44] <dv_> hmm I am unsure
[22:44] <dv_> I am just trying to figure out how this amount (6 frames) can be explained
[22:45] <JEEB> in addition to the 15 or 16 pictures?
[22:45] <dv_> I didnt find anything in the spec. perhaps it is indeed hardware specific.
[22:45] <dv_> yes
[22:45] <JEEB> probably just random buffers if you're talking about hw decoding
[22:45] <dv_> before, I made sure at least one buffer is free (= available for decoding). but then, the hw dropped some frames.
[22:46] <dv_> and unfortunately, this part isnt documented
[22:46] <dv_> so I reserve 5+the minimum number indicated by the hw (which can be up to 16)
[22:46] <dv_> errr, 6+
[22:47] <JEEB> yeah, sounds like hw-specific stuff
[22:47] <dv_> yeah... I guess I'll have to live with this magic constant
[00:00] --- Tue Mar 11 2014


More information about the Ffmpeg-devel-irc mailing list