[MPlayer-users] TV-recording with mencoder, "video-buffer full"

D Richard Felker III dalias at aerifal.cx
Sun Feb 27 20:33:10 CET 2005

On Sun, Feb 27, 2005 at 08:18:19PM +0100, The Eye wrote:
> Hi list.
> I searched through the list-archives and also googled through the docs
> and didn't find this anywhere so I hope it is OK asking here.
> I often record stuff from my saa7134-based TV-card with a command like:
> mencoder tv:// \
>  -tv driver=v4l2:width=768:height=576:amode=1:adevice=/dev/dsp1 -oac \
>  mp3lame -lameopts cbr:br=96 -ovc lavc -lavcopts \
>  vcodec=mpeg4:vbitrate=2000 -vf crop=698:558:12:2,scale=640:480,pp=lb /
>  -endpos 1:00:00 -o somefile.avi
> btw if anything about this is stupid, please tell me.

It is.
1. NEVER rescale interlaced video vertically. You can do this after
deinterlacing, but not before.
2. Why are you capturing at 768-width then cropping to 698, then
scaling down to 640? Instead, just set the capture width such that,
after cropping, the final size will already be 640. This will be a LOT

> Anyway, 9 times out of 10, this works just perfectly. But once in a
> while, I get lots of errors like
> Video-buffer full, dropping frame
> and in the resulting file, audio and video are _badly_ out of sync (like
> 20-30 seconds out of sync).
> Questions: what is the cause of this? What exactly does "video-buffer"
> in this context mean? Is it some part of the tv-card or something else?
> Because in this case nothing should go via video-card, or am I wrong?

It means your cpu is too slow, and it's getting so far behind that it
will never catch up.

> And of course: what can I do to stop this from happening?

Capture at a lower resolution or with less filters, etc. Another good
option would be to capture audio as raw pcm (to be reencoded to mp3
later) or as mp2 (with -oac lavc -lavcopts acodec=mp2:...), since lame
is atrociously slow.

> As far as I can tell, nothing that is a drag on CPU or memory is running
> on this machine whilst running the recording, I even make a point of
> stopping X before starting the recording ...

Yes, but your command line needs an insanely fast cpu to encode


More information about the MPlayer-users mailing list