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

burek burek021 at gmail.com
Wed Mar 12 02:05:01 CET 2014


[00:43] <ALbSpirit> hello i'm using ffplay version 2.1 on ubuntu and i'm trying to play a file with ffplay. I have the video but don't have any voice on that can someone help me please. Here is the link http://pastebin.com/hq0DCfJF
[02:20] <savid> How can I preserve EXIF metadata when re-encoding a video?
[02:45] <Hello71> videos have EXIF?
[07:55] <amigojapan> hi
[07:55] <amigojapan> why is my resulting video distorted like this? do you notice how the background gets distorted in the middle of the video? http://www.youtube.com/watch?v=RP3SF_Fi1gA&feature=youtu.be
[07:55] <amigojapan> The original images don't seem to be distorted.
[07:55] <amigojapan> comman d line:d:\ffmpeg\bin\ffmpeg.exe -r 7 -i img%d.png -r 24 o.avi
[07:55] <amigojapan> pastebin of ffmpeg output http://pastebin.com/McL2E4Kd
[07:58] <relaxed> amigojapan: see if it happens with o.mkv
[07:58] <amigojapan> ok relaxed , thanks
[07:58] <relaxed> unnless there's some reason you need mpeg4 + avi
[07:59] <amigojapan> relaxed: hmm, I dont really have a good reason.. I dont think, let me try it
[08:00] <amigojapan> relaxed: thanks, that seems to have gotten rid of the distortions.... I will now go to modify my program, thanks again for each time you have helped me
[08:02] <amigojapan> relaxed: I guess I can always convert to avi if I need it.
[08:18] <kode54> what would cause a missing codec id = 86056 on an atrac3p containing file?
[08:19] <kode54> other than, say, being an idiot and using libav
[11:03] <JEEB> kode54, that comment is funny because that decoder came from Libav :P Anyways, that usually sounds like either you disabled the decoder or that you're getting the wrong library loaded
[12:11] <wiretap11> anyone here using ffmpeg for DVB-S TS transcoding for streaming?
[12:11] <wiretap11> i need someone with experience to help me tune my setup
[12:11] <wiretap11> would love to know if there is a cheat sheet for this
[12:28] <pron> wiretap11 gief me too if you find something intresting
[12:28] <pron> :}
[12:29] <wiretap11> :)
[12:29] <wiretap11> its weird that there is very little online about this setup
[12:29] <wiretap11> im sure there is a "correct" way to tackle these cases
[12:29] <wiretap11> CPU vs quality samples
[12:29] <pron> wiretap11 you want "live" streaming?
[12:29] <wiretap11> yes
[12:30] <pron> then i think i have seen some pointers in wowza forum
[12:30] <pron> some time ago
[12:30] <Mavrik> wiretap11, there are so many use-cases around that it's not really easy to write an all-encompasing giude
[12:30] <wiretap11> 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
[12:30] <Mavrik> also the user needs to have at least basinc understanding of what he wants and how things work.
[12:30] <wiretap11> ffmpeg -i "http://127.0.0.1/stream.ts%E2%80%9C -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:30] <wiretap11> also i would like to know if deinterlacing is suggested and if it kills the cpu
[12:30] <Mavrik> wiretap11, there is not such thing as low CPU usage and good quality
[12:31] <Mavrik> pick one.
[12:31] <Mavrik> also, encoding 4:4:4 is going to cause problems with most players
[12:31] <Mavrik> (not to mention you're losing bitrate for questionable quality gain)
[12:31] <pron> whats 4:4:4 ?:<
[12:31] <Mavrik> http://en.wikipedia.org/wiki/Chroma_subsampling
[12:32] <Mavrik> most players you meet in the wild only really support 4:2:0
[12:32] <JEEB> setting the profile does nothing by itself
[12:32] <Mavrik> true :)
[12:32] <JEEB> heck, I would be pretty sure it gets plain ignored
[12:32] <JEEB> just like all those users who set -profile:v to high and then complain when the encoder has instead selected main
[12:32] <Mavrik> hmm, haven't really tested it witout specifying a conversion...
[12:33] <Mavrik> but ffmpeg might get smart and coerce pix_fmt :)
[12:33] <wiretap11> my players do only yuv420p
[12:33] <JEEB> because libx264 basically auto-selects the lowest possible one
[12:33] <wiretap11> what about the -preset veryfast
[12:33] <wiretap11> is that always evaluated?
[12:33] <JEEB> yes
[12:33] <Mavrik> yes.
[12:33] <JEEB> and the setting _is_ evaluated with the profile, too
[12:34] <wiretap11> i was once told that by using higher profiles i get better compression
[12:34] <JEEB> libx264 just internally has a minimizer there
[12:34] <JEEB> yes, if you actually use their features :P
[12:34] <JEEB> just setting a profile means a flag
[12:34] <wiretap11> since i dont understand the concept of the profile (i dont know the differences except the encapsulated resolution and frame rates)
[12:34] <JEEB> and libx264 internally then minimizes that value according to your overall settings
[12:34] <JEEB> profile is just the feature set available
[12:35] <wiretap11> i do see on the other side of encoding that the profile is enforced
[12:35] <wiretap11> or at least as text version string
[12:35] <pron> JEEB max feature set libx264 can use?
[12:35] <JEEB> wiretap11, libx264/ffmpeg should output the actually used profile somewhere in stderr during encoding
[12:35] <JEEB> pron, what?
[12:36] <wiretap11> JEEB: so if my input stream is a TS 576i SD video what would be the best option to encode it
[12:36] <pron> JEEB nwm
[12:36] <Mavrik> wiretap11, your best option is whatever your expectations are
[12:36] <JEEB> you're streaming, so you're basically limited by what your consumers are limited by
[12:37] <wiretap11> bitrate
[12:37] <Mavrik> and requirements as well
[12:37] <JEEB> on the encoding side you use the slowest profile that is still fast enough for your use case
[12:37] <wiretap11> slowest is the 4.0 4.1 and below ?
[12:37] <JEEB> you most probably will want to deinterlace if possible during the encoding, unless you want to make people enjoy interlaced content in flash :P
[12:37] <JEEB> ugh, not profile, preset I mean
[12:37] <wiretap11> ok
[12:37] <JEEB> also you just used level numbers when talking about profiles
[12:37] <wiretap11> well deinterlacing kills the cpu :(
[12:38] <JEEB> then just make your flash clients handle deint
[12:38] <wiretap11> yes its ok
[12:38] <wiretap11> they handle it
[12:38] <JEEB> also interlaced encoding /will/ be slower
[12:38] <JEEB> just keep that in mind
[12:38] <pron> and you want to choose whats the oldest consumer device you want to be able to hw decode that video
[12:38] <JEEB> and weightp 2 for example isn't usable
[12:38] <pron> imo
[12:38] <wiretap11> yeah its fast than deinterlacing + encoding
[12:39] <JEEB> pron, he is doing rtmp streaming so he is only limited by bandwidth and flash
[12:39] <Mavrik> JEEB, weightp2 isn't usable? any reason?
[12:39] <JEEB> Mavrik, "not implemented for interlaced coding"
[12:39] <Mavrik> doh, that
[12:39] <wiretap11> whats weightp2 ?
[12:39] <Mavrik> thought I was missing something :)
[12:39] <JEEB> IIRC it gives you a warning
[12:39] <JEEB> if you try to use it
[12:39] <JEEB> wiretap11, a setting used with slower presets
[12:39] <wiretap11> ok
[12:40] <pron> JEEB afaik old andoid devices can struggle wtih too high profile , while still able to grab rtmp
[12:40] <JEEB> no they are not
[12:40] <JEEB> unless they have flash player installed
[12:40] <JEEB> you are speaking of rtsp
[12:40] <pron> transport does nto metter
[12:41] <JEEB> oh for fuck's sake
[12:41] <JEEB> he is streaming for flash
[12:41] <JEEB> he is doing rtmp
[12:41] <JEEB> and android most fucking definitely does not support rtmp
[12:41] <JEEB> at least not out-of-box
[12:41] <JEEB> I know many android devices are limited, but that's just fucking out of fucking scope right now
[12:41] <Mavrik> wiretap11, if you're streaming, using crf might not be a good option if your clients are on limited connection
[12:42] Action: Mavrik hugs JEEB.
[12:42] <JEEB> wiretap11, anyways, 1) pick the slowest preset that still gives you good enough quality 2) pick a CRF value that hits your target quality more or less (highest that still looks good, start with 23) 3) set VBV limits (-maxrate and -bufsize) according to your bandwidth
[12:42] <JEEB> and bufsize should be matched on consumer's and encoder's side
[12:42] <Mavrik> yes, VBV is certanly a must for streaming
[12:42] <JEEB> and yes, BOTH maxrate and bufsize HAVE to be set, otherwise the thing doesn't work
[12:42] <Mavrik> yep
[12:43] <JEEB> if your flash thingamajig only can set buffering in seconds, it's <amount of seconds> * maxrate
[12:43] <wiretap11> ok
[12:43] <JEEB> VBV will make sure that your stream never goes over those limits (average maxrate over bufsize)
[12:43] <wiretap11> i stream to wowza and nginx does this affect the settings?
[12:44] <pron> ;D
[12:44] <JEEB> only depends on if you're limited by anything regarding them on the bandwidth side of things
[12:44] <wiretap11> no
[12:44] <JEEB> ok
[12:44] <wiretap11> u said 23)3
[12:44] <wiretap11> is that a typo ?
[12:44] <JEEB> what
[12:44] <JEEB> no
[12:44] <wiretap11> crf
[12:44] <JEEB> the 3 is part of 3)
[12:44] <JEEB> 1) 2) 3)
[12:45] <pron> why u so angry ?:D
[12:45] <JEEB> the (highest that still looks good, start with 23) is part of 2)
[12:45] <wiretap11> i lost u on the part
[12:45] <JEEB> ok, fuck it
[12:45] <JEEB> I'll separate the lines
[12:45] <Mavrik> that reminds me
[12:45] <wiretap11> setting is 28.5 now
[12:45] <Mavrik> I really should submit the FLV patch for PTS wrap
[12:45] <JEEB> 1) pick the slowest preset that still gives you good enough quality
[12:45] <Mavrik> breaks streaming :)
[12:45] <JEEB> 2) pick a CRF value that hits your target quality more or less (highest that still looks good, start with 23)
[12:46] <wiretap11> ah :d
[12:46] <JEEB> 3) set VBV limits (-maxrate and -bufsize) according to your bandwidth
[12:46] <wiretap11> syntax :D
[12:46] <wiretap11> is a bitch
[12:46] <wiretap11> thx
[12:47] <JEEB> always for any bandwidth limited scenario where you don't need to hit a specific average bit rate over the whole clip (as in, if the stuff doesn't need rate, then you don't need to use it), CRF + VBV + slowest preset you can take is what you need
[12:48] <JEEB> in theory since flash supports 10bit H.264 if you have enough performance speed-wise you could just use a 10bit libx264 library. Gets somewhat better performance. The only negative part is that it kills any and all hardware acceleration so all consumers have to use their CPUs for decoding
[12:48] <wiretap11> -acodec libmp3lame -ac 2 -ar 44100 -ab 128k -vcodec libx264 -crf 28.5 -r 25 -g 25 -maxrate 1000k -bufsize 5000k -preset veryfast  -f flv URL
[12:48] <JEEB> why do you set -r on the encoding side?
[12:48] <wiretap11> to lower the frames
[12:48] <wiretap11> from 50 to 25
[12:48] <JEEB> oh, so you're actually getting 50fps input?
[12:48] <wiretap11> yes
[12:48] <JEEB> as in, frames per sec
[12:49] <JEEB> not fields per sec
[12:49] <wiretap11> yes
[12:49] <JEEB> ok
[12:49] <JEEB> yeah, then it makes sense
[12:49] <JEEB> you want to have one-second GOPs?
[12:49] <wiretap11> i dont know
[12:49] <JEEB> -g 25 makes the maximum GOP length one second
[12:49] <wiretap11> i just matched the framerate
[12:49] <wiretap11> yes
[12:49] <wiretap11> i dont know if its good practice
[12:49] <JEEB> you have a bufsize of 5 seconds right now
[12:49] <wiretap11> yes
[12:49] <JEEB> so I'm pretty sure you could make it a bit longer
[12:50] <JEEB> say, 2sec
[12:50] <wiretap11> so g 50
[12:50] <JEEB> yup
[12:50] <wiretap11> ok ill test
[12:51] <JEEB> but yeah, the basis for all bandwidth limited stuff is "-c:v libx264 -crf A -preset B -maxrate C -bufsize D"
[12:52] <JEEB> then you add stuff on top of that to limit the stream for consumers that you have to support and might not support the stuff you would otherwise output by default
[12:52] <JEEB> flash isn't exactly limited, so no such things needed really
[12:52] <JEEB> Mavrik, so PTS wrapping is valid?
[12:52] <JEEB> you poked Adobe about it?
[12:52] <wiretap11> thanx JEEB
[12:52] <wiretap11> I really appreciate the hints
[12:53] <wiretap11> once i get this up i will do the same for HD streams
[12:53] <wiretap11> which KILL the server :(
[13:36] <theahindle> Howdy - is it possible to get a timecode from a frame?
[13:37] <theahindle> Maybe timecode isn't the right word - I need to know when the video//frame was made
[13:42] <koko_> hello
[13:42] <koko_> how can i get Duration  with ffmpeg
[13:42] <koko_> ffmpeg -i song.mp3
[13:43] <koko_> ffmpeg -i song.mp3 | grep Duration ?
[13:47] <steinchen> hello all.. i have a mxf file with 8 audio channels, and i need it in stereo.. to map channel 1 left and 2 right, the others can be dropped
[14:06] <tim-kos> hey all. is it possible to force ffmpeg to copy over all meta data/id3tags? I have an mp3 file which contains Lyrics according to mediainfo. I encode it and after that the key is gone. I also tried -map_metadata g and -map_metadata:s:a 0:g, but no luck. Any pointers would be greatly appreciated.
[14:09] <Mavrik> JEEB, technically standard does not consider or allow wrapping, however practical implementations for chunked streaming do
[14:09] <Mavrik> (since it's the only thing possible)
[14:10] <Mavrik> we have wrapping patch deployed to production and it works just fine
[14:10] <JEEB> you should then poke adobe to add it to the spec
[14:10] <Mavrik> mhm
[14:10] <Mavrik> on TODO list somewhere :)
[14:10] <JEEB> they after all have an e-mail there for comments etc
[14:27] <theahindle> Is it possible to get the timecode of a frame using ffprobe or ffmpeg? using ffmpeg as: ./ffmpeg -i "rtmp://myserver/myapplication/mystreamname" -c copy -y -timelimit 10 -copyts ~/myfile.mp4
[14:29] <tim-kos> anybody know anything about my meta data question?
[15:22] <TekniQue> I'm a bit puzzled about time stamps. I'm decoding audio and video with examples/demuxing_decoding.c. I've altered the code to print out the pkt_pts for each frame but I'm puzzled as to how I can make sure audio and video stay in sync when I process the output, when the timestamps aren't in the same format
[15:23] <TekniQue> is there a way to convert the timestamps from whatever timebase they are into something real like nanoseconds
[15:23] <TekniQue> because audio and video timestamps appear to be in different timebase
[17:24] <Mavrik> TekniQue, well, each stream has it's own timebase
[17:24] <Mavrik> if you divide PTS or DTS with time_base you get time in seconds :)
[17:24] <Mavrik> there's a whole util class that deals with that
[17:25] <Mavrik> av_mul_q or somethin
[17:27] <TekniQue> Mavrik: the problem is, the time base of the audio as indicated is 1/44100 and the timebase of the video as indicated is 1/50
[17:27] <TekniQue> so the output of the two is completely different
[17:28] <TekniQue> video_frame(cached) n:115791 coded_n:115789 pts:NOPTS size:345600 9223372036854775808 key 0 pktpts 2.31584e+06 (115792000 @ 1/50)
[17:28] <TekniQue> audio_frame n:199470 nb_samples:1024 pts:NOPTS 4631.68 (204257280 @ 1/44100)
[17:30] <TekniQue> but fwiw, the video stamps increment by 1000 per frame
[17:30] <TekniQue> while the audio stamps increment by 1024 per frame
[17:30] <TekniQue> as each audio frame appears to hold 1024 samples
[17:34] <Mavrik> that's... completely normal :)
[20:32] <nordlys> Hello. Is it possible to make encoding with -loglevel info reuse/update the same line for the encode process rather than make a new line for each update? [Windows]
[20:33] <Maverick|MSG> is it possible to screencapture from a specific process id, rather than the entire desktop?
[20:35] <llogan> Maverick|MSG: you can give the screen coordinates to capture a specific window.
[20:35] <Maverick|MSG> let's assume I don't know those
[20:36] <llogan> then use xwininfo and click on the desired window
[20:44] <Maverick|MSG> llogan ffmpeg can't figure out the window dimensions automatically?
[20:44] <Maverick|MSG> (and x/y position)
[21:23] <ztx> hello, i was wondering if it is possible to copy streams directly from input to output without transcoding?
[21:23] <ztx> specifically i'd like to copy the audio from one WMV file and the video from another WMV file, and put them into an output WMV
[21:23] <ztx> i've checked the documentation but can't fathom how to do it
[21:24] <average> ztx: that's because you haven't read it enough
[21:24] <average> ztx: I don't mean to come across as a complete douchebag, but read-the-fine-manual :)
[21:25] <ztx> you're probably right! but please could you suggest a hint of what to search for?
[21:27] <average> 5359 questions tagged with [ffmpeg] on SO http://stackoverflow.com/questions/tagged/ffmpeg
[21:27] <average> 938 tagged with [video-processing] http://stackoverflow.com/questions/tagged/video-processing
[21:28] <average> ffmpeg-user mailing list http://ffmpeg.org/pipermail/ffmpeg-user/
[21:29] <average> ffmpeg-devel mailing list http://ffmpeg.org/pipermail/ffmpeg-devel/
[21:29] <average> also see /topic for some forums
[21:30] <average> ztx: I know I'm an idiot, but I'd rather not give you the answer, since this is probably not the only question you'll have about ffmpeg
[21:31] <average> ztx: so I'd like to guide you to places where it's likely that you'll find the answers(giving you the fishing rod instead of the fish so-to-say)
[21:31] <ztx> thanks that actually helps a lot, i didn't think of SO and hadn't yet noticed there is such an active mailing list
[21:32] <ztx> sorry for coming in and asking questions without checking all the available sources
[21:32] <average> no problem
[21:39] <ztx> ffmpeg -i AUDIOVIDEO.wmv -i JUSTVIDEO.wmv -map 1:0 -map 0:0 -codec copy OUTPUT.wmv
[21:39] <ztx> did the trick
[21:39] <ztx> wonderful software
[22:02] <llogan> Maverick|MSG: no, but you can probably script it.
[22:03] <Maverick|MSG> thanks llogan.  but will ffmpeg capture the window's contents or just the area of the desktop based on the x/y and width/height?
[22:04] <Maverick|MSG> basically: I want to capture what is in a certain window, even if that window is moved or another window overlaps it
[22:22] <shevy> how does ffmpeg compare to sox in terms of speed, when i.e. converting a .mp3 into an .ogg file ? anyone knows? just a rough estimate
[22:24] <Gregor> Is there an ffmpeg filter that can drop frames based on some external list of frames to be dropped?
[22:24] <Gregor> (Rather than internal calculation)
[22:26] <llogan> Maverick|MSG: just the specified area of the desktop unless you use -follow_mouse
[22:32] <Maverick|MSG> darn, ok.  thanks
[00:00] --- Wed Mar 12 2014


More information about the Ffmpeg-devel-irc mailing list