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

burek burek021 at gmail.com
Sat Mar 16 02:05:01 CET 2013


[00:04] <dmonjo_> relaxed: you think using the -re can help make decoding a bit slower to fit with the connection coming from the user to watch the stream?
[00:05] <relaxed> try it
[00:06] <dmonjo_> give me like a number to start as a reference
[00:07] <klaxa> a... number? -re doesn't require numbers
[00:18] <dmonjo_> ts demux error: MPEG-4 descriptor not found
[00:18] <dmonjo_> this is an error i receive in vlc
[00:21] <dmonjo_>  main stream error: no suitable access module for
[00:21] <dmonjo_> http://pastie.org/6502398
[00:23] <relaxed> this is not the vlc support channel
[00:24] <dmonjo_> i thought i can redirect us to the encoding problem
[00:26] <dmonjo_> the funny thing if i download the m3u8 and its ts files locally and play they play seemlisly
[00:29] <relaxed> what does that tell you?
[00:39] <RobertNagy> it would be nice to be able to access the AVBuffer opaque...
[00:39] <RobertNagy> in user code
[01:38] <Ardul> Hello
[04:03] <elkng> is it possible to merge two videos into one but they do have different resolutions, one is 640x480 another is 480x360 ?
[04:03] <ubitux> yes
[04:04] <ubitux> but what do you mean by merge?
[04:04] <ubitux> :)
[04:05] <ubitux> two streams in the same container, one overlay aside another, one playing after another, ...?
[04:05] <elkng> "merge" is to glue two videos into one
[04:06] <ubitux> visually?
[04:06] <ubitux> or one after another?
[04:06] <ubitux> (at playback)
[04:08] <ubitux> https://www.ffmpeg.org/faq.html#How-can-I-join-video-files_003f
[04:10] <elkng> I mean concatenate
[04:11] <elkng> it suggested make them into *.mpg format then do "cat 1.mpg 2.mpg > 3.mpg" but will that work if they have different resolution ?
[04:13] <ubitux> maybe
[04:15] <elkng> who knows isnt it ? that way this channel will become obsolete
[04:15] <ubitux> you can also just try by yourself
[04:15] <ubitux> it takes approximately 1 minutes
[04:31] <memand> I don't know if this is the right place to ask this. But does any of you guys know of some software that can compare the soundwave of one audio file to another?
[04:32] <ubitux> showwaves and showspectrum filters in ffmpeg :-°
[04:32] <ubitux> and with blend filter to make some diff
[04:34] <memand> I'm actually very new to ffmpeg but would that be 'ffmpeg -i soundfile showwaves' for example?
[04:35] <memand> Hmm, term says no on that one :P
[04:42] <ubitux> tell me what you want to do
[04:43] <ubitux> https://ffmpeg.org/ffmpeg-filters.html#Examples-24
[04:43] <ubitux> actually.. :)
[04:43] <ubitux> i even added a complete example here
[04:46] <p4plus2> Have there been any major documented regressions in preformance of screen recording with ffmpeg recently?  I can no longer get more than 11 FPS when I could easily do 60FPS prior.  Unfortunately I did not pay attention to the prior version I was using before I upgraded.
[04:46] <p4plus2> Other symptoms include CPU usage capping at 15% despite -threads 8 (8 core CPU), -threads 0 provides the same results.
[04:46] <p4plus2> What I am recording seems to have no impact on FPS whether it is a game or a blank desktop background.
[04:46] <ubitux> memand: and you can overlay multiple spectrum from different files with the lavfi architecture as well
[04:46] <ubitux> p4plus2: what's your current version?
[04:47] <p4plus2> ffmpeg version 1.0.5
[04:47] <ubitux> can you try to get something a bit more up-to-date?
[04:47] <ubitux> just in case.
[04:48] <p4plus2> I'll see if there are any beta channel which have a newer version
[04:48] <ubitux> beta channel?
[04:48] <p4plus2> I mean beta package channels in my package manager
[04:48] <p4plus2> not IRC
[04:48] <ubitux> you may try this for quick testing
[04:49] <p4plus2> well thats handy
[04:50] <p4plus2> Unknown input format: 'x11grab'
[04:51] <ubitux> ah, too bad
[04:51] <memand> ubitux: The situation I'm dealing with is this, I'm going to have an incomming audio transmission on a server that most likely will have background noise (people talking laughing etc.) and then I need to compare it to an audio signal on the server that has no "noise" and see if it's the "same" audio
[04:51] <p4plus2> oh well, I'll report back in a moment after I mess around with upgrading a bit
[04:52] <ubitux> memand: how do you want to compare? automatic or human analysis?
[04:52] <memand> automatic
[04:52] <ubitux> scripting purpose or something?
[04:53] <memand> yeah, it's a project me and a friend are working on
[04:53] <ubitux> interesting
[04:53] <ubitux> some image comparison algorithm could actually work with the spectrum image buffers
[04:54] <ubitux> memand: anyway, are you able to get something with ffplay?
[04:54] <ubitux> if you don't have it you can of course just use ffmpeg and encode a video instead
[04:55] <memand> My approach so far was actually this: get the "dirty" signal in, subtract the "clean" wave signal, store the signal left, take the original "dirty" signal and subtract the stored signal, see if it now matches the "clean" signal
[04:56] <ubitux> well you can do that with the ffmpeg api
[04:56] <memand> Awesome :D
[04:57] <memand> As you can probably hear, we are still very much in the finding the right tool for the job phase
[04:57] <ubitux> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/filtering_audio.c;hb=HEAD
[04:57] <ubitux> this is an example to use the filters, but there is an example code to decode the audio
[04:58] <ubitux> also see http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/resampling_audio.c;hb=HEAD
[04:58] <ubitux> look into the directory for more api examples
[04:59] <memand> Cool, and this is utilizing the ffmpeg api?
[04:59] <ubitux> yes
[04:59] <ubitux> it's in the ffmpeg repository
[04:59] <ubitux> doc/examples
[04:59] <memand> Nice :D
[04:59] <ubitux> it's also installed by default since a while now
[05:00] <ubitux> so if you have a recent enough ffmpeg you should find those examples in /usr/share/ffmpeg/doc/examples or something like that
[05:00] <ubitux> so more reading here: https://ffmpeg.org/about.html and https://ffmpeg.org/documentation.html for overall info
[05:00] <ubitux> enjoy your project ;)
[05:01] <memand> Thanks a lot :)
[05:01] <p4plus2> well good news and bad news ubitux -- good news is the version from git had a performance increase
[05:02] <p4plus2> bad news: by only 1 FPS
[05:02] <ubitux> ok
[05:02] <p4plus2> The interesting thing is that the framerate is completely consistent and doesn't jump around as if it was throttled by the CPU
[05:03] <ubitux> how can i reproduce btw?
[05:03] <ubitux> that would help me ^
[05:03] <p4plus2> one moment
[05:04] <memand> Oh, another question: Is there somewhere I can see some "benchmarks" of how much it takes to transcode different formats?
[05:04] <p4plus2> http://p4plus2.pastebay.net/1189245
[05:04] <ubitux> memand: it's fast ;)
[05:05] <memand> ubitux: :D
[05:05] <ubitux> memand: overall benchmark is really hard in the sense that it depends on way too much parameters
[05:05] <ubitux> and given that ffmpeg supports thousands of codecs, formats, filters, etc
[05:06] <ubitux> and inputs can be completely differents, parameters completely differents, etc..
[05:06] <p4plus2> Hmm, I wonder if I tried doing any conversions with ffmpeg if I would see similar problems
[05:06] <ubitux> p4plus2: could you do the same with -v verbose?
[05:06] <ubitux> (sorry)
[05:06] <p4plus2> sure not a problem
[05:07] <memand> ubitux: I'm thinking if we end up having to do some compression client side so we don't need insane network connections for the setup to work. And well most likely deploy it either on a raspberry pi
[05:07] <p4plus2> here you go ubitux http://p4plus2.pastebay.net/1189246
[05:07] <memand> s/well/we will/
[05:08] <ubitux> memand: note that most of the other solutions around use the libavcodec (ffmpeg) for the codecs part (where performance is needed); so whatever speed you need, it's certainly hard to find something else equivalent
[05:08] <ubitux> p4plus2: thx
[05:08] <memand> ubitux: good point ;)
[05:09] <ubitux> p4plus2: ok i have about 30 fps here
[05:09] <memand> I guess I have some reading to do, and then some code reading in the morning... Thanks for the input it was most helpfull :)
[05:09] <p4plus2> That should be the intended result
[05:10] <p4plus2> I capped this test to -r 30
[05:10] <ubitux> i can go up to 44 fps
[05:11] <p4plus2> I dunno if this helps but removing the -r can get me above 30fps but has excessive amounts of duplicate frames
[05:11] <p4plus2> making the recording feel very sluggish
[05:12] <p4plus2> Hmm, let me try encoding something and see how that goes
[05:12] <ubitux> p4plus2: you've checkout the repo using git, right?
[05:12] <p4plus2> yup
[05:12] <ubitux> you should try to checkout an older version
[05:13] <ubitux> like release/1.0, release/0.9, etc
[05:13] <p4plus2> does ffmpeg by chance save any version metadata in encoded videos?
[05:13] <ubitux> and see if you can your working version
[05:13] <p4plus2> If so I can go back to a version I know worked for sure
[05:13] <ubitux> yes
[05:13] <ubitux> "encoder"
[05:13] <ubitux> if the container supports it of course
[05:14] <ubitux> ffprobe on the file should show something like "encoder : Lavf55.0.100"
[05:14] <p4plus2>     encoder         : Lavf53.32.100
[05:15] <ubitux> most likely 0.10 then
[05:15] <ubitux> according to https://ffmpeg.org/download.html
[05:16] <p4plus2> Alright I'll rebuild that version and start there
[05:17] <p4plus2> alright .10.6 building, I'll let you know what sort of results I find
[05:17] <ubitux> make sure you make distclean and re-run a configure between builds
[05:17] <ubitux> or you'll get some surprises
[05:17] <ubitux> (link failures because of crazy object deps and such)
[05:18] <p4plus2> thankfully portage handle the configuration side of things very well with use flags so thats not a big deal
[05:18] <p4plus2> alright compile done testing now
[05:18] <p4plus2> well well well
[05:18] <p4plus2> its working
[05:19] <ubitux> do you know how to use git bisect?
[05:19] <p4plus2> I'll have to manually download the repo and learn a bit about the real build process, but I'll give it a shot
[05:20] <ubitux> well you can do a simpler thing to start with
[05:20] <p4plus2> since currently I was using the git checkout in portage
[05:20] <ubitux> which is to try to jump between major versions
[05:20] <p4plus2> Hmm, I can try 11.2 next
[05:20] <ubitux> yup
[05:21] <p4plus2> actually I do have one interesting note, when I started the recording it jumps up to around 50FPS and gets a few dropped frames -- it eventually stables out to 30 though
[05:21] <p4plus2> how come it hits 50FPS with -r 30?
[05:21] <p4plus2> shouldn't that limit the FPS to 30?
[05:22] <ubitux> maybe a bug
[05:23] <p4plus2> Hmm, I'll poke around and see if I can figure out where the preformance drop enters in
[05:24] <ubitux> thx
[05:24] <p4plus2> Though its good to know that ffmpeg is the cause now  -- narrowing down the cause is always the first major hurdle :P
[05:25] <ubitux> :)
[05:32] <p4plus2> Hmm looks like 11.2 never existed for gentoo, Well I'll just proceed with a git -bisect and see what I find
[06:53] <p4plus2> well ubitux I ran into a bit of a problem in the bisect, the first few builds went fine this last build however won't run ffmpeg:
[06:53] <p4plus2> ./ffmpeg: error while loading shared libraries: libavdevice.so.54: cannot open shared object file: No such file or directory
[06:54] <p4plus2> ln -s was unhelpful in solving the problem as well...hmm
[07:11] <paulburk_> Hello all. This is my first time here, and I'm fairly new to ffmpeg.
[07:12] <paulburk_> I'm trying to extract a 1 second clip. When running ffprobe on the output, the duration is 1.02 and the start is 0.016. Is it possible to get the duration to be exactly 1.00 and start 0.000? Details here: http://pastebin.com/z3fy0pWp
[07:15] <taqattack> I have an issue with with ffmpeg not streaming audio to rtmp server
[07:15] <taqattack> http://pastebin.com/HvH8cFLh
[07:57] <grepper> paulburk_: you could try -copyts
[07:58] <paulburk_> grepper: Thanks! Trying now.
[07:59] <paulburk_> grepper: Unfortunately, no change.
[08:00] <grepper> still starts at 0.016 ?
[08:00] <paulburk_> Yes
[08:00] <grepper> dunno, I'm no expert, I just thought -copyts might address that
[08:01] <paulburk_> grepper: I appreciate it
[08:02] <paulburk_> I believe it may have something to do with the fact that AAC has block sizes at 1024
[08:03] <paulburk_> I've tried removing an aframe, and that will bring the duration down to 1.00 but the start is still 0.016
[08:06] <paulburk_> I'm now noticing that the duration and start are different depending on where the -ss starts. I'm guessing this is due to the PTS/DTS, but am not sure how to control this.
[08:07] <grepper> I was just noticing that -vsync has a 'drop' option: "As passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate"
[08:08] <grepper> bah, I give up, I'll leave it to the experts, who are probably not here at this time
[08:08] Action: grepper gone to bed, good luck
[08:08] <paulburk_> grepper: I tried that and get a strange error. Thanks anyway!
[08:10] <paulburk_> If anyone else is listening, the error is "av_interleaved_write_frame(): Invalid argument", which led me in many different directions upon google searching
[08:22] <xlinkz0> any resources for learning about video formatting and codecs in general?
[08:24] <paulburk_> xlinkz0: http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
[08:25] <paulburk_> xlinkz0: http://sonnati.wordpress.com/2011/07/11/ffmpeg-the-swiss-army-knife-of-internet-streaming-part-i/
[08:27] <xlinkz0> thank you
[09:16] <david__> Good morning gentlemen. Here's my question/problem. I'm currently trying to use libffmpeg to feed audio packages to a hardware decoder. It seems (as the documentation on this decoder is really poor) that it only accepts AAC packages on ADTS format. While looking through the libffmpeg documentation I've found a bitstream filter that does exactly the opposite but nothing in the other direction far from two private functions on adts.c (ff_adts_write_fr
[09:16] <david__> ame_header and ff_adts_decode_extradata). Is there a way of doing this at high level or do I have to add the 7 bit headers to each AVPacket payload "manually"?
[11:11] <weecka> Hello guys, maybe somebody could help me. I have mp4 video file and I'm trying to convert it to be played on apple gadgets. I'm using ffmpeg segmentation option, but somehow it produces the m3u8 file with strange EXTINF values, like #EXTINF:16.691333 even if I set segment time to be 10 sec. Why it is doing this and how to get exact same segments?
[12:12] <victusfate> setpts is not setting timestamps in mpegts output containers
[12:12] <victusfate> https://gist.github.com/victusfate/5169087
[12:12] <victusfate> at least not that I would expect
[12:13] <victusfate> for an avi I get a shift in time stamps, original file 0-~10, output is 10-~20. for mpegts output is 1.4-~21.4
[12:35] <david__> Hello Again, allow me to re ask my question. I'm currently trying to use libffmpeg to feed audio packages to a hardware decoder. It seems (as the documentation on this decoder is really poor) that it only accepts AAC packages on ADTS format. While looking through the libffmpeg documentation I've found a bitstream filter that does exactly the opposite but nothing in the other direction far from two private functions on adts.c (ff_adts_write_frame_hea
[12:35] <david__> der and ff_adts_decode_extradata). Is there a way of doing this at high level or do I have to add the 7 bit headers to each AVPacket payload "manually"?
[13:15] <dmonjo> Unable to find a suitable output format for 'b:v'
[13:15] <dmonjo> avconv -i http://127.0.0.1:8000:/event1.ogv -c:v mpeg -c:a aac b:v 128k -flags -global_header -map 0:0 -map 0:1 -hls_time 10 -hls_wrap 64000 -hls_list_size 999 wsot19.m3u8
[13:15] <dmonjo> what am i doing wrong?
[13:15] <dmonjo> can i use HLS or Should use segment?
[13:15] <dmonjo> for generating H.264 AVC
[13:38] <AndrzejL> guys I have a command: ffmpeg -i "/home/andrzejl/video.mp4" -vcodec libx264 -r 23.976 -vpre fast -b 300k -acodec libmp3lame -ab 160k -ac 2 -f avi "/home/andrzejl/video.avi" and I wanted to add scaling to it. The video is in 1920x1080 and I want to scale it down to 960x540 but when I am adding  -vf scale=960:540 to the command it states unrecognized option -vf
[13:39] <AndrzejL> any chance of a help? it's a ffmpeg 6.5 so it's old and I cannot / am unable to upgrade it - I don't have root on the machine and only ssh access
[13:39] <spaam> try -s 960x540
[13:39] <AndrzejL> will do thank You.
[13:41] <AndrzejL> think it will work
[13:46] <JEEB> btw, you don't need root to compile a newer ffmpeg ;)
[13:46] <JEEB> --prefix is your friend :)
[13:47] <AndrzejL> I know but I do not want to mess in someone elses machine - the tool chain is old... everything is old...
[13:47] <AndrzejL> another question
[13:47] <AndrzejL> ffmpeg -i "/home/andrzejl/video.mp4" -vcodec libx264 -r 23.976 -vpre fast -b 300k -s 960:540 -acodec libmp3lame -ab 160k -ac 2 -f avi "/home/andrzejl/video.avi"
[13:47] <JEEB> how would you mess it up if it would be all contained without a specific folder, and you wouldn't even have to globally add it to PATH?
[13:47] <AndrzejL> Resampling with input channels greater than 2 unsupported.
[13:47] <AndrzejL> Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz
[13:47] <JEEB> it would literally mess up nothing :)
[13:47] <JEEB> I think that error message is rather straightforward :)
[13:48] <JEEB> hint: new ffmpeg supports that
[13:48] <AndrzejL> yes BUT can I copy the existing audio without converting it?
[13:48] <AndrzejL> something like -oac copy in mencoder?
[13:48] <JEEB> -acodec copy
[13:49] <AndrzejL> sweet...
[13:49] <JEEB> and remove the -ac
[13:49] <JEEB> because that will do nothing
[13:49] <JEEB> also I wouldn't recommend encoding H.264 into AVI
[13:49] <AndrzejL> sweet
[13:49] <AndrzejL> :D
[13:49] <AndrzejL> it's working...
[13:49] <AndrzejL> you guys are cleverer then you look at first sight
[13:49] <AndrzejL> TROLOL :D
[13:50] <AndrzejL> :P
[13:50] <AndrzejL> Just kidding of course
[13:50] <AndrzejL> I really like this channel - that's the second time I joined and someone helped me just like that...
[13:51] <JEEB> anyways, I'd really recommend you build some static libs and tools into your home folder's some directory (--prefix=/home/username/ownapps f.ex.), and build yourself a newer ffmpeg that way :)
[13:51] <dmonjo> ok guys i am facing some problems with my HLS encoded stream
[13:51] <dmonjo> -c:v libx264 -c:a libfdk_aac -b:v 92k -flags -global_header -map 0:0 -map 0:1 -hls_time 10 -hls_wrap 64000 -hls_list_size 999 wsot21.m3u8
[13:51] <dmonjo> now when i play this m3u8 file on an iphone
[13:51] <AndrzejL> and I am not sure what's Your experience but it really can be a pain in the butt to get someone knowledgeable to help you most of the time
[13:51] <dmonjo> it plays well and the client connects to the live stream
[13:52] <dmonjo> when i play it on android it plays always from the very start and does not start with the live ts file
[13:52] <dmonjo> what am i missing
[13:52] <dmonjo> it plays well on iphone (connect to live stream)
[13:53] <dmonjo> on android it connect and plays since beginning of time
[13:53] <dmonjo> am i missing some parameters?
[13:56] <dmonjo> HLS is outputing .TS files
[13:56] <dmonjo> can  i output .MP4 instead?
[13:56] <dmonjo> it does that autmatically
[13:56] <dmonjo> :/
[14:01] <Mavrik> uf
[14:01] <Mavrik> uh
[14:01] <Mavrik> HLS has to be muxed into TS
[14:04] <dmonjo> can m3u8 contain an MP$ if using segmeent?
[14:04] <dmonjo> mp4
[14:11] <AndrzejL> JEEB: is it possible that the video during the conversion (before finishing) has no sound? Will it just throw the audio on top of that when done resizing / converting?
[14:14] <Mavrik> that's a wierd question
[14:15] <Mavrik> audio and video streams are reencoded separately
[14:18] <AndrzejL> Mavrik: sorry ;D I am not very good with this ;D I used the acodec -copy in the command and downloaded / rsynced part of the video and it has no sound so I am wondering if something is wrong with the encoded video or will the final product has the sound ;D
[14:19] <AndrzejL> part of the converted* video (in the middle of the conversion)
[14:24] <Mavrik> ugh
[14:24] <Mavrik> depending on container
[14:24] <Mavrik> for most containers you can't just grab part of the file and expect it to work :P
[14:43] <AndrzejL> Mavrik: it's avi :)
[14:44] <AndrzejL> anyway I will know in about 170 000 frames ;)
[14:45] <Mavrik> yeah, avi doesn't really work that way
[14:45] <Mavrik> good luck :)
[14:48] <AndrzejL> ooops
[14:49] <AndrzejL> Mavrik: so you're saying when the file is done it SHOULD have both vid and audio?
[14:49] <AndrzejL> :P
[15:13] <dmonjo> can m3u8 support other than TS?
[15:24] <taqattack> Can someone help me? I get no audio on livestream if I use "-bsf:a aac_adtstoasc" option (http://pastebin.com/HvH8cFLh)
[15:26] <zap0> what makes you think that ought to work?
[15:28] <taqattack> because if i dont add that I get "Malformed AAC bitstream detected: use audio bitstream filter"
[16:13] <paulburk_> I'm using -ss (after -i) to extract a video clip that results in a video that starts at something other than 0.00 (determined with ffmprobe). I'm using libx264 and aac encoders, and suspect it is due to the reulting audio length. More details: http://pastebin.com/z3fy0pWp
[16:15] <paulburk_> Any help. tips, or links are greatly appreciated. Have been stuck on this for days (and tried a thousand commands).
[16:25] <Celsyum> Hi, im stuck with ffmep for two weeks and I need some help. Im using AIR 2.0 to send rawdata to ffmpeg and everything is working nice on Windows , but on Linux video fails to render.  In 6 seconds of streaming ffmpeg just renders 8-10 frames on Linux, thougth I set 30 fps and on Windows rendered file is perfect. Here is Command: http://pastebin.com/UQirYCxF . Windows output http://pastebin.com/s0z
[16:25] <Celsyum> JmcAX  . Linux output http://pastebin.com/qU0y69wX
[16:26] <Celsyum> Hi, im stuck with ffmep for two weeks and I need some help. Im using AIR 2.0 to send rawdata to ffmpeg and everything is working nice on Windows , but on Linux video fails to render.  In 6 seconds of streaming ffmpeg just renders 8-10 frames on Linux, thougth I set 30 fps and on Windows rendered file is perfect. Here is Command: http://pastebin.com/UQirYCxF .
[16:26] <Celsyum> Windows output http://pastebin.com/s0zJmcAX  . Linux output http://pastebin.com/qU0y69wX
[16:29] <dmonjo> guys is there a way to transcode VP8 into MPEG?
[16:30] <dmonjo> isthere a way to transcode VP8 to MPGTS m3u8 HLS ????
[16:30] <Celsyum> be patient , im waiting for response too :)
[16:44] <taqattack> Can someone help me? I get no audio on livestream if I use "-bsf:a aac_adtstoasc" option (http://pastebin.com/HvH8cFLh)
[18:54] <xlinkz0> does ffmpeg support intel quick sync?
[19:14] <durandal_1707> xlinkz0: nope
[19:20] <Jordan_> what is -bufsize good for shall i just leave that out?
[19:21] <burek> it tells you of a period of time
[19:21] <Jordan_> what?
[19:22] <burek> over which ffmpeg will do the bitrate avareging
[19:22] <burek> it's used with -maxrate and -minrate
[19:22] <Jordan_> I soft of understand
[19:23] <Jordan_> so if i just use crf then I don't need bufsize?
[19:23] <burek> im not sure, but ive seen people using it mostly with -min/maxrate
[19:23] <burek> what are you trying to achieve with that option anyway?
[19:23] <Jordan_> which option?
[19:23] <burek> -bufsize ?
[19:24] <Jordan_> bufsize I just see all the examples using it I assumed I needed it
[19:25] <mark4o> you will probably want all 3 -crf, -maxrate, and -bufsize.  Use the -maxrate & -bufsize to limit the rate, so that your video will play without choppiness on devices that cannot handle a high rate
[19:27] <burek> mark4o, do you happen to know why ffmpeg sometimes doesn't respect limits imposed by maxrate ?
[19:27] <mark4o> did you specify both -maxrate and -bufsize?
[19:28] <burek> yes
[19:28] <burek> like
[19:28] <burek> -b:v 900k -bufsize 900k -maxrate 1500k
[19:28] <burek> and the video stream sometimes go even over 2000k
[19:28] <lakemalcom> i'm trying to get aac CBR audio on a file, but when i run this http://pastebin.com/jv4gTfjN and check the output with mediainfo, the file still says the bitrate is variable and has a max of 10,000kbps
[19:29] <burek> lakemalcom, instead of mediainfo, please use ffmpeg -i output.mp4
[19:29] <burek> and provide us with the pastebin output
[19:30] <lakemalcom> http://pastebin.com/FjHEnmPn
[19:32] <lakemalcom> doesn't provide as much info there, the problem is that flash still thinks its VBR so it will play audio out of sync in a web player, like jwplayer
[19:32] <lakemalcom> if i run through another encoder that somehow changes metadata (maybe?) then the mode is set to be CBR and the max bitrate of 10,000 goes away
[19:38] <mark4o> burek: re maxrate: Is your source video only?  If video & audio try -maxrate:v -bufsize:v and check that you are measuring just the video rate.  (If you accidentally used flac or other lossless audio your audio could be the whole 2000k.)  Also I don't think it will be limited by maxrate if it requires more than that, for example with very high resolution or lossless encoding.
[19:41] <Jordan_> how does one choose a bufrate
[19:41] <Jordan_> i mean bufsize
[19:43] <klaxa> -bufsize $(($((RANDOM % 256))*256))
[19:50] <Jordan_> is that a joke?
[19:51] <mark4o> Jordan_: it depends on what device you are encoding for; each device can handle a maximum average bitrate over a particular buffer size. For example the ipod640 preset sets maxrate to 10000000 and bufsize to 10000000
[19:51] <Jordan_> 10000k
[19:52] <Jordan_> well does it have any effect on the quality
[19:53] <mark4o> It will ensure that the bitrate does not exceed the amount you specify, so it will reduce quality in complicated scenes that would otherwise take a higher bitrate, compared to not using -maxrate/-bufsize.
[19:55] <Jordan_> well maxrate i understand that how does bufsize come into play
[19:56] <Jordan_> lets say i have maxrate 1k, and maxbuf 2k
[19:56] <Jordan_> i mean bufsize 2k
[19:56] <mark4o> If you are asking how does varying the value of -bufsize affect quality, a higher bufsize will allow for a higher quality because it will not have to reduce the bitrate as long as the average over the higher bufsize is still < maxrate.  Of course that means that the rate may increase in the short term so if the actual device bufsize is smaller and therefore cannot handle the short term bitrate increase then it may not play smoothly.
[19:58] <mark4o> 2k is way too small.  For SD video I use -maxrate:v 1400k -bufsize:v 2000k for compatibility with most devices.
[19:58] <Jordan_> it is an example of what it means
[20:00] <Jordan_> so if bufsize is 2k then it could exceed the 1k maxrate?
[20:03] <mark4o> With -maxrate 1k -bufsize 2k, that means that if you take any consecutive 2k of video, the average rate will be kept to a maximum of 1kb/s.  So to answer your question, yes, if you looked at say the first 1k of that it could be e.g. 1.5kb/s.  As long as the next 1k averaged .5 kb/s or less then it still averages 1kb/s over 2k bufsize so it would  be ok.
[20:04] <Jordan_> ok that's kind of what i thought
[20:04] <mark4o> With video you have I frames that take much higher bitrate than B or P frames, so you have temporary spikes in bitrate and need to average it over some period.
[20:08] <Jordan_> /maxrate is a target rate over time, bufsize allows the bitrate to peak as long as it is compensated later to achieve the maxrate
[20:14] <Jordan_> I want to optimize fast seeking and jogging through video, what shall i set the GOP to?
[20:15] <Jordan_> I know many use about 10 seconds of frames as GOP size
[20:15] <Jordan_> I am thinking 1/2 second
[20:16] <Jordan_> but perhaps I could use 1 or 2 seconds, which would allow better quality
[20:37] <Jordan_> any suggestions on gop sizE?
[20:50] <mark4o> Jordan_: .5 s should be no problem.  I have a hardware encoder that uses a fixed .5 s key interval.
[20:52] <Orbixx> On win32 builds, where is ffmpeg looking when searching for presets?
[20:52] <JEEB> no idea for -ffpresets, but -preset presets (libx264's) are within the libx264 library, so it doesn't have to look for them anywhere
[20:53] <Orbixx> The preset directory is in the directory where I'm launching the ffmpeg binary
[20:53] <Orbixx> Yet it cannot find them :/
[20:53] <JEEB> I'm pretty sure it's not looking in the current working directory :P
[20:54] <JEEB> and as I said, if you are trying to use the x264 ones, those are within the binary
[20:55] <Orbixx> JEEB: Sorry I didn't mean CWD
[20:55] <Orbixx> I meant the presets are in the directory where the ffmpeg binary resides
[20:56] <Orbixx> I'm trying to use vpx presets
[20:56] <JEEB> try looking at the folder structure of the archive :)
[20:56] <JEEB> I think the ffmpeg binary was in bin/ and then the presets were somewhere else :)
[20:58] <llogan> Orbixx: try -fpre and give it the full path to the preset file. IIRC/im not a win user.
[20:59] <llogan> (but there is probably a better/newer method)
[21:30] <taqattack> Can someone help me? I get no audio on livestream if I use "-bsf:a aac_adtstoasc" option (http://pastebin.com/HvH8cFLh)
[22:49] <Jordan__> 720x480 [SAR 40:33 DAR 20:11], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc  what do each of these mean?
[22:49] <Jordan__> SAR DAR? tbr, tbn, tbc?
[22:50] <JEEB> SAR = sample aspect ratio
[22:50] <JEEB> DAR = display aspect ratio
[22:50] <JEEB> (sample can be a pixel or whatever, one sample)
[22:50] <JEEB> tbX are timebases
[22:50] <JEEB> tbc is the container time base
[22:51] <JEEB> (IIRC)
[22:51] <Jordan__> a pixel?
[22:52] <Jordan__> you mean a frame
[22:52] <dmonjo> is it possible to convert VP8 to MPEG-TS HLS?
[22:53] <Jordan__> JEEB do you think it is important to keep the aspect ratio when coverting to a lower resolution and which should I use the 40:33 or 20:11
[22:54] <JEEB> <Jordan__> you mean a frame <- DAR is frame's aspect ratio
[22:54] <JEEB> SAR (or PAR, whichever wording you like better) is the aspect ratio of a single sample
[22:55] <JEEB> if you downscale enough, I'd say you might as well start using 1:1 aspect ratio
[22:55] <JEEB> as in, resize with the aspect ratio in mind
[22:55] <JEEB> instead of just resizing it and keeping the SAR/DAR
[22:58] <Jordan__> so in the options -s 360x240
[22:58] <Jordan__> to cut it in half
[22:59] <JEEB> uhh
[22:59] <JEEB> no
[22:59] <JEEB> if you downscale, you try to get SAR 1:1
[22:59] <JEEB> f.ex. 720x480 with SAR 40:33 is 875x480 or so
[22:59] <JEEB> then you downcale that :V
[23:00] <JEEB> that way you get a downscaled picture with a 1:1 SAR
[23:02] <Jordan__> is SAR always available
[23:02] <enuguri> hi does anyone know how to find how many channels there in the audio with ffmpeg
[23:03] <enuguri> i was using mediainfo but it gives me seg fault error so my script to catch the properties dies there and the encoding fails
[23:03] <JEEB> Jordan__, rephrase your question? All pictures have a SAR
[23:03] <JEEB> most pictures have a SAR of 1:1, but that is not necessarily the case
[23:03] <enuguri> I am trying to implement a workaround if I can get the no. of audio of channels using ffmpeg can anyone please help me on this
[23:04] <JEEB> enuguri, try ffprobe?
[23:04] <JEEB> although you're on your own with it, I have not ever used it :P
[23:04] <enuguri> i will give it a try
[23:05] <Jordan__> so I should go by sar and forget about dar, what is the 720x480 in, is that just how many samples there are, if so how di it come up with dar
[23:05] <mark4o> enuguri: ffmpeg -i file  or  ffprobe file  - look for lines like Stream ... Audio - should say mono, stereo, etc.
[23:05] <JEEB> Jordan__, SAR and DAR convey the same information in a different way :P
[23:06] <JEEB> SAR is the aspect ratio of a single sample
[23:06] <JEEB> DAR is the aspect ratio of the final picture
[23:06] <JEEB> 720x480 is the amount of samples in width and height
[23:07] <JEEB> (in most cases, pixels -- but specifications generally point towards them with the generic word 'sample')
[23:07] <enuguri> mark40: for ac3 it shows me stereo is that ok
[23:08] <Jordan__> why would they not keep the sar 1:1
[23:08] <enuguri> mark40: or is it reporting wrong I am using ffmpeg -i to get that
[23:08] <mark4o> enuguri: stereo = 2 chanels
[23:09] <Jordan__> so when it displays it not really 720x480?
[23:09] <enuguri> mark40: it shows like this  Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[23:09] <mark4o> Jordan__: width * SAR / height = DAR
[23:09] <enuguri> mark40: can you please tell me how to understand this
[23:09] <mark4o> enuguri: looks like stereo (2 channels) to me
[23:09] <JEEB> <Jordan__> why would they not keep the sar 1:1 <- because various standards and such declare that the SAR has to be something, as well as generally other limitations
[23:10] <JEEB> for example, 720x480 with a SAR of 40:33 sounds to me either like an SD blu-ray track, or a DVD track
[23:10] <enuguri> mark40: you mean to say even though the audio codec used is ac3 it is not necessary for it to have 6 channels in it. Am I understanding this correctly?
[23:10] <JEEB> (or a UMD track, they all used similar resolutions and SARs)
[23:12] <mark4o> enuguri: correct, ac3 can have 1 to 6 channels
[23:12] <enuguri> mark40: thanks
[23:13] <JEEB> Jordan__, anyways -- reasons for what you have on hand not having a 1:1 SAR is due to either how the source was created, or how it was dealt with until it came to your hands. DVDs for example never were 1:1.
[23:14] <JEEB> or most standard definition analog capture inputs
[23:14] <dmonjo> is VP8 encoding faster/better  in compression for slow connections?
[23:14] <JEEB> were 720x486
[23:15] <JEEB> (and when you remove the extra lines for random information, you get 720x480)
[23:15] <Statice> Hi! I was wondering if it's possible to do a constant moving crop using ffmpeg, however I couldn't find anything online about it. Is it possible, or should I just write my own filter to do so?
[23:16] <Statice> Trying to make a moving audio track visualization
[23:17] <llogan> dmonjo: ffmpeg has a native VP8 decoder and can also use libvpx to decode IIRC. so there's half an answer for your earlier question.
[23:17] <mark4o> Statice: the crop filter can take an expression for the position
[23:17] <Jordan__> JEEB so the square pixel resolution would be 720*40/33 x 480
[23:17] <JEEB> yes
[23:17] <JEEB> which is around 875x480
[23:17] <Statice> ok, I'll look into it, thanks!
[23:17] <JEEB> that is how it should be shown :)
[23:18] <Jordan__> which is the DAR
[23:18] <urashidmalik> Hey Guys, I am having problem getting ffserver to stream rtsp (x264/acc)
[23:18] <JEEB> Jordan__, and yes, that picture should have an aspect ratio equalling the DAR
[23:18] <Jordan__> So I may as well use the DAR for scaling
[23:18] <JEEB> yeah
[23:18] <JEEB> whatever you like :)
[23:19] <Jordan__> less math
[23:19] <urashidmalik> i am able to get webm stream working, but in case of rtsp, when stream is tested from ffplay it returns
[23:19] <urashidmalik> DESCRIBE failed: 503 Service Unavailable
[23:19] <urashidmalik> rtsp://localhost:8544/test.sdp: Invalid data found when processing input
[23:19] <Jordan__> is there any way I can tell ffmpeg on the command line to do that for me or do i need to figure that out myself
[23:19] <JEEB> Jordan__, there's a way to use the vf scale filter to take into mention SAR/DAR
[23:19] <Jordan__> yes that's what i want
[23:20] <JEEB> (also it's possible to make sure the final resolution is mod2
[23:20] <JEEB> which is generally needed in most cases :)
[23:20] <Jordan__> i also read it is better to have width and height divisible by 16
[23:20] <JEEB> that isn't generally true any more
[23:20] <JEEB> at least with x264
[23:20] <JEEB> it used to be before
[23:21] <Jordan__> how long ago is used to
[23:21] <JEEB> http://ffmpeg.org/ffmpeg-filters.html#scale
[23:21] <JEEB> ^ see the examples here btw for inspiration
[23:21] <JEEB> Jordan__, 2009-10-25 - "Remove non-mod16 warning"
[23:22] <JEEB> in x264
[23:22] <Jordan__> so that used to be a hardware problem, that is now fixed in software
[23:22] <Jordan__> or is it fixed with newer hardware
[23:23] <JEEB> nah, it was a problem with older encoders
[23:23] <Jordan__> ok fine i won't worry about that then
[23:23] <JEEB> with non-mod16 you used to get worse performance, but with x264 nowadays the difference of having some padding to mod16 and not having any is so small
[23:23] <Zeeflo> hi guys
[23:23] <JEEB> just keep it mod2 so 4:2:0 works lol
[23:23] <Zeeflo> Hi JEEB
[23:23] <urashidmalik> hi JEEP
[23:23] <Jordan__> http://www.encoding.com/help/article/suggestions_for_improving_quality_with_h.264_settings
[23:24] <Jordan__> ^ that is where i got the 16x16 macroblocks
[23:24] <JEEB> AAAAAAAAAAAA
[23:24] <JEEB> anyways, yes -- H.264 operates in 16x16 MBs
[23:24] <Zeeflo> is it possible to stream DTS in a aac container and have it streamed?
[23:24] <JEEB> but the difference is so small in compression
[23:24] <JEEB> that in 2009 x264 removed the non-mod16 warning
[23:24] <dmonjo> llogan: so i can decode the vp8 and use hls mux to generate the mpgts ?? this is a live stream
[23:25] <JEEB> internally the stream will be padded, but the padding compresses so well that you don't have to care
[23:25] <Jordan__> k good one less thing to worry about
[23:25] <llogan> dmonjo: yes, you can decode VP8. i have no experience with HLS.
[23:26] <JEEB> Jordan__, also f.ex. 1080p isn't a mod16 resolution to begin with, lol
[23:26] <Zeeflo> anyone?
[23:26] <Jordan__> JEEB I think you were the one that suggested GOP 3 for fast seeking, do you see a problem with say 1/2 sec or full second gop
[23:26] <urashidmalik> hey zeeflo i am also waiting for some guru to respond :)
[23:26] <Zeeflo> hehe
[23:27] <JEEB> GOP of three frames was a random result of a test my video editor friend did
[23:27] <JEEB> I mean, for BLAZING FAST seeking
[23:27] <JEEB> you don't use it for streaming or normal encoding
[23:27] <JEEB> normal encodes I do have the maximum GOP length set at around 10 seconds plus
[23:28] <JEEB> streaming will normally preferably have shorter maximum GOPs tho
[23:28] <JEEB> 1/2sec to full second is TV/DVD/BD/HD-DVD level
[23:28] <relaxed> Zeeflo: I think you're confused. What are you trying to accomplish?
[23:28] <JEEB> sacrificing compression in order to either quickly get a full picture, or to get quick seeking
[23:29] <Jordan__> no it isn't streaming, I have a jogger and I don't like it when it takes a while to see the frame after you seek
[23:29] <Jordan__> this is mostly a problem with the resolution is high
[23:29] <JEEB> try with a 2-3 second maximum GOP length first, and then if you really need shorter ones then limit it more
[23:30] <Zeeflo> relaxed, currently i encode with strict experimental 128k 2 channel stereo AAC.. My source has a DTS track with 5.1 sound 1536k .. Can i convert that to aac 5.1 1536k ?
[23:30] <Jordan__> k i'll try those
[23:30] <Zeeflo> and would I be able to stream it?
[23:30] <Zeeflo> can flash handle 5.1?
[23:31] <relaxed> I'm not sure that aac supports 5.1.
[23:31] <Zeeflo> im not sure of that either..
[23:32] <relaxed> wikipedia says yes but I dount it will work with flash.
[23:32] <relaxed> doubt*
[23:33] <Zeeflo> well.. theres only 1 way to find out :)
[23:33] <llogan> the native AAC encoder can encode to 5.1, so can libfaac and libfdk_aac
[23:33] <Zeeflo>  -c:a aac -strict experimental -ac 5.1 -b:a 1536k
[23:33] <Zeeflo> is that correct?
[23:34] <llogan> that's 256k/channel. are you sure you need it that high?
[23:34] <relaxed> I've never ran across 5.1 aac in the wild.
[23:35] <llogan> same
[23:35] <Zeeflo> well.. I wanna test..
[23:35] <Zeeflo> So what would the option be?
[23:35] <Zeeflo> the before mentioned one doesnt run
[23:35] <Zeeflo> this is the source: Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
[23:35] <llogan> "doesn't run" is uninformative.
[23:36] Action: llogan brings out a crystal ball
[23:36] <Zeeflo> i get this error: Expected int64 for ac but found 5.1
[23:36] <llogan> damn...it doesn't run either
[23:36] <relaxed> Zeeflo: isn't it -ac 6
[23:36] <relaxed> 5+1
[23:36] <Zeeflo> yup.. that runs
[23:36] <LithosLaptop> 5.1 is decimal not an integer of 64bits
[23:37] <Zeeflo> yea.. it works ith -ac 5
[23:37] <Zeeflo> *6
[23:37] <relaxed> LithosLaptop: thanks captain
[23:38] <LithosLaptop> :)
[23:59] <Zeeflo> FYI, aac 5.1 1536k works with rtmp streaming / flash
[23:59] <relaxed> good to know
[00:00] --- Sat Mar 16 2013


More information about the Ffmpeg-devel-irc mailing list