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

burek burek021 at gmail.com
Thu Jun 20 02:05:01 CEST 2013


[00:06] <lacrymology> hm
[00:07] <lacrymology> I can't make it work. As in: I can't decode, encode, and transmit x264 at 1920x800 in real time. The server will probably be at least 3 or 4 times as fast as my dev machine, but still..
[00:10] <lacrymology> plus, I'm having what I think are transport errors
[00:13] <vulture> if you're over a network it's unlikely you'd see real real time
[00:13] <vulture> what are you using for transport
[00:13] <lacrymology> vulture: I'm running locally
[00:13] <lacrymology> but I mean
[00:13] <lacrymology> I can't do all that at 1x, I don't reach 24fps
[00:14] <lacrymology> vulture: mpegts
[00:15] <vulture> oh
[00:15] <vulture> if that's a compute problem idk :p
[00:15] <vulture> faster computer?
[00:15] <vulture> more cores
[00:18] <lacrymology> vulture: I know, but in any case, I don't think it'll be feasible, the real server will be encoding files pretty much all the time
[00:18] <lacrymology> plus 24/7 decoding + broadcasting
[00:21] <lacrymology> vulture: about the transport issue, any clues? I'm seeing frames skipping and whatnot. Also, with smaller videos, I saw like a LOT of gray non-changing frames (long distance between keyframes) with zerolatency on.. I thought that wouldn't happen\
[00:22] <vulture> no idea, I hate mpegts ;)
[00:22] <vulture> it was designed for failure (literally!)
[03:48] <praveenmarkandu> hi. I am looking at my ffmpeg built on Mar 11 2013 07:31:21
[03:49] <praveenmarkandu> and it seems to have a HLS muxer
[03:49] <praveenmarkandu> should I use this instead of -f segment
[03:50] <praveenmarkandu> also, what version of apples HLS is this compatible to?
[04:36] <klaxa> i seem to be doing something wrong while using bash variables or this is an ffmpeg bug: https://gist.github.com/klaxa/5811286
[04:36] <klaxa> the video filter subtitles is parsed correctly apparently
[04:37] <klaxa> but it states that it was initialized with no parameters
[04:37] <klaxa> yet the debug output states that it was
[04:38] <klaxa> >Applying option vf (set video filters) with argument subtitles=[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
[04:38] <klaxa> >...
[04:38] <klaxa> >[Parsed_subtitles_0 @ 0x169c1c0] No filename provided!
[04:59] <klaxa> i can't seem to use a file with spaces in the name
[04:59] <klaxa> even with static builds
[05:00] <klaxa> if i rename the file to "file.mkv" it parses everything correctly
[05:00] <klaxa> i will work around this for now, if someone can confirm this behavior i will file a bugreport
[05:03] <elkng> anyone here ?
[05:04] <klaxa> maybe?
[05:04] <klaxa> nobody could answer my request though :P
[05:08] <elkng> I use those two commands http://sprunge.us/hjXE to make 2 pass convertion of video with 1500kb/s bitrait that could be enough to look nice, but output video contains very bad quality frames, most of the video in that quality http://imagebin.org/index.php?mode=image&id=261843 thats is good enough, but sometimes especially when there is and action frames could look that way http://imagebin.org/index.php?mode=image&id=261842, and interesting enough it starts 
[05:08] <elkng>  1.1 version as I remember to 1.2 version, is why would quality becomes so bad ?
[05:09] <klaxa> overcompensation in high-movement scenes?
[05:09] <klaxa> sorry, i don't know most of the flags you are using
[05:13] <elkng> me either, I copied them from some article about 2 pass encoding
[10:11] <vlt> Hello. If you wanted to playback a list of audio files with customisable crossfades, so that on key press the next (or a certain selected) track immediately fades in, for example, in 150 ms while the currently running fades out in 750 ms, what would you use? Any idea? Is there something I can script?
[10:11] <vlt> I tried mocp, cmus, xmms2, mpd, mplayer. No success so far.
[10:32] <xreal> When I use latest ffmpeg on a mp4 file with copy, audio & binary get set to CONSTANT, but they're VARIABLE. What's wrong? :(
[10:36] <xreal> this makes me crazy
[11:35] <xreal> When I use latest ffmpeg on a mp4 file with copy, audio & binary get set to CONSTANT, but they're VARIABLE. What's wrong? :(
[12:04] <xreal> yeah, it seems to be a bug of ffmpeg
[12:06] <tlhiv_laptop> hi ... i have a 320x240 MP4 ... is there a way to "crop" the video so that everything outside of a 320x240 ellipse is set to white?
[12:07] <saste> tlhiv_laptop, you can user overlay to reach that purpose
[12:08] <tlhiv_laptop> saste: you wouldn't happen to have an example lying around would you?
[12:11] <xreal> When I use latest ffmpeg on a mp4 file with copy, audio & binary get set to CONSTANT, but they're VARIABLE. What's wrong? :(
[12:12] <xreal> binary <=> video :)
[12:12] <saste> tlhiv_laptop, no, you need to generate the ellipse alpha mask and overlay it on the image to cover
[12:12] <tlhiv_laptop> ok ... i'll try that
[12:20] <tlhiv_laptop> saste: that worked beautifully
[12:22] <saste> tlhiv_laptop, how did you create the mask?
[12:23] <tlhiv_laptop> http://pastebin.tlhiv.org/qA2HRbUL
[12:23] <tlhiv_laptop> click "Send to MetaPost Previewer" button
[12:23] <tlhiv_laptop> and once there hit "Preview"
[12:23] <tlhiv_laptop> this is my MetaPost Previewer ... i opened the graphic in Gimp and removed the middle of the ellipse with a magic wand
[12:25] <saste> tlhiv_laptop, i see
[12:25] <saste> i think it should be also possible to use imagemagik scripting
[12:26] <xreal> could anyone please help?
[12:26] <saste> or even geq to generate the alpha ellipse, although with a fairly complicated expression
[12:29] <xreal> When I use latest ffmpeg on a mp4 file with copy, audio & video get set to CONSTANT, but they're VARIABLE. What's wrong? :(
[12:34] <xreal> damn FUCK
[12:35] <saste> xreal, audio & video set to CONSTANT, doesn't make much sense
[12:35] <saste> what is constant?
[12:36] <xreal> @saste: the data rate.
[12:36] <xreal> @saste: the incoming audio and video have a variable data rate.
[12:36] <saste> xreal, !pb
[12:36] <xreal> @saste: oaky, but PLEASE dont go away
[12:37] <xreal> unknown domain: www.pastie.org
[12:37] <JEEB> just use pastebin.com or whatever hits your fancy :P
[12:38] <saste> xreal, pastie.org, fflogger should be updated
[12:38] <saste> who's responsible for it?
[12:42] <xreal> pastebin.com/0gWaBRgg
[12:43] <xreal> As you can see, before copy, the audio was variable bitrate. But the result is constant.
[12:43] <xreal> Seems like, the header is wrong.
[12:44] <JEEB> you would have to check what exactly mediainfo is checking
[12:44] <JEEB> you should not generally blindly trust what it says
[12:44] <xreal> funny, it works with avconv !
[12:45] <JEEB> in any case, the stream itself isn't changed
[12:45] <xreal> JEEB: ffmpeg isn't capable of telling, if it's VBR or CBR at all. So mediainfo is the only way.
[12:45] <xreal> JEEB: Yeah, but the mp4 header seems to be wrong.
[12:45] <JEEB> and mediainfo is a bad way of checking it
[12:45] <xreal> JEEB: tell me a good way
[12:46] <JEEB> parsing the stream?
[12:46] <xreal> JEEB: --verbose please
[12:46] <JEEB> parse the stream for what is your amount of buffer in which you would calculate the average rate, and if that stands at constant then that's it etc.
[12:47] <xreal> JEEB: I mean, *how* can I do this?
[12:47] <JEEB> by default you should imply that everything is VFR
[12:47] <JEEB> xreal, by writing some software?
[12:47] <JEEB> modifying libavformat or so could be useful
[12:47] <xreal> JEEB: eeh no. I'll use avconv then. The bug seems to be fix there. But thanks for help.
[12:47] <JEEB> possibly together with libavcodec to get the decoded lengths
[12:47] <xreal> fixed*
[12:47] <JEEB> xreal, uhh
[12:47] <JEEB> check what on earth mediainfo is basing its lulzy numbers on first of all
[12:48] <JEEB> after that if it's something specification-wise that ffmpeg is setting wrong in the container
[12:48] <JEEB> then it's a bug
[12:48] <JEEB> otherwise the problem is in how mediainfo is "parsing" the stuff
[12:48] <JEEB> because mediainfo quite certainly does not even make an attempt at parsing the file much to get its information
[12:48] <xreal> Is there a way to find out, if an AAC file is VBR or CBR ?
[12:49] <JEEB> yes, but no-one does it because everyone wants to go out "cheaply"
[12:49] <xreal> JEEB: That's wrong. Here it scans the whole file and tells me the highest, lowest and aveerage bitrate.
[12:49] <JEEB> thus you would have to write code basing on current libraries to do it
[12:49] <JEEB> ahahaha
[12:49] <JEEB> anyways, go check the mediainfo code
[12:49] <JEEB> and check what exactly it does to do that "check" of its
[12:49] <JEEB> seriously
[12:49] <JEEB> mediainfo is useful for some things
[12:49] <xreal> JEEB: I'm a user, not a developer.
[12:50] <JEEB> well then poke the mediainfo developer in that case, although he does have a "pay me, and I will take a look" kind of ideology :P
[12:50] <JEEB> have someone who has the time to look into it then
[12:50] <xreal> JEEB: I'm not conviced, it's a problem of mediainfo.
[12:50] <xreal> JEEB: the problem occures with ffmpeg only.
[12:50] <JEEB> argh
[12:51] <xreal> JEEB: ffmpeg says, the file is 127 kbit/s. that's wrong.
[12:51] <JEEB> the idea being that we don't know what on earth mediainfo is basing its information on
[12:51] <xreal> JEEB: then why doesn't ffmpeg tell me the information?
[12:51] <xreal> JEEB: the output of "ffmpeg -i" is useless.
[12:51] <JEEB> what?
[12:51] <xreal> JEEB: it just shows the average. it doesn't tell me, if it's VBR or CBR.
[12:52] <JEEB> that's because generally you shouldn't care about if something is VBR or CBR... if you really need to find out that you have some super special use case. But it shouldn't be too hard to write an app that might help you decide within your own needs whether or not its CBR or VBR
[12:52] <xreal> Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s
[12:52] <xreal> I *do* care.
[12:52] <JEEB> anyways, I'm just trying to say that you can't blame either side before we know what on earth mediainfo is checking there
[12:53] <JEEB> because it's not the first time that mediainfo would be reporting weird values with stuff
[12:53] <JEEB> for some things mediainfo is useful, but you should be really careful trusting it :P
[12:53] <xreal> JEEB: why isn't there a better toolß
[12:53] <xreal> tool? *
[12:53] <JEEB> because no-one has had exactly that kind of need yet? :P
[12:54] <JEEB> although to be honest, what would you consider CBR?
[12:54] <xreal> nobody needed a tool to check if an AAC file is VBR or CBR ??
[12:54] <JEEB> every packet needs to be exactly the same size?
[12:54] <JEEB> the amount of bits used per second has to be the same?
[12:54] <tlhiv_laptop> saste: i decided to go with a circle instead of an ellipse --> http://www.tlhiv.org/ma110/
[12:55] <JEEB> there is no clear definition of what "CBR" means in most cases. For example with H.264 "CBR" is generally VBR with a buffer and a maxrate
[12:55] <tlhiv_laptop> obviously i have to re-record these when i get blinds/shades in my office (which should be any day now) :-)
[12:55] <JEEB> you'd need to know those two in order to see if it's CBR or not, and those are not available from the bit stream
[12:55] <xreal> JEEB: I just know VBR and CBR from LAME.
[12:55] <saste> tlhiv_laptop, cool :)
[12:56] <JEEB> xreal, welcome to the Real World. Also, you might want to actually check what CBR in there actually means. Is it packet-size being constant or constant average rate over some time frame?
[12:56] <xreal> JEEB: opy, so what's the right way to remove metadata using ffmpeg? http://pastebin.com/6bU3UymN
[12:57] <xreal> JEEB: okay* :)
[12:58] <JEEB> xreal, -map_metadata -1
[12:58] <tlhiv_laptop> saste: i am using ffmpeg to record the videos (v4l) and so i guess it's possible to record the videos directly with this circular overlay right?
[13:00] <saste> tlhiv_laptop, yes
[13:00] <tlhiv_laptop> awesome ... thanks for the help
[13:00] <saste> possibly although a bit complicated (you may need to master the lavfi syntax)
[13:01] <saste> how do you generate the background?
[13:01] <tlhiv_laptop> it's very little work to postprocess it with the circle.png i created
[13:01] <tlhiv_laptop> you mean the slides?
[13:01] <tlhiv_laptop> using LaTeX (beamer)
[13:01] <xreal> JEEB: I am currently using mp4box to mux .264 and .aac. but I don't like their metadata. Shall I keep on using mp4box and strip the data using ffmpeg or do it all in ffmpeg ?
[13:02] <tlhiv_laptop> and MetaPost for the graphics (like that number line)
[13:02] <JEEB> the last I checked raw Annex B to "MP4" muxing was failing timestamp wise if you had any B-frames
[13:02] <JEEB> so you kind of end up with L-SMASH :P
[13:03] <xreal> JEEB: actually, I've got a FLV with MP4 inside.
[13:03] <ubitux> hehe cool the circle thing
[13:03] <xreal> JEEB: I've splittet it with FLV-Extract to AAC, 264 and TXT with timestamps.
[13:03] <JEEB> xreal, might as well remux with ffmpeg and skip the step with flv extract?
[13:03] <saste> tlhiv_laptop, I mean, how are you generating the background video with the slides? how do you grab it?
[13:04] <saste> i think it should be possible to do that thing with x11grab
[13:04] <tlhiv_laptop> something like this
[13:04] <tlhiv_laptop> ffmpeg -loglevel quiet -f v4l2 -r 25 -s 320x240 -i /dev/video0 -f alsa -i hw:1,0 -g 1 -vcodec libx264 -acodec libfaac -y out.mp4
[13:04] <JEEB> since already muxed (has timestamps) H.264 to "MP4" should be OK
[13:04] <xreal> JEEB: let me try
[13:04] <xreal> JEEB: ffmpeg -i input.flv -c copy -copyts output.mp4 ?
[13:05] <JEEB> you don't need the -copyts
[13:05] <saste> tlhiv_laptop, and then you combine it with the slide video?
[13:05] <ubitux> tlhiv_laptop: and now add 'rotate=2*PI*t' so you can spin around in your circle
[13:05] <saste> tlhiv_laptop, but feel free to ignore my question, i'm just curious
[13:05] Action: ubitux runs
[13:05] <tlhiv_laptop> i have a modified (i had to edit the source code) version of ffmpeg that when i press the SPACE bar it appends the current time in the video to a text file and thus is can talk through the slides as i'm recording them and every time i hit the space bar it records where in the video i am
[13:06] <xreal> JEEB: sure?
[13:06] <tlhiv_laptop> saste: yes ... then i combine it with high quality (1280x720) versions of the slides
[13:07] <JEEB> yes?
[13:07] <JEEB> I have no idea when -copyts is needed, but not with container->container interaction in most cases
[13:07] <tlhiv_laptop> i wrote a perl script to take the text file containing those times and generate my slides MP4 by displaying each slide for the length of time dictated by that times text file
[13:07] <tlhiv_laptop> if that makes sense
[13:08] <xreal> JEEB: the audio seems to be ADTS. is that okay? perhaps that's the problem
[13:09] <saste> tlhiv_laptop, interesting
[13:10] <xreal> JEEB: Are these files optimized for streaming, like mp4box does?
[13:10] <tlhiv_laptop> the most difficult part (in my opinion) was modifying ffmpeg so that as it's recording i can press the space bar and have it store those times in a file
[13:10] <JEEB> xreal, there's an option for that
[13:10] <JEEB> don't remember it :P
[13:11] <xreal> JEEB: mp4box also supports some headers for iPhone, I think.
[13:11] <JEEB> you shouldn't need any headers for it, though. Having the moov atom in the beginning of the file is all ye need
[13:12] <tlhiv_laptop> ubitux: as it's playing? hehe
[13:12] <JEEB> and it was -movflags faststart
[13:12] <JEEB> just FYI
[13:12] <ubitux> tlhiv_laptop: yes of course :)
[13:12] <tlhiv_laptop> hehe
[13:12] <xreal> -movflags faststart
[13:12] <tlhiv_laptop> that might be a little distracting ;)
[13:12] <xreal> yeah :)
[13:12] <ubitux> tlhiv_laptop: :D
[13:13] <relaxed> why isn't -movflags faststart the default?
[13:13] <relaxed> who wants slowstart?
[13:14] <ubitux> because it's an "heavy" op
[13:14] <ubitux> it can slow down muxing (there is a second pass)
[13:14] <ubitux> and it might not work in situation
[13:14] <ubitux> (fragmented maybe)
[13:14] <tlhiv_laptop> thanks for the help folks ... i'm sure i might be back ;)
[13:14] <ubitux> (or streams output, where you can't seek i guess)
[13:15] <saste> tlhiv_laptop, ideally we'll address the need for recompilation through scripting support
[13:18] <xreal> JEEB: Thanks so far
[13:18] <JEEB> <ubitux> (fragmented maybe) <- yeah, if you are using the movie fragments feature then you really don't need the two-pass muxing
[13:19] <ubitux> you need to check if it even works actually
[13:20] <JEEB> you can just pipe movie fragments output to mplayer(2)/mpv or something
[13:20] <JEEB> and see if it works :
[13:20] <JEEB> :)
[13:48] <xreal> finding the correct settings for iPhone 3GS drive me crazy
[13:50] <JEEB> 3GS is the first one that could in theory handle high profile / level 4. The thing is that you won't get that through iTunes, though.
[13:57] <xreal> JEEB: I've tools (without jailbreak) to copy it on the phone. It actually works fine.
[13:58] <xreal> JEEB: But I want to resize it... saves some CPU power, I think.
[13:58] <xreal> 512x288 is too big for 3GS
[13:58] <xreal> it's 480x320 only
[14:00] <xreal> File for preset 'ipod320' not found
[14:00] <xreal> damn
[14:01] <xreal> brb 10 minutees
[14:25] <keyzs> did a ffmpeg -i inputswf.swf outputvideo.mp4 to convert a swf to mp4 i get an error of swf compressed format not suported what will i need more to have installed to ffmpeg?
[14:45] <xreal> Damn, since the old presets are gone, it's hard to find the correct settings for iPhone 3 GS.
[14:52] <damoncasale__> Geez, irc was flaky this morning.  -_-
[14:53] <damoncasale__> I have a question about using filter_complex concat to join together multiple videos where one of them doesn't have an audio stream.  Is that possible, and if not, how do I take a video with no audio stream (generated from a series of image frames) and give it a dummy audio stream?
[14:54] <damoncasale__> Here's my command line:  ffmpeg -i /home/dev_gramz/content/video/2013/06/19/sample_iTunes28-prepend.mpg -i /home/dev_gramz/content/video/2013/06/19/sample_iTunes28.mov -i /home/dev_gramz/content/video/bumper_640x480.mp4 -filter_complex '[0:0] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' /home/dev_gramz/content/video/2013/06/19/sample_iTunes28-compiled.mp4
[14:55] <damoncasale> The "prepend" video has no audio stream.
[14:55] <damoncasale> The error I get is:  Stream specifier ':0' in filtergraph description [0:0] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [v] [a] matches no streams.
[14:56] <damoncasale> brb...
[15:00] <xreal> ffmpeg -i 1.flv -vcodec libx264 -vprofile main -preset slow -b:v 400k -maxrate 400k -bufsize 800k -vf scale=-1:480 -threads 0 -acodec aac -b:a 128k output_iphone2.mp4
[15:01] <xreal> Error while opening encoder for output stream #0:0
[15:01] <JEEB> the real error is usually before that :P
[15:01] <JEEB> that's the just the result
[15:02] <xreal> [libx264 @ 020BF660] width not divisible by 2 (853x480)
[15:02] <xreal> so it's 16:9 ?
[15:03] <JEEB> just make the output of that -1 be divisible by 2 :P
[15:03] <JEEB> there was an example for that in the documentation
[15:04] <xreal> JEEB: 90% of the information on the web doesn't fit to newer versions of ffmpeg. MANY settings seem to have changed.
[15:04] <JEEB> I'm talking about the goddamn official documentation
[15:04] <JEEB> it has an example for the goddamn scale vf
[15:04] <JEEB> :V
[15:04] Action: JEEB sighs
[15:04] <JEEB> the problem here is that most video you will ever output or input, other than possible screen captures in RGB, will be 4:2:0 YCbCr, and the 4:2:0 means that the color information is saved so that there's one sample for every four samples of luma (grayscale)
[15:05] <JEEB> so you can't have resolutions that aren't divisible by two
[15:05] <xreal> JEEB: so, best thing would be to let my iPhone resample?
[15:06] <JEEB> I have no idea wtf you're talking about :P
[15:06] <JEEB> you wanted your video to be resized to 480p, no?
[15:06] <JEEB> I'm telling you what you need to do, and that there's a goddamn example of that on the documentation as far as I can remember
[15:07] <JEEB> http://ffmpeg.org/ffmpeg-all.html#Examples-38
[15:07] <JEEB> here
[15:07] <JEEB> read up on that
[15:07] <JEEB> and you will learn how to make your resize output to always be divisible by two
[15:07] <xreal> JEEB: I want to encode videos for my iPhone 3GS. There are tones of snippets for that from 2009/2010, but most of the switches don't work on ffmpeg anymore.
[15:07] <JEEB> GODDAMNIT
[15:07] <JEEB> DO YOU EVER READ WHAT I WRITE
[15:07] <JEEB> I EVEN FUCKING LINKED YOU TO THE FUCKING DOCUMENTATION WHICH YOU CLEARLY NEVER EVEN WENT TO LOOK AT
[15:08] <ubitux> :D
[15:08] <xreal> JEEB: The documentation is about (... and) *resizing* only and not about specific devices!
[15:08] <JEEB> well your current problem is about fucking resizing
[15:09] <xreal> JEEB: I've fixed the resizing way before you wrote the address, but the rest also doesn't work, since ffmpeg changes too frequently
[15:09] <JEEB> might want to fucking tell some more then
[15:11] <damoncasale> Anyone know about the issue I brought up?
[15:14] <xreal> How can I find out about the names, the linked libraries have?
[15:15] <xreal> ah, found it
[15:16] Action: Mavrik gives cookie to JEEB.
[15:16] <damoncasale> Anyone?  filter_complex concat for video files, one of which has no audio stream?
[15:17] <xreal> shit, the windows builds don't have libfdk_aac.
[15:18] <JEEB> because it can't be distributed
[15:18] <JEEB> blame fraunhofer for the license
[15:19] <xreal> JEEB: So I'm stuck with android codec or experimental AAC ?
[15:19] <JEEB> yes, of which the internal one is better
[15:19] <JEEB> also, both fdk and vo_aacenc were released with android source drops
[15:19] <JEEB> so they both are "android codecs"
[15:20] <JEEB> I would guess Google finally found out how crappy vo_aacenc was because with the next version they switched over
[15:20] <xreal> JEEB: So, I need to use aac -strict ?
[15:20] <JEEB> yes, the internal aac encoder, and -strict experimental
[15:20] <JEEB> I'm not sure why it's still with that 'experimental' tag, if you give it "sane" rates and don't try to use low bit rates it's mostly fine
[15:21] <JEEB> and vo_aacenc isn't really better
[15:21] <JEEB> (actually it's just worse because it only supports 2ch and all)
[15:21] <xreal> isn't there a project like LAME for aac ?
[15:21] <JEEB> the libavcodec's internal aac encoder is closest to that
[15:21] <JEEB> but no-one really works on it :P
[15:21] <JEEB> and I bet because fraunhofer's thingy was open sourced most people will just use it
[15:22] <xreal> I wonder, if it's better to use MP3 audio with MP4 video then? :)
[15:22] <JEEB> of course they have to build it locally, but that's a small problem for most users
[15:22] <JEEB> well, in many cases hardware players don't really like AVC/H.264 + MP3 in "MP4"
[15:22] <JEEB> you could in theory use LAME in the rates it's better at of course
[15:23] <JEEB> not sure what range that would be
[15:23] <JEEB> the "experimental" AAC encoder is good enough at rates 128k-192k
[15:23] <JEEB> for stereo
[15:24] <xreal> JEEB: Can I find out, which baseline is used in a mp4 video?
[15:24] <JEEB> what is this baseline you're speaking of?
[15:25] <xreal> JEEB: 1 sec
[15:25] <xreal> profile Baseline main, level 3.0
[15:25] <JEEB> ok, so you just asked badly
[15:25] <xreal> (for example)
[15:25] <JEEB> also an AVC/H.264 stream cannot be baseline and main at the same point
[15:26] <JEEB> it has to be either baseline OR main
[15:26] <xreal> JEEB: The thing is, my iPhone can actually play the video I've downloaded from the web pretty well. Since the quality is good, I'd like to analyse, which "settings" might have been used to create it.
[15:26] <JEEB> so what is this "which baselin is used"?
[15:26] <JEEB> *baseline
[15:27] <JEEB> xreal, quality and profile don't really coincide as such. The only thing it all means is that with baseline you have less features available than with main, and main has less than high. But all can give good quality if you set the rate control at a good point for your eyes
[15:28] <xreal> Ah here! Video: h264 (Main), bitrate is 900 kb/s.
[15:28] <xreal> 900? I've read, iPhone is fine about 150-300 :)
[15:28] <JEEB> uhh, I don't even know where to begin
[15:29] <JEEB> do you mean that you were told that 150-300 is the max?
[15:29] <JEEB> then it means the old iphones
[15:29] <JEEB> before 3GS
[15:29] <JEEB> those had a crappy hardware decoder
[15:29] <Mavrik> even those could do way more than 300kbits =
[15:29] <JEEB> yes
[15:29] <Mavrik> but were limited to baseline though.
[15:29] <JEEB> yup
[15:29] <JEEB> baseline, level 3
[15:30] <JEEB> man, I hate trying to answer these questions that aren't laid out correctly and then you have to guess what the hell the person wants to ask
[15:30] <xreal> The thing I want to figure out: Do I need a higher bitrate at all? Can I see a difference? Higher bitrate might mean higher power usage.
[15:30] <JEEB> uh
[15:30] <JEEB> the power difference you might or might not get
[15:30] <xreal> I want to compress it at various bitrates.
[15:30] <JEEB> is so fucking small you shouldn't fucking care
[15:30] <xreal> JEEB: oh okay
[15:30] <JEEB> yes
[15:30] <xreal> JEEB: same about resizing?
[15:30] <JEEB> no idea about that, all I'm talking about is the fucking decoding
[15:30] <JEEB> because the hardware decoder is most probably going to work in the same way
[15:31] <JEEB> and same amount of battery
[15:31] <JEEB> in any case, yes -- you can raise the rate if you want
[15:31] <JEEB> also with libx264 if you just want to set a "quality level" you should not set a bit rate, but just use -crf
[15:31] <JEEB> 23 is the default
[15:31] <JEEB> go lower if the output looks bad
[15:31] <JEEB> go higher if the output looks good
[15:32] <JEEB> and find the highest number that still looks good
[15:33] <JEEB> do note that the vbv limits (maxrate and bufsize) will limit crf, so if you've set them too low then you will crap in any case if the video needs bits and you can't give them to it
[15:33] <damoncasale> How does one create a dummy audio track when generating a video from still frames?  This command line doesn't work:  ffmpeg -f image2 -r 25 -i (inputfile) -f pcm_s16le -i /dev/zero -s 640x480 -y
[15:34] <damoncasale> It just says unknown input format pcm_s16le.
[15:46] <damoncasale> Well, guess no one knows.  Heading to work.  Bye.
[16:44] <lacrymology> 2 questions about mjpeg: if I send it with -f mpegts, I get no video, if I send it with -f mjpeg of course I get no audio. Any transport that will allow me to send mjpeg video and some kind of audio? And why am I seeing 4fps with this codec, and my cpu is not even being fully consumed?
[17:13] <tlhiv_work> saste: this works --> ffmpeg -f v4l2 -r 25 -s 320x240 -i /dev/video0 -f alsa -i hw:1,0 -g 1 -i circle.png -vf "movie=circle.png [i]; [in][i] overlay=0:0" -vcodec libx264 -acodec libfaac -y out.mp4
[17:50] <lacrymology> where can I find details on mpeg4 (or any given) codec's options? I'm trying to stream stuff in mpeg4, but I get jumpy results.. like .7s of playback, .3s pause, playback, pause, playback pause
[17:50] <lacrymology> wrong wording, I know
[18:08] <vulture> lacrymology: are you displaying the video as fast as you can receive it? or else, insufficient buffering?
[18:16] <xreal> Is it okay to use -movflags faststart ?
[18:19] <lacrymology> vulture: I'm doing playback with ffplay with nobuffer, but I'm streaming through the loopback, going at 20mbps, shouldn't be a problem
[18:20] <lacrymology> vulture: same result without the nobuffer option, and with vlc, anyways
[18:20] <lacrymology> and unless I set -g 0 I get a LOT of artifacts
[18:21] <lacrymology> with it, I see them as well, but less so.. orat least different ones
[18:22] <vulture> lacrymology: is it encoding in less than real time? maybe it cant encode fast enough, so when reading it in, it is playing it back as fast as it can receive it, which would cause that
[18:22] <lacrymology> no, it's encoding at real time
[18:22] <vulture> well, then again
[18:23] <vulture> it entirely depends on how they synchronize playback
[18:23] <lacrymology> mpegts?
[18:23] <vulture> but anyway it just sounds like it's playing it back as fast as it can get it
[18:23] <lacrymology> yes, yes, it looks lke that
[18:23] <lacrymology> also, of course sound and video are going out of sync
[18:25] <lacrymology> so, anyways, I was thinking, I could play around with the codec options, but I can't find any specifics
[18:30] <vhann> Hi, I have a VOB file from a DVD and want to transcode the audio into a AVI file but ffmpeg -i file.vob says the three audio tracks have "0 channels"?
[18:30] <vhann> I played the VOB in VLC, the sound works on all audio tracks
[18:32] <vhann> Is this normal?
[18:36] <lacrymology> vulture: do you know how can I tell ffplay the right values for SAR, DAR, q, bitrate, tbn, tbc? I'm sending raw video, and I now understood it's not interpreting it right
[18:38] <vulture> I dont know, I dislike ffmpeg's defaults, I have no idea what it uses for anything
[18:39] <lacrymology> vulture: I see the values in the streaming ffmpeg's output, and I see the used values in ffplay's instance, they're wrong. But I can't find which options should I set for this
[18:42] <vulture> no idea
[18:43] <lacrymology> particularily, ffmpeg says tbn=90k (no idea what that is) and ffplay says tbn=25
[18:52] <lacrymology> by the way, I've seen `ffmpeg -i -` in a lot of docs examples. What's the -i - mean?
[18:53] <JEEB> most probably stdin input
[18:55] <vulture> it means input file
[18:55] <Mavrik> lacrymology, if ffplay supports videofilters, you can use those
[18:55] <Mavrik> lacrymology, "-" as name of input file means read from stdin input pipe
[18:55] <vulture> pretty much every ffmpeg command will use -i :P
[18:55] <vulture> oh, -i -
[18:55] <vulture> yeah
[19:00] <lacrymology> Mavrik: video filters. let's look at that, thanks
[19:01] <lacrymology> Mavrik: filter_graph?
[19:01] <Mavrik> lacrymology, "-vf" if available in ffplay
[19:02] <lacrymology> Mavrik: yes, it's that.
[19:06] <lacrymology> Mavrik: sorry, how will filters help me? I see only one seemingly related filter: settb, but I'm not sure it'll do what I want
[19:07] <Mavrik> there are setsar, setdar, setetc filters
[19:07] <Mavrik> that change those properties on frames as they go through the pipeline.
[19:07] <Mavrik> you DID say you want to change those right?
[19:10] <lacrymology> Mavrik: not exactly. I'm streaming raw video from ffmpeg and trying to playback it with ffplay, but ffplay doesn't know the format, so I saw nothing. I set the dimensions,  and now I see broken frames, but frames nonetheless. Like the colors are separated. I see bad values for tbn and tbc in ffplay, I'd THINK SAR and DAR would be ok after setting video_size
[19:10] <vulture> why raw video
[19:11] <vulture> raw video possibly(probably?) doesnt pass any metadata
[19:11] <vulture> so any value you see for anything could be bad
[19:12] <addisonj> anyone know if there is a difference between mp4 segments as per the ISMV spec and mpeg-dash? I am trying to use ffmpeg to create segmented mp4 files for the live profile of mpeg dash and am failing at my attempts. ISMV looks to be same format though?
[19:14] <xreal> Is it okay to use -movflags faststart ?
[19:15] <JEEB> xreal, if you need the moov atom at the beginning, yes? Then you just *need* it
[19:15] <Mavrik> xreal, if you're writing mp4 files to the disk, yes :)
[19:15] <JEEB> as was said, mostly stuff like outputting movie fragment-using files onto a pipe or something would be an example of where you shouldn't use it
[19:16] <JEEB> addisonj, should I cry out "oh my god, someone is trying to use DASH"?
[19:17] <addisonj> JEEB: perhaps? with support for segmented mp4 files in chrome through Media Source Extensions, its a pretty cool possibility to do live streaming to the browser with no plugins
[19:18] <JEEB> well, unfortunately I have no information about specifications of MPEG-DASH :)
[19:19] <JEEB> btw, does that thing (chrome) support mp4 with the movie fragments feature used pushed over http or something/
[19:19] <JEEB> ?
[19:19] <addisonj> from what I understand, I just need to get the video in iso bmff, fragment on keyframes and put the moov atom before the mdat track
[19:19] <addisonj> exactly
[19:19] <addisonj> http://dash-mse-test.appspot.com/dash-player.html <-- demo of it in chrome
[19:20] <xreal> JEEB & Mavrik: Actually, I'm extracting MP4 from FLV, but I thought, creating the moov atom wouldn't be bad?
[19:20] <addisonj> sadly, they have no live profiles.... which is what I need to do
[19:20] <JEEB> xreal, oh how I "love" it how you're using those terms in ways that aren't consistent
[19:20] <Mavrik> xreal, um, you can't have MP4 file without the MOOV atom :)
[19:20] <Mavrik> if you want to stream the file, use it.
[19:20] <Mavrik> if not, it doesn't matter, that's all there is to it :)
[19:20] <JEEB> BEEP
[19:21] <JEEB> you need movie fragments for real streaming
[19:21] Action: Mavrik mumbles something about nitpicking.
[19:21] <Mavrik> ;)
[19:21] <JEEB> you people are way too used to meaning "reading a file via http" when you say "stream" :P
[19:22] <JEEB> addisonj, "frag_keyframe", "Fragment at video keyframes"
[19:22] <JEEB> so -movflags frag_keyframe I guess?
[19:23] <addisonj> JEEB: yeah, I think one of my problems has been that I am pulling this from h264 in mpeg-ts containers over multicast. The GOP length is realllly variable on the source, so I am going to have to transcode to get consistent key frames
[19:23] <Mavrik> JEEB, I'm mostly thinking "using a streaming server that mangles stuff to make it work" when talking about streaming. But yeah, you're right :)
[19:23] <xreal> JEEB: this make me sound important (for the ones away from this channel)
[19:23] <xreal> Mavrik: I don't know, if I want to stream it in future.
[19:24] <JEEB> xreal, please at least EXPLAIN WHAT YOU WERE WANTING TO SAY
[19:24] <JEEB> because "Actually, I'm extracting MP4 from FLV, but I thought, creating the moov atom wouldn't be bad?
[19:24] <JEEB> <addisonj> sadly, they have no live profiles.... which is what I need to do"
[19:24] <JEEB> ugh, why did that second line come in as well
[19:24] <JEEB> because what you just said makes no effing sense
[19:24] <lacrymology> vulture: because I need the best quality + cheapest (cpu-wise) stream I can get.
[19:24] <JEEB> "I'm extracting MP4 from FLV"
[19:25] <JEEB> this-makes-no-sense
[19:25] <JEEB> so please rephrase so that we don't have to guess what you were meaning
[19:25] <lacrymology> vulture: also, my consumers will decode anything I pass them, so decode - encode - stream - decode - encode seemed sort of silly
[19:26] <JEEB> I am pretty sure that me and Mavrik more or less got what you were trying to say, but it is a bad thing to talk like you just did, and you should know it instead of thinking that you said it all right
[19:26] <addisonj> xreal: what they are trying to say: video has a few parts, one is a container, such as mp4 or flv, the other is a codec, like h264. you can't have an mp4 inside an flv because that would be a container inside a container
[19:27] <addisonj> you demux the video from the flv container and remux into a mp4 container
[19:27] <Mavrik> lacrymology, I would urge you to consider using a lossless lightweight codec to encode stuff on transport
[19:27] <Mavrik> lacrymology, transferring raw video burns a ton of CPU just to move those huge amounts of data and can easly be more than encoding time to a huffyuv or some such codec when transporting over network
[19:28] <Mavrik> also, you get free video metadata needed for playback/decode ;)
[19:29] <vulture> the transport time is still important, but you know your use case better than me, so maybe uncompressed is fine for you. just I wouldnt ever want to use it unless I had some dedicated/reliable hardware like a vga cable or something :P
[19:30] <xreal> addisonj: oh ok
[20:08] <lacrymology> vulture: any recommendation on what mavrik called "lossless lightweight codec"
[20:09] <lacrymology> vulture: any recommendation on what mavrik called "lossless lightweight codec"? I've been trying around stuff, and couldn't find anything
[20:40] <vulture> lacrymology: huffyuv
[20:41] <vulture> it's an old codec that basically uses a moderately fast lossless binary stream compression over the yuv streams
[20:41] <vulture> so you can get maybe a 2:1 compression ratio if you're lucky
[20:41] <vulture> but it's fairly fast to do it
[20:42] <vulture> there are other better compression algorithms but they werent necessarily setup as video codecs
[21:10] <lacrymology> vulture: good call, I'm getting pretty much exactly "about 2:1" ;) now I've got to find a transport..
[21:11] <vulture> last time I used it I used avi for the transport
[21:11] <vulture> but that must have been 10 years ago :P
[21:15] <lacrymology> vulture: you think I can use avi on udp?
[21:16] <vulture> you can probably use anything on anything, but I dont know whether whatever video player app you use will support it
[21:16] <vulture> even most video players cant properly stream avi files
[21:16] <lacrymology> vulture: I'm using ffplay right now, so I'd guess it's ok
[21:16] <lacrymology> at least if I pass it the right settings
[21:16] <lacrymology> I'm getting "invalid data found when processing input" anyways. I guess if I don't get the start of the stream, there's problems
[21:17] <vulture> the more modern container is probably mkv, though I dont know what particular advantages it has over avi, other than apps seem to play better with it by default
[21:19] <xreal> Is there any tool to analyse the framerate of a mp4? I've got one with variable framerate here.
[21:20] <vulture> mpc can show you that in realtime
[21:20] <vulture> view->statistics
[21:20] <lacrymology> vulture: I'm told mkv can package whatever, but it's not "very good
[21:20] <xreal> vulture: ok
[21:20] <lacrymology> I don't know what's the parameters used to define "very good" by the people who say that
[21:21] <vulture> I dont know either :P  there's really only 2 major features I look at in a container format: (1) extensibility (being able to have arbitrary streams embedded) and (2) seek/stream ability
[21:24] <qubodup> Is there a way to have a framerate less than 1 using libvpx?
[21:24] <qubodup> the following fails if -r is less than 1: `ffmpeg -loop 1 -r 1 -f image2 -i x.jpg -i y.ogg -c:v libvpx -acodec copy -b 2000k -t `soxi -D y.ogg` -shortest z.webm`
[21:25] <vulture> whats the failure message
[21:26] <qubodup> Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height , full message: http://codepad.org/mszI30RE
[21:27] <qubodup> hm. how do I find out about limitations on parameters? Is there any chance that there is documentation on this and that I won't have to read sourcecode?
[21:27] <vulture> [libvpx @ 0x1bd1220]   Additional information: g_timebase.num out of range [1..cfg->g_timebase.den]
[21:27] <vulture> can you change the denominator somewhere
[21:28] <vulture> actually that probably wouldnt help
[21:29] <xreal> Can I fore mplayer to output the actual framerate to cli ?
[21:30] <vulture> from the source code it looks like you'd have to remove the check and recompile it
[21:30] <vulture> I dont use mplayer idk :p
[21:41] <qubodup> I wonder if the limitation is by design. I'll try to find libvpx' issue tracker and maybe some info on that
[21:42] <vulture> probably not a lot of people want to do framerate below 1
[21:42] <vulture> maybe you can duplicate frames instead
[21:42] <vulture> e.g. 2 copies of a frame, 1 fps => looks like 2 fps
[21:42] <vulture> err
[21:42] <vulture> looks like .5 fps
[21:43] <Mavrik> lacrymology, huh, which people are running around telling people mkv "isn't very good"?!
[21:45] <lacrymology> i don't know, exactly.
[21:49] <vulture> sounds like nonsense hearsay:D  like people trash talking avi
[21:51] <Mavrik> huh?
[21:55] <qubodup> libvpx appears to support frame rates down to .000001 but fails at .0000001. Outrageous! (just kidding)
[21:55] <qubodup> (about the outrageous part)
[21:57] <Mavrik> :))
[21:57] <Mavrik> useless for those youtube single/frame videos then :P
[22:02] <xreal> can ffmpeg access rtmp ?
[22:02] <llogan> yes
[22:02] <llogan> see "ffmpeg -protocols"
[22:03] <xeberdee> libav-tools on ubuntu server - any help enabling the pro-res encoder?
[22:03] <llogan> this...is.. FFmpeg!
[22:03] <llogan> libav-tools is not our spawn.
[22:04] <xeberdee> mmm& ffmpeg says is deprecated and now libav-tools - are they not the same thing?
[22:04] <llogan> see link
[22:06] <xeberdee> aw. tricky.
[22:06] <xeberdee> I sse
[22:07] <xreal> I am getting a rtmp server error on this one: rtmp://ondemand.rbb-online.de:443/ondemand/mp4:rbb/kessler/kessler_20130501_klemmbrett_m_16_9_512x288.mp4
[22:07] <llogan> xeberdee: the "deprecated" message has mislead many users.
[22:09] <llogan> xeberdee: you can compile ffmpeg or use a static build
[22:10] <llogan> that was supposed to be: http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
[22:10] <xeberdee> llogan: great - thanx
[22:11] <xreal> I am getting a timeout after some seconds. http://pastebin.com/py6VY1Ni
[22:11] <llogan> xreal: that's only the command
[22:12] <xreal> llogan: oh damn, I missed the line
[22:14] <xreal> http://pastebin.com/kXC1xuUE
[22:17] <llogan> xreal: is the output broken?
[22:18] <xreal> llogan: rtmpdump works great
[22:18] <xreal> damnit
[22:18] <xreal> llogan: no, the seconds until it stops are working
[22:19] <xreal> ah, adding "-re" seems to work
[22:21] <xreal> is rtmpdump better maintained?
[22:23] <xreal> oh damn, rtmp via ffmpeg is _damn_ slow.
[22:23] <xreal> Need to use rtmpdump for this :(
[22:27] <llogan> -re makes it slow
[22:30] <vulture> how slow
[22:30] <klaxa> realtime slow
[22:31] <vulture> exactly :d
[22:35] <xreal> ah!
[22:35] <xreal> My problem is: rtmpdump drops the tag, which come from the serve.r
[22:35] <xreal> (bad keyboard)
[23:41] <vhann_> Can somebody help me figure out what is going wrong?
[23:41] <vhann_> http://pastebin.com/Fhk7v1FP
[23:51] <llogan> vhann_: how are we supposed to know what you did without the command?
[23:53] <vhann_> llogan: Sorry, I thought I had pasted it in, gimme a minute
[23:54] <vhann_> llogan: http://pastebin.com/rwm1eTFa
[23:54] <llogan> 0 channels is weird
[23:55] <llogan> can you try a more recent ffmpeg build?
[23:56] <llogan> does anything play this file normally?
[23:56] <vhann_> llogan: Would 1.2 be enough? Or do I need to use the CVS version?
[23:56] <llogan> http://ffmpeg.gusari.org/static/32bit/?C=M;O=D
[23:56] <llogan> try the top one
[23:58] <llogan> burek: why did your builds stop on friday?
[00:00] --- Thu Jun 20 2013


More information about the Ffmpeg-devel-irc mailing list