[MEncoder-users] MPEG-2: vrc_minrate and vqmin / lmin

A. Schmid sahib at phreaker.net
Fri May 2 22:30:31 CEST 2008


Nicolas Hesler wrote:
> 2. Any ideas why vqmin=1 and lmin=1 don't remove the blocking unless I 
> include the vrc_minrate >0?? What is actually going on?

Here's how i think it is:
vqmin sets the minimum quantizer. Just because you lower vqmin doesn't 
mean rate control will actually use that minimum!
lmin is for tuning rate control - there is no direct dependency between 
it and vqmin. lmin just tunes the probability distribution of 
quantizers, not quantizer minimum or maximum.
Because of that, it's still logical to allow lmin < vqmin.
vrc_minrate sets minimum bitrate.
I can only guess, that by setting vrc_minrate > 0, you (somehow) prevent 
big quantizers (which would lead to low bitrates).

If I'm right, vqmin and lmin is not what you want to tune! They are only 
interesting if you want to tune how small quantizers get. Small 
quantizers mean less compression, bigger coefficients and possibly a 
better image.

Gradient images shouldn't be that complex, you may want to try lowering 
vqmax instead! Default is vqmax=31, which is maximum. Big quantizers 
mean throwing away more details, possibly leading to bad images.

> 3. In the man, it says vqmin=1 is "Not recommended (much larger file, 
> little quality difference and weird side effects: msmpeg4, h263 will be 
> very low quality, ratecontrol will be confused resulting in lower 
> quality and some decoders will not be able to decode it)."  What are 
> these weird side effects? 

The same as above: Low vqmin means big coefficients (coefficients are 
divided by the quantizer) - possibly big enough to produce overflows!
Most definitely you won't get any (visibly) better images by having 
vqmin=1 instead of 2. As I said, you probably want to lower vqmax.

> 4. In the man, it says that "Lowering lmin will make lavc more likely to 
> choose lower quantizers for some frames, but not lower than the value of 
> vqmin."   If this is the case, why does the man say that lmin can == 
> 0.01 when vqmin can't go lower than 1.

See above. Low lmin values only mean higher probability of low 
quantizers. While lmin=0.01 won't produce quantizers lower than 1 
(Because vqmin forbids it. And they'd be useless anyway - dividing by a 
value less than 1 means you make up bigger coefficients than are 
actually there. That'd be plain stupid.), it also modifies probabilities 
for quantizers bigger than 1.

> 5.  Are all of the options that are noted with (pass 1/2) in the man 
> disabled if you include them in the second pass? Or can they be 
> detrimental if you include them on a second pass?

Generally it's safest (though slow) if pass 2 uses exactly the same 
parameters as pass 1. Using different parameters can (depending on the 
parameters) result in inexact statistics.
I'm not sure what (pass 1/2) means - perhaps it's something to do with 
pass=3 encodings. Pass=3 works differently, perhaps it just doesn't 
need/use the parameters marked (pass 1/2)? Anybody know?

Regards
Alex




More information about the MEncoder-users mailing list