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

burek burek021 at gmail.com
Sun Nov 4 02:05:01 CET 2012


[00:00] <bjrohan> The resolution was just okay. the audio was garbled and not in sync
[00:01] <bjrohan> Mavrik: Nevermind, the video was great. the audio was good too, just off
[00:01] <Mavrik> bjrohan: ok, first off, mp4 doesn't officialy support uncompressed audio
[00:01] <Mavrik> so I suggest you encode it as well :)
[00:01] <bjrohan> Okay :-)
[00:01] <bjrohan> How
[00:02] <Mavrik> "-acodec libfdk_aac -ab 128k" for example
[00:02] <bjrohan> Also, when I enter the command, it takes a LONG time to actaully start
[00:02] <Mavrik> (and remove the -acodec pcm of course)
[00:03] <bjrohan> Hmm
[00:03] <bjrohan> Here is what I entered, and it simply hung: ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1680x1050 -i :0.0 -acodec libfdk_aac -ab 128k -vcodec libx264 -preset ultrafast -crf 25 -threads 0 output.mkv
[00:04] <bjrohan> http://paste.ubuntu.com/1327794/
[00:05] <Mavrik> also, hmm
[00:05] <Mavrik> that's probably connected with "long time to start up" thing
[00:05] <bjrohan> Can we start a code from scratch?
[00:06] <bjrohan> build it from scratch?
[00:06] <Mavrik> ok, try this and tell me if you still get long startup time:
[00:06] <bjrohan> ok
[00:06] <Mavrik> ffmpeg -f x11grab -r 30 -s 1680x1050 -i :0.0 -vcodec libx264 -preset ultrafast -crf 25 -threads 0 output.mkv
[00:06] <Mavrik> (we're checking if there's something wrong with pulseaudio :) )
[00:06] <bjrohan> it started fast, I am recording for a few to see what happens
[00:07] <Mavrik> that will be without audio now
[00:07] <bjrohan> That worked very fast and well
[00:07] <bjrohan> clear
[00:08] <Mavrik> ok,
[00:08] <D4rkSilver> that's a pretty nice command there. thanks Mavrik =)
[00:08] <bjrohan> except
[00:09] <bjrohan> it seems to record too fast
[00:09] <bjrohan> I recorded for 10 seconds, it played back in about 5
[00:09] <Mavrik> huh.
[00:09] <bjrohan> all that I did was there
[00:09] <bjrohan> let me run again
[00:09] <Mavrik> intereeesting
[00:09] <Mavrik> bjrohan: can you pastebin me the output, I have a hunch :D
[00:09] <bjrohan> three four five six seven eight mine ten
[00:10] <bjrohan> http://paste.ubuntu.com/1327806/
[00:10] <Mavrik> ffmpeg -f x11grab -r 30 -s 1680x1050 -i :0.0 -vcodec libx264 -preset ultrafast -crf 25 -r 30 -threads 0 output.mkv
[00:10] <bjrohan> it had all that I did, just sped up on replay :-)
[00:11] <Mavrik> this should fix the problem
[00:11] <bjrohan> one two hi there this is nice will paste in a bit
[00:11] <bjrohan> Still super fast
[00:12] <bjrohan> Normally would be okay
[00:12] <Mavrik> hmm, that makes no sense
[00:12] <bjrohan> okay, would sometimes be okay
[00:13] <Mavrik> bjrohan: what's the FPS counter WHILE recording? is it 30?
[00:14] <bjrohan> fps - 13
[00:14] <bjrohan> fps =15 q=30
[00:15] <bjrohan> Aren't we specifying 30?
[00:15] <Mavrik> yeah, but it seems your computer can't keep up
[00:15] <Mavrik> can you try doing -r 15 on both sides
[00:15] <Mavrik> and see if that fixes it
[00:17] <bjrohan> Here is some text to try it out
[00:17] <bjrohan> That was better. Seemes smooth even at only 15 fps
[00:18] <bjrohan> of course, not recording video playing etc
[00:18] <Mavrik> yeah, the bad news is that your computer is too slow to encode such resolution with more than 15fps
[00:18] <bjrohan> It is about 5 years old
[00:18] <Mavrik> that is probably also the cause of out-of-sync audio
[00:19] <Mavrik> you can downsample video wile grabbing
[00:19] <bjrohan> If I record with RecordMyDesktop, it records just fine
[00:19] <bjrohan> and is in sync
[00:19] <Mavrik> or you can grab it in raw format and reencode it later
[00:19] <bjrohan> it just takes FOREVER to compress afterwards
[00:19] <Mavrik> yeah, it's doing what I said :)
[00:19] <Mavrik> it's grabbing the video without encoding it (taking alot of space)
[00:19] <Mavrik> and then encoding it when it has enough time
[00:20] <bjrohan> For what I am doing with desktop recording, I am putting it in a GUI editor adding titles, and then encoding
[00:20] <bjrohan> That will work fine for me. I typically do 2  - 3 minute desktop tutorials then import into OPenShot, add titles, background audio, and then export it
[00:21] <bjrohan> How would I grab in raw format
[00:22] <Mavrik> bjrohan: try this
[00:22] <Mavrik> ffmpeg -f x11grab -r 30 -s 1680x1050 -i :0.0 -vcodec huffyuv output.avi
[00:23] <Mavrik> and try opening it in openshot if it supports it
[00:23] <bjrohan> No audio is that correct?
[00:24] <Mavrik> for now :)
[00:24] <ellipsis753> I'm struggling to convert my .vob file to another video format without introducing any quality loss at all. Is this possible?
[00:24] <Mavrik> ellipsis753: not really, especially if you want to convert to another lossy format
[00:24] <Mavrik> ellipsis753: you can get "good enough" result though
[00:24] <Mavrik> (meaning - not noticable difference)
[00:25] <bjrohan> Mavrik: It was able to be imported into OpenSHot, while recording it was only 9fps
[00:25] <Mavrik> hmm
[00:25] <Mavrik> that should be faster
[00:27] <ellipsis753> Mavrik, Thanks. I'm trying "-c copy -vf yadif" Would this give the best quality possible? (While deinterlacing)
[00:27] <Mavrik> ellipsis753: no, that actually does nothing :D
[00:27] <bjrohan> Mavrik: That 15 seconds is 233 mb!
[00:28] <Mavrik> bjrohan: yep, :)
[00:28] <Mavrik> ellipsis753: you're just copying video over without actually changing it
[00:28] <Mavrik> ellipsis753: if you want to deinterlace it you'll have to reencode it
[00:28] <bjrohan> wow
[00:29] <ellipsis753> Oops. Thank you Mavrik. Which encoder should I use for the best quality. To be honest I struggle alot with ffmpeg >.<
[00:30] <Mavrik> ellipsis753: H.264 video format with libx264 codec probably
[00:30] <bjrohan> Mavrik: also there are a LOT of hidden goutputstream files
[00:30] <Mavrik> ellipsis753: https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/
[00:30] <Mavrik> ellipsis753: read this quickly and find a "crf" setting where you don't notice the difference
[00:30] <Mavrik> (I suggest encoding 1 minute clips first :P )
[00:31] <Mavrik> anyway, sorry guys, I have to run, it's very late here
[00:31] <Mavrik> g'nite
[00:31] <bjrohan> Mavrik: Can I try RecordMyDesktop at 15 fps to see if it is better?
[00:31] <Mavrik> sure ;)
[00:31] <stephanedev> good night Mavrik and thanks again for your help
[00:35] <ellipsis753> You've gone already but Thanks Mavrik!
[01:02] <Sashmo> does anyone know how to check the field order of a file?
[02:07] <kode54> how do I encode with libx264 and specify I want mbaff?
[02:15] <kode54> I figured out how to encode from my capture device, but I don't know how to guarantee mbaff encoding for later processing
[02:15] <kode54> since I'd rather do the deinterlacing post record
[02:24] <kode54> never mind
[02:24] <kode54> at least this thing understands that I'm recording interlaced and encodes it as interlaced
[02:24] <ashka> ubitux: was it you who made a little patch that implements -fileloop 1 to loop a file with a certain duration using -t ?
[02:29] <ashka> nvm that
[02:35] <ashka> hmm, I'm trying to do this : ffmpeg -fileloop 1 -i to-loop.mp4 -t 36000 -c copy -y looped-video.mp4
[02:35] <ashka> and it does [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1604320] stream 2, offset 0x3720: partial file
[03:47] <fling> Kazurik: hey
[03:57] <fling> something is wrong with my aac
[03:58] <fling> http://dpaste.com/823401/ ; this works > http://bpaste.net/show/55560/ > http://dpaste.com/823403/
[03:58] <fling> but it is not when I add `-c copy -f flv rtmp:&´ > http://bpaste.net/show/55561/ > http://dpaste.com/823405/
[03:58] <fling> what am I doing wrong?
[03:59] <fling> [flv @ 0x1d5d530] Tag [3][0][0][0]/0x00000003 incompatible with output codec id '86016'
[03:59] <fling> Could not write header for output file #0 (incorrect codec parameters ?)
[04:04] <fling> and also there is a strange thing, does not matter if I choose aac or mp3 it always says Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, 128 kb/s
[04:07] <fling> this is not working too! > http://bpaste.net/show/55563/
[04:07] <fling> so why mp2?
[04:07] <fling> http://dpaste.com/823412/
[06:19] <fling> JEEB: hey
[06:29] <fling> do I need a separate pipe for sound? weird!
[06:33] <fling> `-vcodec copy -acodec mp3 -ab 128k´ or `-vcodec copy -acodec aac -ab 128k´ it is still using mp2! why!!!
[06:44] <fling> looks like I will use two fifos from mpd
[07:42] <fling> working version > http://bpaste.net/show/55585/
[09:46] <Samus_Aran> when using the X11 screen capture, is there some way to specify the size of the viewport, or just have it use the whole screen?
[09:49] <Mavrik> Samus_Aran: yes, there is
[09:49] <Mavrik> when specitying screen with -i you can add "+X,Y" as upper left coordinate of the viewport
[09:49] <Mavrik> and -s as the width and height
[09:49] <Mavrik> something in terms of
[09:50] <Mavrik> ffmpeg -f x11grab -s 200x300 -i :0.0+150,100 ...
[09:52] <Samus_Aran> Mavrik: I am currently using the example in the man page, which has -s cif.  what does that mean?
[09:52] <Samus_Aran> Mavrik: and thank you
[09:52] <Mavrik> Samus_Aran: that's just a "standard" name for a video resolution like VGA, VXGA, etc.
[09:52] <Mavrik> http://en.wikipedia.org/wiki/Common_Intermediate_Format
[09:53] <Mavrik> -s cif == -s 352x288
[09:54] <Samus_Aran> ah, that makes sense.  I've never seen cif before
[09:55] <Samus_Aran> I only know cifs :)
[09:55] <Mavrik> ^^
[09:55] <Mavrik> it's something from deepest pits of internet history :P
[09:58] <Samus_Aran> heh.  I can remember emulating CGA on a monochrome monitor in DOS (which aren't actually single-tone, as there were two or three intensity levels of orange/green).
[09:59] <Samus_Aran> to play all the latest CGA games
[10:05] <ubitux> ashka: yes it was me, and never had the time to finish it
[10:05] <ubitux> remember, it won't work with mp4
[10:05] <ubitux> only mpeg 2 streams
[10:05] <ubitux> and maybe formats like flv
[10:15] <Samus_Aran> when I use full screen (1280x800), I get "packet too large, ignoring buffer limits to mux it" and a buffer underflow: i=0 bufi=313880 size=326480.  do I increase -bufsize?
[10:16] <Mavrik> Samus_Aran: yeah
[10:16] <Samus_Aran> is there some way to know how big I should be setting it?
[10:16] <Mavrik> hmm, it has to be at least as big as an I-frame... I don't think there's an easy way to calculate it
[10:17] <Mavrik> I usually set it to about 2-3 seconds worth of bitrate
[10:17] <Mavrik> which is a good assumption for most players
[10:20] <Samus_Aran> -bufsize doesn't seem to be doing anything.  I tried in multiples of 10 up to 1000000000000 or so.
[10:21] <Samus_Aran> the console is flooded by the red warning messages, though it still records it fine
[10:21] <Mavrik> hmm
[10:21] <Mavrik> Samus_Aran: is it possible your computer can't keep up with the framerate?
[10:21] <Mavrik> (hence the underruns)
[10:22] <Samus_Aran> quite possible, I'll try again with my CPU meter visible
[10:23] <Mavrik> Samus_Aran: just check if "fps=" display shows what you set :)
[10:23] <Samus_Aran> it's using all of one CPU core, is there any way to multithread it?
[10:23] <Samus_Aran> I'll try a lower framerate
[10:23] <Mavrik> Samus_Aran: that depends
[10:23] <Mavrik> Samus_Aran: and it's supposed to use the whole core
[10:23] <Samus_Aran> or not, MPEG doesn't support 15 FPS
[10:24] <Mavrik> that's why I said to check the fps display
[10:24] <Mavrik> pastebin the output please :)
[10:25] <Samus_Aran> how do I check that?  if I play it with mplayer, it shows 25 fps, but I don't know if there were dropped frames
[10:25] <Mavrik> Samus_Aran: as I said several times: monitor output as you're encoding
[10:26] <Mavrik> ffmpeg will output it's current encoding frame rate, number of duplicated and dropped frames
[10:26] <Samus_Aran> Mavrik: I can't do that, the screen is flooded with the red lines
[10:26] <Mavrik> also add "-threads <numcores>" after your vcodec
[10:26] <Mavrik> (why are you encoding to MPEG2 btw?)
[10:26] <Samus_Aran> I'm just using the example from the man page to screen capture.  :)
[10:26] <Samus_Aran> I assume others would use more CPU
[10:28] <Mavrik> actually other encoders are probably more efficient
[10:28] <Samus_Aran> I have a dual-core 1.6GHz Athlon X2 in a laptop
[10:28] <Samus_Aran> nothing special
[10:33] <Samus_Aran> Mavrik: thanks for all the help, I am falling asleep so I will continue this when more conscious.  *yawn*  :)
[10:33] <Samus_Aran> night.
[10:46] <ashka> ubitux: yup, I remembered I needed a mpg first after posting the error
[10:46] <ashka> works fine now :P
[11:03] <fling> Mavrik: how to simplify this? I dislike double encoding > http://bpaste.net/show/55585/
[11:04] <fling> Mavrik: if I capture sound from fifo and encode it with lame/aac in first ffmpeg, then second ffmpeg does not like this and says the codec is mp2 somewhy
[11:06] <Mavrik> but
[11:06] <Mavrik> you're encoding to mp3, why are you then trying to switch to AAC?
[11:07] <Mavrik> and you can override input detection by passing "-acodec" or "-vcodec" before "-i"
[11:07] <fling> Mavrik: so what is the proper commandline?
[11:14] <mudkipz> why are you using two separate ffmpegs?
[11:15] <mudkipz> I do it with just one
[11:15] <fling> mudkipz: because I want to use two separate outputs but with single encode
[11:15] <mudkipz> oohh, right I see that now
[11:15] <mudkipz> sorry, I just woke up
[11:15] <fling> mudkipz: ok :]
[11:15] <fling> good morning :p
[11:15] <mudkipz> :p
[11:16] <fling> I need to remove double audio encode now&
[11:17] <mudkipz> I've been doing a lot of ffmpeg rtmp streaming lately. Yesterday I was playing with the windows ffmpeg with directshow capture (like video4linux2 in linux) but had lots of frame drop problems and wasn't able to make them any better until I split my ffmpeg command into two and piplined one into the other.
[11:17] <mudkipz> I thought maybe the issues were related.
[11:17] <mudkipz> I didn't even know windows could use pipelines until yesterday.
[11:19] <mudkipz> maybe look at this? http://ffmpeg.org/trac/ffmpeg/wiki/Creating%20multiple%20outputs
[11:19] <fling> already :p
[11:19] <mudkipz> oh wait, nvm I think tha'ts exactly what youv'e done
[11:20] <fling> where to see my secret on justin.tv? I can't find it
[11:22] <mudkipz> can't you put the audio capture into the first process as well all the way up to "-f flv".
[11:22] <fling> mudkipz: then I will have the error
[11:22] <fling> 10:04 < fling> and also there is a strange thing, does not matter if I choose aac or mp3 it always says Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, 128 kb/s
[11:22] <fling> 10:07 < fling> this is not working too! > http://bpaste.net/show/55563/
[11:22] <fling> 10:07 < fling> http://dpaste.com/823412/
[11:22] <fling> some old pastes ^
[11:23] <fling> now I'm fixing it
[11:25] <mudkipz> Does your seconadry output have to be in mpegts?
[11:25] <mudkipz> Could you save in .flv?
[11:25] <fling> I want mkv
[11:25] <fling> wait, I will try
[11:30] <mudkipz> try this
[11:30] <mudkipz> http://dpaste.com/823594/
[11:30] <mudkipz> The only thing I have no idea about is the fifo capture part
[11:30] <mudkipz> >-f s16le -ac 2 -ar 44100 -i /tmp/mpd2ffmpeg.fifo \
[11:30] <mudkipz> I've never captured from fifio
[11:31] <mudkipz> also, updated acodec, vcodec, and -ba to their modern counterparts
[11:32] <mudkipz> -c:a = codec audio; -c:v = codec video; -b:a bitrate audio; -b:v bitrate video
[11:32] <mudkipz> the old way works the same, I just think the new way is neater.
[11:33] <mudkipz> oh, by the way, I'm not an ffmpeg guy. Someone else may give better advice.
[11:38] <mudkipz> you can probably also use copy, I'm not sure why I changed that. I think I was just comparing it to one of my other scripts.
[11:43] <fling> mudkipz: mpegts was used in all the examples so I used it too :p
[11:43] <mudkipz> hahaha, I see
[11:44] <fling> which container is the best for a pipe?
[11:46] <mudkipz> well, I set it to flv there because I figure your first ffmpeg is going to be outputting an flv stream that way. This way the second ffmpeg inputs an flv stream and just points it at the rtmp server (which wants flv) and your output file (which I set to flv there).
[11:46] <mudkipz> If the first ffmpeg is outputting in a different format then the second one will have to waste cpu by re-encoding to flv to send to rtmp.
[11:47] <mudkipz> I'm not sure any specific container is better for a pipe.
[11:47] <mudkipz> With the windows ffmpeg issue I was talking about earlier where I used a pipe, I also had it output in flv
[11:47] <fling> ok
[11:50] <mudkipz> Like, this is how you'd normally stream to a single input with ffmpeg.
[11:50] <mudkipz> >ffmpeg -f <video stuff and settings> -i <video source> -f <audio stuff and settings> -i <audio source> -f flv <output stuff and settings> <rtmp junk>
[11:51] <mudkipz> The way that they do piping in ffsplit (for reasons I don't entirely understand, as it's still just a single output) is by changging the output part of that command tot his.
[11:51] <mudkipz> >-f flv - | ffmpeg -i - -v:a copy -c:a copy -f flv "rtmp
[11:51] <mudkipz> ...
[11:52] <mudkipz> http://www.ffsplit.com/forums/viewtopic.php?f=3&t=843
[11:52] <mudkipz> if that gives you some reassurance that piping with flv is fine.
[11:52] <fling> ok, thanks :p
[11:54] <fling> mudkipz: at least this works, thanks > http://dpaste.com/823598/
[11:54] <fling> mudkipz: now I will try rtmp and mkv&
[11:54] <fling> which container is the best for storing video files? mkv?
[11:56] <mudkipz> cool, I'm not sure about using mkv, you may end up re-encoding stuff. I'm not an ffmpeg dude I just lurk in here, maybe someone else has some better input on this.
[11:57] <fling> advantages of mkv is a lot of supported streams and good ff/rew :p
[11:58] <fling> [NULL @ 0x1fb7630] Requested output format 'mkv' is not a suitable output format
[11:58] <fling> hehe
[12:01] <fling> mudkipz: how may I hide rtmp:// uri from console output?
[12:01] <fling> there is secret key in it
[12:01] <fling> also I want to hide it from ps
[12:02] <mudkipz> umm, you can try -v quiet
[12:02] <mudkipz> or redirecting std, I did that for a script that used ffprobe to get video dimensions and add padding before streaming.
[12:15] <fling> mudkipz: this works fine > http://dpaste.com/823624/
[12:15] <fling> but probably I need another preset
[12:16] <mudkipz> Those settings are pretty high, but then I normally deal with much lower quality streams at 640x480.
[12:16] <mudkipz> just look at your bandwidth and cpu usage.
[12:20] <fling> mudkipz: cpu is used much, I have picture freezes
[12:22] <mudkipz> I generally start with low settings and slowly move up.
[12:22] <mudkipz> just so you know, x11grab is capable of grabbing a smaller portion of the screen if you want it to.
[12:22] <fling> highest bitrate and fastest possible preset?
[12:23] <fling> I'm grabbind fullhd :]
[12:24] <mudkipz> Another thing you may want to take into consideration is that not all users are capable of watching a stream in HD and will have their computers be choppy/perform badly with one.
[12:24] <mudkipz> The fastest is ultrafast.
[12:26] <mudkipz> Here, from my bash script for streaming.
[12:26] <mudkipz> ># Possible presets: ultrafast superfast veryfast faster fast medium slow slower veryslow placebo
[12:43] <obiwahn> hi
[12:43] <obiwahn> i am trying to build mplayer but it fails with ffmpeg/tests/fate/filter.mak:56: *** No such config: CONFIG_FFPROBE.  Stop.
[12:44] <obiwahn> is there some quick way to fix that?
[13:03] <DX099> hello all ! I'm about to compile ffmpeg on Ubuntu 12.10. I'm starting by x264, what packages do I need to -remove- before doing such ?
[13:03] <shroomM> hi all
[13:03] <shroomM> I'm trying to capture an udp multicast transport stream
[13:03] <shroomM> by specifying -i udp://xx.xx.xx.xx:5002 as the input to ffmpeg
[13:04] <shroomM> the problem is, it just hangs there
[13:04] <shroomM> no error message or anything
[13:04] <shroomM> I have a hunch that it's because there are 4 network cards in the server
[13:04] <shroomM> is there any way to tell ffmpeg which one to use?
[13:05] <shroomM> I'm currently compiling ffmpeg from git
[13:05] <shroomM> to make sure I have the latest version and all
[13:05] <shroomM> DX099, this might be a good starting point
[13:05] <shroomM> https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
[13:11] <obiwahn> http://paste.debian.net/206093/ i have to export those to make it work
[13:11] <obiwahn> or make testprogs
[13:11] <obiwahn> i think your makefile is kind of broken
[13:12] <Mavrik> shroomM: IIRC I had to set a route (in operating system) for the UDP address to the correct network interface
[13:12] <shroomM> I think i set that one correctly :S
[13:12] <shroomM> I'll have to recheck
[13:13] <DX099> shroomM, thanks unfortunately, the only way i see for you is to traceroute the stream ip to see which of your cards resolves it, and then play with the iproute
[13:13] <Mavrik> I usually tested those things first with VLC which has proven to be more reliable for reading/dumping multicast streams
[13:14] <shroomM> I'm on a headless ubuntu 12.04
[13:14] <shroomM> can vlc work for that?
[13:17] <DX099> headless ?
[13:17] <shroomM> no display, just ssh to the server
[13:17] <shroomM> i never used vlc this way
[13:18] <shroomM> that's why I ask
[13:18] <shroomM> I do seem to recall vlc having some command line version
[13:18] <mudkipz> You can call vlc from the command line, I don't know if you can have it run headless though.
[13:19] <mudkipz> I've never looked into it.
[13:19] <shroomM> mkay
[13:19] <Mavrik> shroomM: yeah it's possible but I've never done it
[13:19] <Mavrik> I know here some broadcasters that use it for live transcoding on headless servers
[13:19] <shroomM> ah
[13:19] <shroomM> ok
[13:20] <shroomM> Mavrik, how would I go about adding the route
[13:21] <DX099> do I have to remove gstreamer  ?
[13:23] <shroomM> dunno, sorry :(
[13:38] <shroomM> so, using multicat (http://www.videolan.org/projects/multicat.html), i can receive the multicast traffic
[13:38] <shroomM> but ffmpeg does nothing
[13:38] <shroomM> like .. at all
[13:40] <shroomM> even with -v debug
[14:54] <fling> mudkipz: hey :p
[14:54] <mudkipz> hey
[14:54] <fling> mudkipz: I'm on the box where I will test the script
[14:58] <mudkipz> Did you get it working?
[15:14] <fling> mudkipz: it works :p
[15:14] <mudkipz> great!
[15:15] <fling> but I have strange freezes on the video
[15:16] <mudkipz> Do they appear in the output file as well?
[15:16] <mudkipz> or just in the rtmp?
[15:16] <fling> don't I need threads for second ffmpeg?
[15:16] <fling> in output file
[15:16] <mudkipz> I don't normally use threads, so I'm not sure how they make a difference really.
[15:20] <fling> even with ultrafast preset
[15:20] <fling> also my crf is 20
[15:21] <mudkipz> for rtmp streaming so far I've just been using -b:v (video bitrate), I haven't yet played with -crf
[15:33] <fling> mudkipz: http://www.justin.tv/fling23/b/337929419
[15:34] <mudkipz> oh I see the freezing
[15:35] <mudkipz> if I had to guess I'd say your settings are just too high, but I don't know
[15:35] <mudkipz> look at your cpu usage
[15:37] <fling> mudkipz: ultrafast, crf 40 http://www.justin.tv/fling23/b/337929908
[15:37] <fling> freezes are the same
[15:37] <sacarasc> fling: What's your CPU and HD situation like?
[15:38] <mudkipz> ^
[15:38] <fling> sacarasc: Phenom X6 1100T
[15:38] <fling> mudkipz: ^ :p
[15:38] <sacarasc> And HD? Old PATA ones? :D
[15:40] <fling> yes, old ATA/ATAPI/MFM/RLL drives
[15:40] <fling> I have lvm on them
[15:41] <fling> sacarasc: lsscsi > http://bpaste.net/show/55629/
[15:42] <sacarasc> Maybe they can't handle the throughput? Should be able to really, though.
[15:43] <fling> 1 minute ~= 7MB
[15:43] <sacarasc> Yeah, definitely shouldn't be that, then.
[15:43] <fling> I will try -preset ultrafast -b:v 200k
[15:46] <fling> same freezes :[
[15:47] <fling> sacarasc: http://dpaste.com/823730/
[15:49] <fling> sacarasc: http://www.justin.tv/fling23/b/337932050
[15:51] <fling> mudkipz: should not I add some buffer or something?
[15:51] <DX099> just a thing ffmpeg version is still in its 5.xx ?
[15:52] <mudkipz> I don't know how in ffmpeg. I do know gstreamer can with "queue".
[15:53] <fling> may it freeze because of fifo? hmm hmm
[16:00] <DX099> "https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide" hmm, a "sudo ldconfig" is missing there
[16:13] <fling> sacarasc: mudkipz: less freezes without sound > http://bpaste.net/show/55631/ > http://www.justin.tv/fling23/b/337934620
[16:13] <fling> how to debug this? hmm hmm
[16:14] <mudkipz> where is your audio coming from?
[16:14] <fling> mudkipz: http://dpaste.com/823734/ < from mpd
[16:16] <fling> mudkipz: should not I somehow add a buffer for inputs?
[16:16] <mudkipz> Maybe it has to do with that fifo then?
[16:16] <fling> right, I think ffmpeg is waiting for audio to appear and freezing the picture
[16:17] <mudkipz> I don't know how to do that in ffmpeg, when I use audio capture with x11grab I do it straight from alsa.
[16:17] <fling> so how to add a buffer?
[16:17] <fling> hmm hmm
[16:17] <mudkipz> I don't know, but I've had possibly related problems playing with the windows version of ffmpeg and dshow. So I'd be interested in finding out too.
[16:19] <fling> I used some option with -re in the past when I started ffmpeg directly from mpd
[16:20] <fling> can't remember! :P
[16:22] <mudkipz> -re is used mostly for file capture I think.
[16:22] <mudkipz> it means realtime.
[16:22] <mudkipz> no wait
[16:22] <mudkipz> not quite, umm
[16:23] <mudkipz> ffmpeg.org/trac/ffmpeg/wiki/StreamingGuide#The-reflag
[16:25] <fling> mudkipz: I remember about re but forgot the second thing&
[16:41] <fling> still have freezes even with audio from flac file (smaller freezes but they exist)
[16:41] <fling> I do not capture alsa because I have xruns
[16:41] <fling> 1-2 every minute
[16:45] <DX099> hello , I have a problem with the following encoding : http://paste.ubuntu.com/1329473/
[16:48] <mudkipz> hmm, I had xruns a lot initially too, but it was related to me streaming at too high a bitrate for livestream.
[16:55] <fling> sacarasc: mudkipz: no freezes with `-c:v libx264 -preset faster -crf 30 -maxrate 2m -bufsize 3m -threads 0´ and flac audio from file
[16:56] <fling> mudkipz: I have xruns even with arecord :p
[16:56] <fling> mudkipz: something is probably wrong in my kernel config
[16:56] <mudkipz> oh I see
[16:56] <mudkipz> yea, or something
[16:57] <fling> because I have it on all my boxen
[16:58] <fling> another alsa problem is non working mic input on intel-hda on all kernels after 2.6.39
[16:58] <fling> it may be related to misconfigured kernel too probably
[17:00] <fling> looks like I need to perform make defconfig with some recent kernel and to try not to change a lot :]
[17:03] <DonGnom> im currently encoding some video and getting a a huge delay between video and audio. is there any way to  sync the video and audio again?
[17:07] <DonGnom> this is my commandline that i use:http://sebsauvage.net/paste/?7002df71f3089ade#492jqvluon6+oyZ9f8gKwenhll11glm7T7DHicM0j4M=
[17:35] <DonGnom> according to ffprobe the audio stream starts a little bit delayed in the original. but not in the encoded video. is there any way to set the start time of the audio stream for the encoded video or any other "sync-audio-and-video" option?
[17:37] <saste> DonGnom, you can adjust audio timestamps with asetpts
[17:37] <saste> also what's your target format?
[17:38] <DonGnom> saste: mpeg2video (ts) -> h264 (mkv) and mp2->mp3 and also ac3->ac3 (multiple audio streams)
[17:39] <jackolant> Can somebody finally explain to me the whole -sameq thing is about, in plain English? It appears to have been removed from the manual now, and "ffmpeg.exe -i some.vid -sameq some.avi" says something about it not existing anymore?
[17:39] <saste> jackolant, !faq
[17:40] <jackolant> Not a mention of it there.
[17:40] <saste> uhm still needs to be updated
[17:41] <saste> but well the message should say it all, the options was broken since many years
[17:41] <saste> -qscale 0 or -qmax "small value" should replace it (for MPEG-based internal encoders)
[17:42] <saste> http://ffmpeg.org/faq.html#ffmpeg-does-not-work_003b-what-is-wrong_003f
[17:42] <saste> this is really silly
[17:42] <saste> ffmpeg does not work => make distclean???
[17:42] <saste> really?
[17:43] <beastd> saste: it is silly but true (sometimes)
[17:44] <saste> beastd, it is confusing as exposed
[17:44] <saste> usually when an user says "it doesn't work" you have no hints to say what is wrong
[17:44] <beastd> I guess it was added by Carl to avoid bug reports which just need a make distclean and no fix
[17:44] <saste> and the user which poses such a question, will not have a bare clue about what "make distclean" is about
[17:45] <beastd> saste: agree with you that it seems out of place
[17:47] <beastd> I understand the question as a redirection to the issue tracker. If ffmpeg does not work try to file an issue an answer from developers. I think the make distclean was an afterthought.
[17:48] <beastd> I doubt the usefulness of it in a Q/A document. So probably it would be best to just remove it.
[17:48] <DonGnom> saste: maybe i should give -async a try?
[17:49] <DonGnom> or asyncts
[17:49] <saste> DonGnom, how the file result desynched?
[17:50] <saste> the initial audio delay is "real" or "spurious"
[17:50] <saste> ^
[17:50] <saste> ?
[17:50] <saste> in other words, if the audio timstamp is > 0, it should be considered reliable?
[17:50] <DonGnom> saste: its like the longer the video goes the larger is the delay.
[17:51] <DonGnom> on the start -> nothing on the end -> several seconds
[17:53] <saste> DonGnom, are you remuxing or transcoding?
[17:54] <DonGnom> saste: don't really know think transcoding http://sebsauvage.net/paste/?7002df71f3089ade#492jqvluon6+oyZ9f8gKwenhll11glm7T7DHicM0j4M=
[17:54] <saste> but sure async may be worth a try
[17:55] <saste> DonGnom, that's transcoding (remuxing is copying the compressed data from one format to another one)
[18:00] <DonGnom> saste: thank you. ill try a shot with asyncts (do i have to specify it one time or for every stream?
[18:01] <saste> DonGnom, I believe so
[18:07] <jackolant> I simply want the output file to have the SAME QUALITY. -sameq has been removed and ffmpeg ignores it now, but what do I use instead?
[18:13] <DonGnom> hmm on which version was asyncts added?
[18:54] <fling> no more freezes > -c:v libx264 -preset faster -tune film -crf 25 -maxrate 1m -bufsize 3m -threads 0 > http://www.justin.tv/fling23/b/337950744
[18:54] <fling> ffmpeg rules!
[19:06] <jackolant> I simply want the output file to have the SAME QUALITY. -sameq has been removed and ffmpeg ignores it now, but what do I use instead?
[19:07] <durandal_1707> small quant
[19:07] <durandal_1707> sameq means same quantizers
[19:07] <durandal_1707> and not quality
[19:07] <durandal_1707> it worked by pure luck
[19:08] <durandal_1707> so use -qscale 0
[19:08] <durandal_1707> if you are transcoding
[19:21] <jackolant> durandal_1707: Transcoding?
[19:21] <jackolant> durandal_1707: Why on Earth would -qscale 0 not by default?
[19:22] <durandal_1707> depends what codecs you are using....
[19:22] <jackolant> durandal_1707: It tells me that -qscale is ambiguous.
[19:23] <jackolant> And that I should use -q:a or -q:v.
[19:23] <durandal_1707> so use -qscale:v
[19:23] <durandal_1707> if you are doing video
[19:23] <jackolant> I want both video and audio to be the same quality.
[19:23] <jackolant> (And why would I not want to? Bizarre.)
[19:23] <jackolant> -q:a 0 -q:v 0?
[19:23] <durandal_1707> that cotradicts with trascoding
[19:24] <jackolant> But...
[19:24] <durandal_1707> same quality for lossy source would mean you need to use lossless destination .....
[19:24] <thegeek> jackolant: no offense but you clearly don't understand media compression very well
[19:24] <thegeek> try to read the documentation a bit it will help a lot
[19:26] <jackolant> How can it be that -q:v 0 caused a big JPEG to become an identical JPEG with smaller size?
[19:26] <jackolant> I assume that "video" goes for "pictures" as well.
[19:27] <durandal_1707> identical?
[19:27] <jackolant> But I don't get how it can have the same quality in the same file format yet be smaller.
[19:27] <thegeek> jpeg is lossy compression
[19:27] <thegeek> so the compression is better and/or the image quality is worse
[19:28] <jackolant> Well, upon very careful inspection, they are slightly different.
[19:28] <jackolant> But very unnoticeable.
[19:28] <jackolant> But then again, that's not "same quality".
[19:28] <jackolant> So I don't really understand what gives.
[19:29] <jackolant> Source was JPEG and destination was JPEG. -q:v 0.
[19:29] <jackolant> Shouldn't that logically result in the exact same photo?
[19:30] <durandal_1707> there is no same quality option
[19:30] <durandal_1707> and never was
[19:31] <jackolant> Then what in the hell is the same quality option?
[19:31] <jackolant> We just went over this minutes ago, didn't we? :(
[19:31] <durandal_1707> such option does not exist
[19:31] <durandal_1707> there is just option that control how big files are going to be made
[19:32] <durandal_1707> if you want same quality use lossless codecs
[19:32] <jackolant> Gah...
[19:32] <jackolant> So you lied earlier?
[19:33] <jackolant> What does -q:v 0 do?
[19:33] <durandal_1707> i never said it gives same quality
[19:33] <jackolant> And it definitely doesn't, judging by the files I test on.
[19:33] <jackolant> But the quality seems to be damn close.
[19:33] <durandal_1707> -qscale q           use fixed quality scale (VBR)
[19:34] <durandal_1707> -qmax              <int>   E..V.. max video quantizer scale (VBR)
[19:34] <durandal_1707> and others ...
[19:34] <jackolant> I am just gonna use -q:a 0 for all sound-related files and -q:v 0 -q:a 0 for all video-related files and -q:v 0 for all image-related files. Does that make sense?
[19:34] <durandal_1707> and they are just codecs specifi...
[19:35] <jackolant> ?
[19:35] <jackolant> Please try to be clear.
[19:35] <durandal_1707> i'm clear, such options make sense only for some codecs
[19:36] <durandal_1707> and you never specfied from what to what you are transcoding
[19:38] <jackolant> durandal_1707: "Anything to AVI", for example.
[19:38] <durandal_1707> AVI is container and not codec
[19:40] <juanmabc> faq 1
[19:46] <Sashmo> does anyone know if there is a way to ignore discontinuity errors while encoding from a transport stream source?
[19:49] <jackolant> In the entire documentation, there is not a mention of "video quality" or "q:v". The hell?
[19:49] <jackolant> Is the documentation to ffmpeg some kind of social experiment?
[19:50] <jackolant> I am reading: http://ffmpeg.org/ffmpeg.html
[19:51] <durandal_1707> there is quality scale
[19:51] <durandal_1707> and it is codec specific
[19:51] <durandal_1707> and it makes sense when encoding and not transcoding
[19:52] <durandal_1707> q:v is short for -qscale:v
[19:53] <durandal_1707> and qscale is mentioned in documentation
[19:54] <jackolant> It's all extremely confusing and messy.
[19:54] <durandal_1707> and there is -global_quality
[19:54] <jackolant> Basically, I am taking any video file and having ffmpeg spit out an .avi (yes, I know it's a container. I guess it uses whatever it wants to use by default).
[19:54] <durandal_1707> jackolant: you can use -c copy to remux
[19:55] <jackolant> If I don't use -sameq (with older versions of ffmpeg) or -v:q 0, the resulting file is very poor.
[19:55] <jackolant> I don't under stand what -global_quality is supposed to be (yes, I searched for it in the manual).
[19:55] <jackolant> I also don't know what -c copy would do, nor what remux is.
[19:55] <jackolant> (Sounds like remix.)
[19:56] <durandal_1707> if you say so....
[19:56] <jackolant> "A rip of Blu-ray or HD DVD disk to another container format or just stripping the disc of menus and bonus material while keeping the contents of its audio and video streams intact (also keeping the current codecs), guaranteeing the exact 1:1 movie quality as on original disk."
[19:56] <jackolant> If I say what?
[19:56] <jackolant> durandal_1707: If I say what, then what?
[19:57] <durandal_1707> jackolant: what is your goal?
[20:00] <jackolant> Trying to understand this...
[20:00] <jackolant> I am noticing that the resulting files are BIGGER than the originals...
[20:00] <jackolant> Even when they are the same format.
[20:01] <jackolant> Such as MP3 => MP3. Bigger file results.
[20:01] <jackolant> Makes no sense to me.
[20:01] <durandal_1707> that is normal for transcoders
[20:02] <durandal_1707> use -c copy and size will be same
[20:03] <jackolant> Sigh...
[20:03] <jackolant> What do you mean it's normal?
[20:03] <jackolant> How can it be?
[20:03] <jackolant> So -c copy is just short for "-codec copy"?
[20:04] <jackolant> Why doesn't it do all of this crap by default?
[20:04] <durandal_1707> yes, it do remuxing
[20:04] <jackolant> I don't understand the purpose of hiding all of this.
[20:05] <jackolant> And if not -c copy is used, what d oes it use?
[20:24] <jackolant> durandal_1707: ?
[20:27] <mark4o> jackolant: it assumes you want to re-encode by default; that is the usual use of ffmpeg, to re-encode to a different codec or with different parameters
[20:32] <jackolant> Well...
[20:32] <jackolant> Hrm.
[20:34] <jackolant> This is so damn hard that I don't even know what to ask.
[20:40] <mark4o> I cannot seem to extract a clip from a video since I updated my ffmpeg
[20:40] <mark4o> e.g. ffmpeg -i in.mp4 -codec:v copy -codec:a copy -ss 5 -t 20 out.mp4
[20:40] <mark4o> used to copy a 20s clip starting from 5s but now the audio starts with 5s silence and is then 5s out of sync
[20:41] <mark4o> known bug?  happens with both mp4(h.264+aac) and webm, so not codec-specific
[22:06] <Bear_DK> the documentation states that av_audio_resample_init() is deprecated, but what should be used instead?
[22:15] <relaxed> mark4o: add -async 1
[22:18] <mark4o> relaxed: thanks, but just tried it and that does not make any difference
[22:19] <mark4o> it works with 1.0 but not 1.0.git-14f69a0
[22:35] <beastd> Bear_DK:  There is libswresample for audio resampling now. There is an lavfi filter that makes use of it libavfilter/af_aresample.c (you can look at the implementation if you want to find out how to use lswr directly). Of course there is also docs in the libswresample sources (they can be found in ffmpeg source tree under that very name).
[22:48] <Bear_DK> beastd, ah, thx! I see the swr_* functions have the options I was looking for
[22:55] <beastd> Bear_DK: Great. I hope lswr works well for you. If you discover bugs or have feature requests you can file them under ffmpeg.org issue tracker (type: defect/enhancement, component: swresample).
[23:09] <Leoneof> hi, is there a way to fix broken mp4 ?
[23:13] <klaxa> depends on how broken it is, i think chances are that it isn't fixable most of the time
[23:14] <Leoneof> :[
[23:14] <klaxa> how did it break?
[23:14] <Leoneof> half download
[23:15] <klaxa> and can you paste the output of ffmpeg -i file.mp4 ? (pastebin or something similar)
[23:15] <klaxa> well if it's a half download, can't you resume the download? otherwise it might be fixable with ffmpeg (the missing parts won't show up of course) but you can remux it into a new mp4 container probably
[23:17] <Leoneof> klaxa: can ffmpeg create empty mp4 in case to remux with broken file?
[23:18] <klaxa> if the streams itself aren't broken you should be able to do ffmpeg -i broken.mp4 -c:a copy -c:v copy fixed.mp4
[23:18] <Leoneof> "[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9ddd5e0] moov atom not found"
[23:19] <klaxa> can you paste the complete output of ffmpeg -i broken.mp4?
[23:19] <klaxa> pastebin or something please
[23:20] <Leoneof> k
[23:23] <Leoneof> klaxa: http://pastebin.com/aK37KE41
[23:24] <klaxa> Leoneof: http://blog.alwayshere.info/2011/01/ffmpeg-moov-atom-not-found.html <-- google returned that
[23:24] <klaxa> if possible re-download the file... i think that's the easiest option
[23:26] <Leoneof> then atomicparsely :D
[23:26] <Leoneof> thanks
[23:42] <Leoneof> well, impossible... download again :/
[00:00] --- Sun Nov  4 2012


More information about the Ffmpeg-devel-irc mailing list