[MPlayer-users] Mencoder 1.0pre4 and DVD rip

Ville Saari 113762 at foo.bar.org
Mon May 10 23:04:02 CEST 2004


On Sun, May 09, 2004 at 07:09:10PM -0400, D Richard Felker III wrote:

> Of course it comes out smaller. mbd=1 means always choose encoding
> with smallest size. mbd=2 means optimize for minimal size*error. So
> mbd=2 will give better quality at constant quantizer.

Now I got enlightened. I've been wondering the meaning of
"rate distortion" in the manpage - my first association was
"a measure of how much the bitrate gets distorted", which makes
no sense whatsoever :-)

What is the definition of "error"? If it is the sum or mean of
absolute or squared differences or something similar, then if a
lossless alternative exists, it will be used no matter what the cost
in bits! Using size*(error+some_constant) instead would avoid that
problem.

But how come mbd=2 made that one of the ten movies in my test slightly
smaller? That movie was quite special in other ways too: It was the
shortest one but produced the biggest file - much higher bitrate than
any other. Some scenes in that movie also had the worst quality of the
whole batch: absolutely horrible blocking artifacts. Lavc has exellent
quality most of the time, but it fails miserably on very dark scenes.

> All tests I've seen shown 2 B frames to hurt quality. 1 B frame
> sometimes helps, but any more just hurt.

Current mplayer (current lavc actually) uses too small quantizer for
B-frames causing them to have higher psnr than other frames. This
wastes bits and causes flicker.

I try to emulate the behaviour of 1.0pre2 in my constant quantizer
encodings. 1.0pre2 used b_quant = p_quant*1.25+1.25 by default.
Current version uses b_quant = p_quant*1.25. It still documents the old
behaviour, but the vb_qoffset has been broken since some time around
1.0pre3 (whenever the lagrange multipliers appeared) and has no effect.

My 2 B-frames vs. no B-frames comparisons with 1.0pre2 always favored
B-frames. I haven't tried other numbers. 2 is the norm in mpeg 1 and 2,
so I reasoned that there must be some wisdom behind it.

-- 
 Ville




More information about the MPlayer-users mailing list