[MPlayer-users] advice on mencoder options
D Richard Felker III
dalias at aerifal.cx
Mon Nov 17 21:48:41 CET 2003
On Mon, Nov 17, 2003 at 10:34:45AM +0200, Tuukka Toivonen wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> On Sat, 15 Nov 2003, anton wrote:
>
> >I have been trying to get an "optimal" setting for most of my dvd
>
> I recommend the following options for video encoding:
>
> mencoder -mc 0 -noskip -skiplimit 0 -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:trell:mbd=2:vmax_b_frames=1:v4mv:vb_strategy=0:cmp=2:subcmp=2:precmp=2:predia=1:dia=1:vme=4
>
> Also I recommend cbp if you're using new enough version.
On one set of tests I performed, cbp reduced psnr... :(
On average it seems to be good, though.
> >Most howtos seem to scale, but the mplayer documentation says not to. I
>
> If you have enough storage available, I recommend not to scale. However,
> this requires much space at high bitrate. If you want to be economical
> and use low bitrate, you should also scale the video smaller. I recommend
> something like 0.26 bits per pixels (but it depends much on the video,
> the more motion and details, the more bits you need).
Bits per pixel is not a good metric. When you scale down, the amount
of high frequency content per block increases, so scaling to 1/4 size
(half in each dimension) does _not_ let you cut the bitrate to 1/4!
Actually at very low resolutions (once block complexity is already
very high), bitrate need should scale proportional to # of pixels like
this, but not at high resolutions. A better estimate seems (not
mathematically justified, just empirically) that bitrate need should
scale with sqrt(# of pixels).
> E.g. 640*480 resolution video at 25 frames per second at bitrate 2000
> kbit/s would be 2000000/(640*480*25) = 0.26042 bits per pixel.
Then your recommendation of 0.26 is insane. 640x480 video is fine with
~1100 kbit/sec from my experience. In fact constant qscale=2 only gave
me 1500 kbit/sec!! Of course if you have hideous noisy input from TV
then you'll need more bits (or preferably you'll need to denoise), but
for clean-source video, properly cropped, I expect 2000 will always be
overkill.
Rich
More information about the MPlayer-users
mailing list