[FFmpeg-user] Audio/Video slowly desync while using ffmpeg's x11grab

Kody Kurtz kody.j.kurtz at gmail.com
Sat Feb 16 01:44:13 CET 2013


 Quad core. I use a Core2 Quad Q9550. Lowering the framerate to 15 or lower
seems to resolve the issue of desync, but at the expense of making the
video too choppy to watch. I did a rerecording at 30fps (the cpu usage this
time seemed to be around 30-35% on average) and this was ffmpeg's output:
http://pastebin.com/dJWLyfGC

ffmpeg's output for 10fps (which also seemed to use 30-35% of my CPU) was
this: http://pastebin.com/wzUCGwDR

So now I have three questions:

1. Why does ffmpeg break the output so many times above 10fps (it broke it
at 15fps too, but I forgot to save the output from that)

2. Why does it use the same CPU no matter the framerate? -threads 0 should
let it use as many threads as it needs and however much CPU it needs,
correct? That shouldn't be a problem since I'm on quad core.

3. Why is it desyncing?

Any help whatsoever would be massively appreciated.

Kody


On Sun, Feb 10, 2013 at 1:47 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Kody Kurtz <kody.j.kurtz <at> gmail.com> writes:
>
> > My CPU usage while recording is 50%, and that's
> > accounting for both CPU usage from the game itself
> > and CPU usage from capturing the video and audio,
> > so I doubt that could be the cause, either.
>
> Single-core cpu?
>
> In any case, test -r 10
>
> > The command I use to capture is
> >
> > ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30
> > -s 640x480 -i :0.0+256,256 -acodec pcm_s16le
> > -vcodec libx264 -crf 0 -preset ultrafast
> > -threads 0 -y Capture.mkv
>
> (If your cpu really is single-core, I would expect
> -threads 1 to perform better.)
>
> Complete, uncut console output missing.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list