[MPlayer-users] Jumpy AVIs when encoding from TV tuner

Richard Dymond rjdymond at ntlworld.com
Mon Dec 2 23:45:03 CET 2002


Hi.

I've looked in the mailing list archives and the documentation, but I
can't find anything relevant to my problem. (There might be something
there - in which case flame me! - but it didn't jump out at me.)

So what is the problem? Encoding from my Hauppauge WinTV PVR. Picture
and sound are mostly fine in the resultant AVI, but every few minutes
or so, for about 20 seconds, the picture will become jumpy, as if
sequences of several frames are being skipped. (A/V sync remains good,
though.) If I use the -noskip option, this seems to fix the jumpy
picture, but at the expense of A/V sync. With -noskip, the A/V sync will
be fine up to a point, and suddenly become about half a second or so out.

Here's the mencoder command I'm using:

mencoder -tv on:driver=v4l:freq=719.187:outfmt=yv12:width=768:height=576 \
 -ovc lavc -lavcopts vcodec=mjpeg:vqscale=3 \
 -vop scale=384:288,crop=760:568:4:4 -oac copy -o tv.avi

Before anyone asks: I capture at 768x576 and then scale to 384x288 because
capturing at 384x288 gives a *very* poor picture. (384x288 seems to be
a critical resolution: anything below that looks awful, above is fine.)
I encode to MJPEG because that allows me to use the mjpegtools utilities 
to edit the result before doing a final encoding to MPEG4/MP3. At least,
it *should*, but the mjpegtools utilities don't work on any AVI that has
"jumps" in it. If I'm lucky enough to produce an AVI with mencoder that
*isn't* jumpy, mjpegtools is happy; but any AVI more than a few minutes
long invariably has jumps in it.

So, could I be "mencoding" more sensibly? Am I missing some crucial
options? Is this - gasp! - a bug?

Here's some info about my setup that may or may not be useful.

System info
===========
Linux From Scratch 3.3
kernel 2.4.20
libc 2.2.5
X 4.2.0
gcc 2.95.3 20010315
ld 2.12
binutils 2.12

Hardware & drivers
==================
CPU: AMD Athlon 1.4GHz
Video card: GeForce 2 MX (32MB)
Video driver: nVidia 1.0-2960
Sound card: Creative SB PCI 128 with kernel OSS drivers
TV tuner: Hauppauge WinTV PVR

Output of, for example, lavtrans on a "jumpy" AVI
=================================================
richard:~/recording$ lavtrans -o jumpy.avi -f a jumpy.eli
++ WARN: [lavtrans] Input file /home/richard/recording/tv.avi is not in  
  JPEG 4:2:2 or 4:2:0 format
**ERROR: [lavtrans] Error writing output: Internal: broken JPEG format  

(lavtrans always gives the warning about JPEG format; it doesn't seems to
make any difference on MJPEG AVIs except the jumpy ones.)

I'm out of ideas at the moment. Anybody got any to spare?

Thanks.

Richard Dymond




More information about the MPlayer-users mailing list