[MPlayer-users] Cartoons

D Richard Felker III dalias at aerifal.cx
Wed Mar 26 21:29:56 CET 2003


On Tue, Mar 25, 2003 at 09:53:26AM -0500, Yan Seiner wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> I continue to make progress in creating my home video library.  This
> morning I stated to play around with some of my kids' cartoons.
> 
> Surprisingly, the video quality is awful - you can see the tiling
> clearly and many of the edges have visible artifacts.
> 
> I'm playing with the following command to encode the tapes:
> 
> mencoder -tv
> on:driver=v4l:input=1:norm=NTSC:width=320:height=240:adevice=/dev/dsp
> -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=500 -oac mp3lame -lameopts
> vbr=3 -o movie3.avi
> 
> which produces acceptable live action movies from tapes and DVDs (my
> definition of "acceptable" is suitable for viewing on a 9" portable
> TV.)  I do a bit of clipping and rescaling on the DVDs but that's not
> really relevant here.
> 
> I remember reading somewhere that sharp color transitions consume a lot
> of bandwith.  Cartoons have a lot of those.
> 
> Is this right?  Any codecs suitable for cartoons?  Any help is greatly
> appreciated.  I really don't want to use a bitrate greater than 500 if I
> can at all help it, both for size and network bandwith considerations.

500 is a very minimal bitrate, so you can expect bad results. I'm
surprised you find it tolerable for non-cartoon material coming from
VHS. You're right that the sharp edges in animation don't compress as
well, but the noise from VHS (which is very low quality to begin with)
ends up wasting a lot of space too.

Anyway, I think the best way you could improve the situation is to
first record with a lossless codec, or else VERY high quality
(vqscale=1 or 2). Be aware that this will take a LOT of disk space.
Then, after recording, do a 2pass encode with vbitrate=500, and also
use some filters to clean up the noise (hqdn3d and/or one or more blur
filters). By doing a 2-pass encode, you won't waste bits on scenes
that don't need them, so you'll have more left for the complicated
parts.

If you really don't want to go with the two-pass approach (e.g. if you
don't have the disk space), you could just do single-pass with a
strong blur filter or hqdn3d, but this will require a VERY FAST cpu to
encode in realtime.

Also read encoding-tips.txt for general tips on using advanced lavc
options to improve the quality.

Good luck!

Rich



More information about the MPlayer-users mailing list