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

burek burek021 at gmail.com
Mon May 12 02:05:01 CEST 2014

[00:32] <aolin> does anyone know about ffmpeg generated videos playing too slow on QuickTime, but VLC plays just fine
[00:33] <aolin> I'm transcoding a video shot with mobile phone h264 -> mpeg4
[00:33] <aolin> tried ffmpeg 1.2.6, 2.2.2 and same effect. does not happen with all videos, only 50% of them
[00:34] <aolin> also the audio plays normal speed, but video too slow
[00:35] <c_14> Does it happen deterministically with an input video?
[00:35] <aolin> yes, for certain videos this always happens
[00:36] <c_14> Does ffplay play them fine?
[00:36] <aolin> I would think so as VLC plays them just fine
[00:36] <c_14> vlc might do weird magic, if ffplay plays it fine, the fault is most likely with quicktime
[00:39] <aolin> problem is that I'm developing software that does transcoding, so I'm trying to find a workaround for the quicktime problem. The source video plays just fine on all players, but after transcoding with FFmpeg the problem appears for certain videos
[00:39] <aolin> https://www.dropbox.com/s/rj27edwgfutl0xk/output2.mp4 so here's an example of the problem
[00:45] <c_14> Could you paste the command line you use to encode?
[00:46] <aolin> ffmpeg -i ../videotest/Original-RC_20140502_1612.mp4 -vcodec mpeg4 -strict -2 ../videotest/output2.mp4
[00:48] <aolin> https://www.dropbox.com/s/t615jpoh4p52uei/Original-RC_20140502_1612.mp4 here's the original video
[00:49] <aolin> my software does much more complicated thing through filtering, but I've narrowed the problem down to that
[00:51] <aolin> for me it looks like quicktime is delaying the playback for a reason or another
[00:52] <c_14> Is it adding an offset to the video or actually playing it at a lower fps?
[00:52] <aolin> lower fps
[00:52] <aolin> it's slowmotion but audio plays ok
[00:53] <aolin> so half of the video is video too slow normal audio, and then audio runs out it's only the slowmotion video for rest
[00:54] <aolin> there's a degree of jerkiness in the video, but cannot describe it more
[00:54] <c_14> I can't find anything wrong with the files in question, so I'm probably going to lay the blame on quicktime. What you can try doing is downscaling the video and seeing if that will work, use a different player, or try switching codecs.
[00:57] <aolin> I was thinking using the h263p codec, but ffmpeg only allows mkv container for that, so cannot play that with quicktime anyways
[00:57] <aolin> I'm out of options as I need LGPL codec
[00:57] <aolin> that is widely supported
[00:59] <aolin> if I upload a video that works on my players, would you be able to see what's different with them ?
[00:59] <aolin> because it's rather peculiar that some devices produce video that works after ffmpeg and some videos that doesn't
[01:02] <c_14> I'm not sure I'll be able to see what's different, but I might be able to cross of things it can't be.
[01:04] <c_14> Question, are all the functional videos coming from one source and all the non-functional videos coming from a different source or does a source sometimes create working videos and sometimes create broken videos.
[01:04] <c_14> (In this context broken means that quicktime has issues playing them after encoding with ffmpeg)
[01:05] <iive> one blind guess. maybe interlace is involved?
[01:05] <aolin> looks like videos created on device x always work and device y never work.
[01:05] <c_14> Maybe give a source video from device y
[01:06] <c_14> Or was the one you uploaded from y?
[01:06] <aolin> https://www.dropbox.com/s/t615jpoh4p52uei/Original-RC_20140502_1612.mp4 this is the source video
[01:06] <aolin> I have another, completely different type of camera that has same problem (a Liquid Image action camera)
[01:08] <c_14> According to idet, the source looks progressive so I don't think it's that.
[01:11] <aolin> https://www.dropbox.com/s/6kqo0nw0u5m2dlv/output3.mp4 here's a clip that works on quicktime
[01:15] <iive> you may try playing with -vsync
[01:15] <c_14> The only major difference I can see is that output3.mp4 has 14.92fps while output2.mp4 has 29.83fps.
[01:17] <aolin> hmm, that's little bit weird
[01:17] <c_14> I'm mostly out of ideas, but you could try taking a video from source y and dropping the framerate to 14.92 in the output just to see what happens.
[01:22] <aolin> the videos seem to playback fine when the fps is dropped below 15
[01:22] <aolin> not sure what that means
[01:22] <c_14> top kek
[01:22] <c_14> Quicktime being awesome?
[01:22] <aolin> but I do have some clips at 30 that work just fine
[01:23] <c_14> With the same codec?
[01:23] <aolin> yep same method
[01:25] <aolin> Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, 11995 kb/s, -3.68 fps, 30 tbr, 90k tbn, 180k tbc (default)
[01:25] <aolin> thats the input video, -3.68 fps ?
[01:26] <aolin> that works
[01:26] <aolin> Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080, 16965 kb/s, SAR 65536:65536 DAR 16:9, 29.79 fps, 29.83 tbr, 90k tbn, 180k tbc (default)
[01:26] <aolin> this doesn't
[01:26] <iive> -3.68 fps ?!
[01:26] <c_14> Why is the framerate negative?
[01:26] <klaxa> fuck logic?
[01:27] <aolin> I'll try 2.2.2 if it says the same
[01:27] <iive> use 2.2.2 or latest git master.
[01:28] <aolin> yep it's the same
[01:28] <aolin> I was testing with 1.2.6 to see if this was a late bug and forgot to change back
[01:33] <iive> hum, -debug_ts is in the manual, but 2.2.2 complains about it?!
[01:34] <iive> it works with ffmpeg, but not ffplay. Ok.
[01:38] <aolin>     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 10965 kb/s, 5.30 fps, 59.94 tbr, 90k tbn, 119.88 tbc
[01:38] <aolin> ^input
[01:38] <aolin>     Stream #0:0(eng): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60k tbn, 59.94 tbc (default)
[01:38] <aolin> ^output
[01:39] <aolin> I'm wondering about those tbn/tbc
[01:43] <aolin> the videos that work, have integers as those values. the videos that do not work have floats
[01:44] <aolin> might be coincidense, but seems suspicious
[01:47] <iive> aolin: try different -vsync modes.
[01:48] <aolin> iive: ok
[01:48] <iive> 0 then 1 then 2
[01:52] <aolin> doesn't seem to affect at all
[01:55] <iive> try -copyts -vsync 0
[01:56] <iive> you probably need to talk with somebody that knows (de)muxers and mp4 is particular.
[01:57] <iive> but guessing why QT doesn't like something is tricky thing.
[01:58] <iive> the sample seems to skip a frame here and there. this probably makes the fps non-integer. afaik mp4 is vfr format, so it shouldn't be issue.
[02:02] <aolin> the first sample doesn't work with vsync 0 "Invalid pts (541) <= last (541)", but my 60fps video was not fixed with that
[02:02] <aolin> tried the copyts
[02:08] <aolin> iive & c_14, thanks for support, I really appreciate it! too bad there's no obvious workaround for this ...
[02:09] <aolin> I'm out of ideas and energy :)
[02:10] <iive> maybe michaelni might have an idea. But once again... it is probably more a question of finding bugs in QT.
[02:15] <aolin> ok, I'll hang around and see if anyone can guide me to new directions
[02:17] <aolin> too bad I don't know anyone even somewhat close apple, I'm sure it would be nearly impossible to have them try those samples without knowing anyone
[02:48] <iive> aolin: btw, you may try ffmbc .it is an older and less popular fork, but the author is expert in mp4 and broadcast stuff.
[02:48] <iive> just for the test.
[02:49] <iive> afaik it is actively developed, but it doesn't merge libav and new ffmpeg stuff.
[05:42] <ParkerR> Does something like "ffmpeg -i input.ts -vcodec copy -acodec copy output.mp4" actually convert to an mp4 codec or just changes container?
[05:43] <ParkerR> Ahh just tested it. It doesnt.
[05:56] <BtbN> there is no such thing as an "mp4 codec"
[06:08] <ParkerR> Well libx264
[06:08] <ParkerR> I understand mp4 is just another container
[06:09] <ParkerR> But generally it contains an h264 stream
[06:26] <HD|Laptop> hi all
[06:26] <HD|Laptop> omxplayer for raspberry pi uses ffmpeg as backend, and I have a problem with it...or more so, two
[06:27] <HD|Laptop> 1) ffmpeg doesnt support direct playing of a HTTP Live Stream/HLS stream
[06:27] <HD|Laptop> so I decided to write an "assembler" script which just pipes the individual segments into a FIFO and plays with omxplayer pipe:0 for stdin piping or /tmp/fifo with a real fifo
[06:27] <ParkerR> HD|Laptop, it doesnt use ffmpeg as a backend. It renders the video directly on the GPU
[06:28] <ParkerR> And omxplayer plays internat content just fine
[06:28] <HD|Laptop> problem is, once the buffer runs empty once, omxplayer quits
[06:28] <HD|Laptop> ParkerR: huh? for what does omxplayer depend on ffmpeg then? there
[06:28] <HD|Laptop> 's no streaming-related content anywhere in the omxplayer souce
[06:28] <ParkerR> I dudnt remember it depending on it. Lemme look
[06:28] <ParkerR> *didn't
[06:29] <HD|Laptop> if i read the docs and google correctly, it uses ffmpeg for fetching and decoding anything thats not h264
[06:30] <ParkerR> Hmm ok I see it does. Umm, I don't think it does any transcoding in that regard. It will only play whatever formats the Pi supports (h.264, mpeg2, VC1, and one more...)
[06:31] <ParkerR> HD|Laptop, I've been able to supply the raw URL from a youtube video and it plays just fine
[06:31] <HD|Laptop> ParkerR: yes this works fine, the problem is that HLS is playlist based
[06:32] <HD|Laptop> the "master" file is just a index file, ffmpeg must periodically reload it to get the newest available snippets and then enqueue them
[06:32] <HD|Laptop> ParkerR: also ffmpeg apparently doesnt support PLS/m3u-based web radios, I have to supply it with the direct stream url
[06:32] <ParkerR> Heh, I think thats where Im out. Good luck on finding a solution.
[06:33] <ParkerR> Bit beyond what I know
[06:34] <ParkerR> HD|Laptop, I've always thought of ffmpeg as just transcoding. Never even thought about it being a rednerer of sorts
[06:34] <ParkerR> *renderer
[06:35] <ParkerR> HD|Laptop, isn't that why other applications are created as wrappers? mplayer for playlist parsing for example
[06:35] <HD|Laptop> ParkerR: yeah the problem is that the coupling behind omxplayer and ffmpeg is too deep
[06:35] <ParkerR> Understandable
[06:36] <HD|Laptop> if one could use the omxplayer acceleration on vlc, mplayer or whatever i'd be totally fine with that
[06:36] <ParkerR> I think I saw some work of direct to GPU VLC on the Pi
[06:36] <ParkerR> http://intensecode.blogspot.com/2013/10/tutorial-vlc-with-hardware-acceleration.html
[06:37] <ParkerR> ./configure --enable-rpi-omxil --enable-dvbpsi
[06:37] <ParkerR>                   --enable-x264 <other_modules_you_might_need>
[06:37] <ParkerR> So apparently that does use omxplayer in a way
[06:37] <ParkerR> Well the omx libraries
[06:38] <HD|Laptop> hmm interesting but vlc is a fucking big app, i guess it would take days for a compile
[06:38] <ParkerR> HD|Laptop, another bit more complicated way would be a script to parse out the stream URL then pass to omxplayer with window arguments
[06:38] <ParkerR> It's able to render fullscreen or even just set X Y coordinates
[06:38] <HD|Laptop> ParkerR: that works for the radio stuff but not for HLS
[06:39] <HD|Laptop> you see, HLS is quite a complex thing actually. you have individual snippets, usually 10sec or so, packed in MPEG TS
[06:39] <ParkerR> --win "x1 y1 x2 y2"       Set position of video window
[06:39] <HD|Laptop> a HLS renderer is supposed to reload the HLS index file every X seconds, X being the snippet duration
[06:39] <ParkerR> HD|Laptop, ogod mpeg ts. Im dealing with deinterlacing some recorded tv as we speak haha
[06:40] <HD|Laptop> and then enqueue the snippets it doesnt already have in a playlist...which is played sequentially
[06:40] <HD|Laptop> ParkerR: just for transport, the codecs used dont matter
[06:40] <ParkerR> Aye
[06:40] <[mbm]> thought it only reloaded the index if you marked the event as live
[06:41] <HD|Laptop> [mbm]: that would be a normal playlist, HLS is by definition live ;)
[06:41] <HD|Laptop> but well at least an option for ffmpeg not to exit if the read-buffer runs empty would be cool
[06:41] <ParkerR> Currently running the first pass on a TV episode. ffmpeg -i vlc-record.ts -pass 1 -vf yadif=1 -vcodec libx264 -acodec copy put.mp4
[06:43] Action: [mbm] played with hls for a few days before determining it didn't fit what I needed
[06:44] <ParkerR> It's like "Yay I have some HD OTA content recorded" "Crap it's 1080i *assembles some ffmpeg code*"
[06:44] <HD|Laptop> its quite cool actually, especially for distribution - i can supply ten "big" PCs with one HLS stream
[06:44] <[mbm]> technically HLS isn't "live" it's delayed by whatever your segment length is
[06:44] <HD|Laptop> no more running ten RTMP streams (with the needed bandwidth!), just a squid proxy for the individual segments :)
[06:45] <HD|Laptop> the problem is that a rpi isnt as powerful as a real pc ;)
[06:45] <HD|Laptop> [mbm]: yeah, thats right - but only a problem with soccer matches imho
[06:46] <ParkerR> Why would only one sport be the problem...
[06:46] <[mbm]> HD|Laptop: well, problem was I couldn't take a stream that was actually live and convert it to HLS
[06:47] <HD|Laptop> huh, iirc ffserver should be able to output a HLS stream
[06:49] <[mbm]> what I mean is that I had a device that you could go to http://server/url?duration=10 and it'd give you an actual live stream, duration specified as 10 seconds
[06:50] <[mbm]> in theory I could put that url into an HLS index/playlist
[06:50] <[mbm]> but in practice it doesn't work so well
[06:52] <[mbm]> being an actual live stream it took 10 seconds for the player to download the segment and then the player would disconnect and reconnect to request another
[06:52] <[mbm]> which resulted in either a gap between or an overlap
[06:53] <[mbm]> basically the only way HLS actually works is if you buffer to a disk, and then you're delayed by whatever your length is
[06:54] <[mbm]> </useless trivia>
[06:57] <HD|Laptop> [mbm]: yeah that is what i tried to do using a fifo (a real file would kill the SD card in days, also it needs 360MB/h of free space)
[06:57] <HD|Laptop> but the problem is, it may work fine, but if you hit the buffer end only *once* ffmpeg stops reading and exits :(
[06:58] <HD|Laptop> I tried the "http dump" option too, but both apache and nginx couldn't handle the php script :/
[06:58] <[mbm]> I then tried to cheat and created an m3u8 with only a single entry of infinite length, the player didn't like that much ;)
[06:59] <HD|Laptop> [mbm]: :D second problem is that omxplayer cant do playlists at all
[07:56] <HD|Laptop> what the actual fuck is ffmpeg doing when attempting to play a http provided video file?!
[07:56] <HD|Laptop> first, it opens four(!) simultaneous connections in GET mode and not HEAD
[07:56] <HD|Laptop> second, why doesn't it obey the (missing) content-length and fetch until the socket is closed?
[07:58] <[mbm]> heh
[07:59] <HD|Laptop> I could accept two HTTP connections - first a HEAD to see if the stream/file is available, but why *four*?!
[07:59] <[mbm]> what's your video source?
[08:00] <HD|Laptop> the video source is raw MPEG TS
[08:00] <[mbm]> from an hdhomerun?
[08:00] <HD|Laptop> nope, HTTP HLS from a tv station
[08:00] <HD|Laptop> 10-sec snippets
[08:01] <HD|Laptop> the HTTP requests are all equal... with User-Agent: Lavf/55.33.100
[08:02] <[mbm]> hmm, in theory you could write your own hls parser to fetch each snippet and then just cat them all together and pipe the output
[08:02] <[mbm]> all the sgements should line up prefectly to produce an mpeg-ts
[08:02] <BtbN> i guess it's the estimator and stuff accessing the file
[08:03] <[mbm]> curious what stations actuallh have a public hls stream though
[08:03] <BtbN> twitch does
[08:04] <BtbN> i have no idea what's so great about HLS compared to just a continous http or rtmp stream
[08:04] <BtbN> it's just more complicated and overhead
[08:05] <HD|Laptop> mmint: yes, exactly this is what I do
[08:05] <HD|Laptop> [mbm]: ^^
[08:05] <HD|Laptop> [mbm]: the problem is with pipes that once the buffer underruns just ONCE, ffmpeg *exits*
[08:06] <HD|Laptop> [mbm]: if you're German, you might try http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/index_608_av-b.m3u8?sd=10&rebase=on
[08:06] <HD|Laptop> dunno if this one is region locked
[08:06] <[mbm]> hmm, seems like something that would be easy to fix in the ffmpeg source
[08:07] <HD|Laptop> [mbm]: more interesting is the reason behind the three unneeded http requests
[08:07] <BtbN> VLC plays hls fine, would propably be easier to just use it
[08:08] <HD|Laptop> BtbN: nope, raspberry pi - and i dont have 10+ hours to do a compile :/
[08:08] <BtbN> then, don't compile it yourself?
[08:08] <HD|Laptop> also, I dont have the needed SD card space, just a 2gb sd card
[08:08] <BtbN> vlc is a little smaller than 2GB
[08:08] <HD|Laptop> BtbN: the prebuilt raspbian packages dont carry the configure flag which enables the rpi hardware acceleration, the OS occupies much of the sd card already^^
[08:09] <HD|Laptop> and the "media center" i've built is totally centered upon omxplayer, if possible i'd like to avoid switching the backend to vlc :/
[08:09] <BtbN> well, if you just want to watch hls on an rpi somehow, you can allways put xbmc on there
[08:09] <BtbN> it definitly also plays hls
[08:09] <[mbm]> you could run vlc as a server
[08:10] <HD|Laptop> BtbN: thats not an option, too, because the rpi is not just used as a TV - there's also a chromium webbrowser which is normally displayed on the monitor
[08:10] <BtbN> if you have python on there you can also use livestreamer to play the hls stream and make it available as local http stream
[08:11] <HD|Laptop> heh, if such a solution already exists i'm taking it :D
[08:11] <BtbN> you might have to write a small python script to add support for your live streaming "service", but that's all
[08:12] <BtbN> it's intended to watch stuff like twitch in vlc and other players
[08:26] <HD|Laptop> BtbN: hmm doesnt work
[08:26] <HD|Laptop> root at raspberry-pi:~# livestreamer "hls://http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/index_608_av-b.m3u8?sd=10&rebase=on" -p "/usr/bin/omxplayer" -l debug -a "--no-keys {filename}" -v --player-http  --yes-run-as-root
[08:26] <HD|Laptop> [cli][info] Found matching plugin stream for URL hls://http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/index_608_av-b.m3u8?sd=10&rebase=on
[08:26] <HD|Laptop> Available streams: live (worst, best)
[08:26] <HD|Laptop> and then it exits -.-
[08:27] <BtbN> well, you forgot to tell it which stream (best) to use
[08:27] <BtbN> and i realy would not run stuff like that as root
[08:31] <HD|Laptop> heh, that is just awesome! thanks :)
[08:35] <Reventlov> Hello.
[08:36] <Reventlov> What ffmpeg options would you recommand to stream a .mp4 using ffserver and ffmpeg ?
[08:36] <Reventlov> currently use -i *.mp4 -override_ffserver -vcodec mpeg2video -b:v 3000
[08:36] <Reventlov> but the quality is shitty
[08:37] <HD|Laptop> BtbN: huh, if I omit the log level(!) option from livestreamer, omxplayer seems to bark o.O
[08:43] <HD|Laptop> anyway looks like it's working BtbN thank you very much for the help!
[08:50] <aolin> Reventlov: how about -v:q 2
[08:52] <Reventlov> aolin: replacing -b:v ?
[08:52] <Reventlov> let me man.
[08:54] <Reventlov> aolin:        -loglevel [repeat+]loglevel | -v [repeat+]loglevel
[08:54] <Reventlov> are you sure it's what you meant ? Or for me ?
[08:54] <aolin> no, sorry
[08:56] <aolin> apparently it's just -q 2
[08:56] <aolin> it's more of dynamic quality setting than setting bitrate AFAIK
[08:57] <aolin> your bitrate must be too low though, 3000 is nothing
[08:57] <Reventlov> oh, it's wayyy better
[09:00] <blippyp> reventlov - you might want to consider using -crf instead of -q I think it does a better compression/quality ratio... but I'm not sure. My understanding is that -q is really only used when setting it to 0 for lossless quality. Also you video bitrate is probably really high - you can probably get away with 1-1.5 mb instead (if not lower) - but it really depends on your video size.
[09:07] <aolin> blippyp: hmmm -crf seems to be x264 specific
[09:07] <blippyp> oh sorry - I assumed you were using x264 since you were talking about mp4 - at least I thought you were - but you're probably right about that - which codec are you using?
[09:08] <blippyp> forget it - I see now
[09:08] <aolin> looks like he's transcoding .mp4 (h264?) to mpeg2video
[09:09] <blippyp> not sure then - I never use that codec - I think -q is a general for for most codecs, you're probably okay leaving it with that if crf doesn't do anything for you
[09:09] <blippyp> but I would still try lowering your video bitrate - what's the resolution of the video?
[09:12] <Reventlov> ID_VIDEO_BITRATE=4969920
[09:12] <blippyp> what's the resolution though?
[09:12] <Reventlov> 4969.9 kbps (606.7 kbyte/s)
[09:12] <Reventlov> 200~VIDEO:  [H264]  1920x1080  24bpp  23.976 fps  4969.9 kbps (606.7 kbyte/s)
[09:12] <Reventlov> orry.
[09:12] <blippyp> ah
[09:13] <blippyp> yeah, you're probably lucky to get away with 3mb then...  ;)
[09:13] <blippyp> you might want to try and tweak it a bit, but I'm guessing you're good to go if you liked what you saw....
[09:14] <Reventlov> well, I liked. Still, errors in the file seems to "break" the video stream, plus, i still have this bug opened on the bugtracker
[09:14] <aolin> if this is a transcoding server for PlayStation3 or such then the stream bitrate can be as high as your network can handle
[09:15] <Reventlov> Thank you
[09:15] <Reventlov> well, it's a server somewhere
[09:15] <aolin> ah ok, then throughput might be issue
[09:15] <Reventlov> Good connection, cpu limited
[09:16] <aolin> mpeg2 tends to be very large in good quality
[09:17] <blippyp> try raising your bitrate to at least 5mb
[09:18] <blippyp> if not higher
[09:18] <blippyp> I'd aim for between 5 and 8 to start
[09:21] <blippyp> like I said I'm not familiar with that codec, but x264 if probably better and I most videos need at least 8 with that codec to look good (i.e. the best that youtube will produce) a full blown blu-ray shoots out like 30 I believe - so.....
[14:25] <haxie> I'm trying to use ffmpeg to take a list of files of different types and frame sizes (for example, avi @ 720x480, mp4 @ 640x580, mp4 @ 1280x760, etc) and concatenate them into a single output mp4 with a maximum frame-size (so each video should be scaled so that it can fit entirely within the frame, even if borders are required).
[14:26] <haxie> Is such a thing possible?
[14:26] <haxie> I've been trying to set it up, but haven't been having much luck. Just wondering if 1. it's possible and 2. there are any shortcuts for something like this?
[14:31] <haxie> my initial approach was to take each file and convert them to the same encoding (say, mp4) and then use concat demuxer to combine them, but the missing piece is the automatic frame scaling
[15:16] Action: penguin42 is looking for suggestions for dumb IP cctv camera (jpeg output) to video with a web interface but I don't need motion detection; I can convert the IP cctv output using ffmpeg, but then how would I also be able to monitor it in real time?
[16:21] <sweb> for get screenshot from movie i use this command :
[16:21] <sweb> ffmpeg -i mymovie.mp4 -ss 100 -vframes 1 out.jpg
[16:21] <sweb> but it's to slow when i want to capture from long movie
[16:23] <c_14> https://trac.ffmpeg.org/wiki/Seeking%20with%20FFmpeg
[16:23] <c_14> -ss as an output option seeks frame by frame and therefore takes longer than -ss as an input option which seeks by keyframes.
[16:23] <c_14> Use a mix of both for fast and accurate seeking.
[18:26] <houbahop69> hi, I have just succesfully compiled ffmpeg from sources with --enable-opencl option on a debian jessie + nvidia
[18:28] <houbahop69> Unfortunately whn I try "ffmpeg -opencl_bench" I get "Could not get OpenCL platform ids: unknown error" and "Could not get device list from environment" I can't undestand why any help will be welcome ... Thanks
[18:49] <ParkerR> [mbm], lol input was 1920x1080i at 24 mpeg2 ac3 and was 2.5GB - output was 1920x1080p at 59 h264 ac3 was 1.1GB
[18:49] <ParkerR> Double the framerate but due to h264 less than half the size
[18:49] <ParkerR> LD
[18:49] <ParkerR> *:D
[18:51] Action: penguin42 assumes most of those extra frames become 'yeh the same, no change' and are small
[18:53] <Sevil> Hi, Can someone help me to transcode live input
[18:53] <ParkerR> penguin42, it's because deinterlacing
[18:54] <penguin42> oh I hadn't noticed the i/p
[18:55] <ParkerR> Sevil, live input as in?
[18:56] <houbahop69> Hi, could anybody help with opencl ?
[18:57] <Sevil> i have live input as UDP
[18:57] <Sevil> ffmpeg -i udp://@ -map 0:0 -map 0:15 this settings is a must and i want it in h264 aac with 1400kb bitrate
[18:58] <Sevil> size 1280x720
[18:58] <ParkerR> Sevil, -acodec aac (might have to check if thats the right name for the codec) -vcodec libx264 -b:v 1400k
[19:06] <Sevil> at this moment i have ffmpeg -i udp://@ -map 0:0 -map 0:15 -strict -2  -acodec aac -vcodec libx264 -b:v 1400k -f flv bla2.flv
[19:09] <Sevil> on ffserver it gives mush lower cpu usage, how can i optimize that line
[19:09] <ParkerR> Sevil, what is it not doing well? High CPU usage?
[19:10] <ParkerR> Also if you are using h264 there's really no need for flv
[19:11] <Sevil> i use that as example whihc one you suggest
[19:12] <ParkerR> Sevil, drop the -f as it's not really needed and just use a .mp4 extension
[19:12] <ParkerR> * -f flv
[19:13] <ParkerR> Forcing it to flv may be causing some of the overhead
[19:13] <ParkerR> Or may just be a redundant option. Not sure.
[19:14] <Sevil> but still it gives high cpu usage
[19:15] <ParkerR> Well video transcoding is by nature CPU intensive
[19:15] <ParkerR> For the most part
[19:15] <ParkerR> Are you just wanting to capture the stream?
[19:16] <Sevil> no i want to restream it, it is for a project of school
[19:16] <ParkerR> ffmpeg -i udp://@ -map 0:0 -map 0:15 -vcodec copy -acodec copy out.flv
[19:16] <ParkerR> Should be the lowest CPU wise
[19:17] <Sevil> i get unicast from another computer and i want to make it into hls, but the first step is to get it transcoded with lower bitrate and the mapping
[19:17] <ParkerR> Basically just stores the data it receives without transcoding
[19:17] <Sevil> because after this i will make it hls
[19:19] <Sevil> when i copy it will give high bitrate :(
[19:19] <ParkerR> Well then try just changing bitrate
[19:20] <ParkerR> ffmpeg -i udp://@ -map 0:0 -map 0:15 -vcodec copy -b:v 1400k -acodec copy out.flv
[19:22] <Sevil> now it will ignore it still high bitrate
[19:23] <Sevil> maybe i can show you if you want
[19:23] <c_14> If you want to convert the video to h264, you're going to use a lot of cpu time. You can try switching the preset to {very,super,ultra}fast if you want it to encode faster.
[19:24] <c_14> You can't set a bitrate with -codec copy
[19:25] <ParkerR> c_14, ahh ok good to know
[19:26] <Sevil> its better now thanks :) only need to look quality etc..
[19:26] <Sevil>  -vprofile high -preset faster
[19:27] <c_14> Try messing with the crf
[19:27] <c_14> actually nvmd
[19:27] <c_14> You're setting a bitrate manually.
[19:31] <Sevil> i think it works fine i need to test this for a day to look if it not crash
[19:32] <Sevil> one more question if someone moves fast it will give lines or something how can i fix that
[19:32] <c_14> Is the input interlaced?
[19:32] <Sevil> is that deinterlace
[19:32] <c_14> Fast movement producing lines sounds like the source is interlaced, yes.
[19:32] <liquidmetal> I'm trying to setup ffmpegthumbnailer on fedora - I get this error when gnerating thumbnails - Failed to load gio libraries
[19:32] <ParkerR> -vf yadif=1
[19:33] <Sevil> yes its interlanced then
[19:33] <ParkerR> Sevil, although that'll add to CPU load
[19:33] <Sevil> okey, i will test if it gives lot more load
[19:34] Action: liquidmetal is afk
[19:35] <Sevil> pff that option will give alot more cpu load :(
[19:44] <liquidmetal> https://code.google.com/p/ffmpegthumbnailer/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=109
[19:44] <liquidmetal> Can someone help me figure out the code chang for this ticket?
[19:46] <c_14> I'm guessing it's this: https://code.google.com/p/ffmpegthumbnailer/source/detail?r=250 But this channel doesn't deal with support for ffmpegthumbnailer
[19:47] <Lokie> is there a limit of how many threads ffmpeg can use? same command on a 4core machine had avg of ~ 4 on a 8core i get ~ 5.5
[19:48] <Lokie> main thread cpu usage on the 4core was ~ 400% on the 8core ~ 500-600%
[19:48] <ParkerR> Lokie, avg FPS?
[19:48] <Hello71> -threads
[19:48] <Lokie> 15
[19:48] <Hello71> you're best off running multiple ffmpegs though because some steps are un-parallelizable
[19:49] <Lokie> Hello71 i used -thread 4 and -thread 8 respectively
[19:49] <Hello71> xargs -P $(nproc)
[19:49] <Lokie> been running it the last 3 hours same usage so far
[19:49] <Lokie> it's a vps that u can resize it's cpu from 1 up to 20 cores
[19:51] <Lokie> Hello71 no response from that
[19:54] <ParkerR> Lokie, you have to use it in combo with ffmpeg
[19:54] <ParkerR> iirc
[19:54] <liquidmetal> c_14, got it. That was it, thanks!
[19:54] <Lokie> ParkerR u mean multiple ffmpegs?
[20:01] <ParkerR> Lokie, xargs is usually for parallel processing
[20:01] <ParkerR> You have to supply it a commond and args
[20:01] <ParkerR> Not sure how to use it with ffmpeg
[20:05] <Lokie> thx will try googling a bit
[22:43] <barhom> Can i buffer the output of ffmpeg somehow? I want it to not start writing to file for exmample until it has processed 10 seconds of data
[22:58] <aleb> When I try to run multiple ffmpeg commands like this: "ffmpeg -nostdin -i $i -acodec libvorbis -q:a 4  -vcodec libvpx -minrate 8M -maxrate 8M -b:v 8M  -sn $i.webm     2>&1 >$i.log    &"      it does not work and this is printed: "[2]  + 822 suspended (tty output)  ffmpeg -nostdin -i $i -acodec libvorbis -q:a 4 -vcodec libvpx -minrate 8M  8M"
[22:58] <aleb> any idea how to make ffmpeg work in the background?
[23:00] <c_14> Try running ffmpeg with nohup
[23:01] <c_14> ie: nohup ffmpeg $options
[23:05] <aleb> uu, nice, thanks!
[00:00] --- Mon May 12 2014

More information about the Ffmpeg-devel-irc mailing list