[FFmpeg-user] Screencasting problem.

dE . de.techno at gmail.com
Wed Apr 11 07:06:07 CEST 2012


On 04/08/12 12:13, Noufal Ibrahim wrote:
> Hello everyone,
>          I've been trying to make screencasts using ffmpeg on a VM.
>
>          The command line I'm using is as follows.
>
> ffmpeg -f x11grab -s 1280x800  -r 50 -i :0.0 -f alsa -i pulse -sameq screencast.mpg
>
>
>          and I get the screencast but during recording, I keep seeing
> messages like this
>
> [mpeg @ 0x7ca590]packet too large, ignoring buffer limits to mux it
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=327057 size=341185
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=329098 size=341185
> [mpeg @ 0x7ca590]packet too large, ignoring buffer limits to mux it
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=329098 size=341185
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=331139 size=341185
> [mpeg @ 0x7ca590]packet too large, ignoring buffer limits to mux it
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=331139 size=341185
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=333180 size=341185
> [mpeg @ 0x7ca590]packet too large, ignoring buffer limits to mux it
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=333180 size=341185
> [mpeg @ 0x7ca590]buffer underflow i=0 bufi=335221 size=341185
>
>          When I'm done with the screencast (which is about 8 minutes
> long), I hit `q` and get the video. If I try to watch it, the audio is
> perfectly fine without any choppiness but the video seems to have
> missing frames. This is a guess based on my observation that the mouse
> and text cursors suddenly disappear and appear later.
>
>          I'm guessing that it's because of the problem I've pasted above
> so I tried blindly passing -bufsize to the command line try to increase
> the buffer size. Passing something like -bufsize 43000 makes the error
> go away but I can't quit ffmpeg. It doesn't respond to `q` and Ctrl-C it
> gives me a truncated video.
>
>          I'd appreciate any pointers to fix the choppy video problem.
>
> Thanks.
>

IMO ffmpeg requires quiet a powerful CPU for real time encoding using 
any codec; thus for the purpose, I suggest you use recordmydesktop (it 
has a GTK interface too) which only captures the changed pixels and so 
is a LOT faster (you actually get 30 FPS). But notice, you wont be able 
to capture composting properly.

In recordmydesktop, for the input audio device, I suggest you use pulse, 
you can do the same with ffmpeg too since pulseaudio can emulate ALSA 
devices. Using ALSA devices directly may cause a/v sync issues in both 
the programs.


More information about the ffmpeg-user mailing list