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

Nicolas Hesler nicolas.hesler at sheridanc.on.ca
Fri May 2 20:30:49 CEST 2008


I was getting many distracting blocking artifacts in some of the MPEG-2 
videos I was encoding that contained detailed gradients and set out to 
atleast minimize the problem.

I created a decent RGB radial gradient PNG using Flash; to use as a 
testing video.

I was able to determine that if I lowered vqmin and lmin to 1 AND set 
vrc_minrate=1 (or anything above 0), I was able to remove the blocking.  
I also set dc=10 because if I left the default, the encoded video would 
contain small pulsating black blocks. If I don't set vrc_minrate to 
higher than 0, the blocks still appear.

Here's an example command line:  * Note I blew up the bitrate to ensure 
I would have more than enough to spare.

mencoder -sws 9 -oac lavc -ovc lavc -of mpeg -mpegopts 
format=mpeg2:muxrate=18080:tsaf -vf/
harddup -srate 48000 -af lavcresample=48000:0:2 -lavcopts /
 vcodec=mpeg2video:vrc_buf_size=3835:vrc_minrate=1:vrc_maxrate=18000:vbitrate=14000:trell:mbd=2:/
preme=2:dia=4:predia=4:precmp=2:cmp=2:subcmp=2:cbp:mv0:acodec=ac3:abitrate=224:keyint=12:/
vqmin=1:lmin=1:dc=10:vstrict=0:vpass=1:aspect=16/9 -ofps 24 export.avs 
-o banding.mpg


However, if I set the min_rate above 0, I get this message: 

[mpeg2video @ 00D85BA0]Warning min_rate > 0 but min_rate != max_rate 
isn't recom
mended!

1. Why isn't this recommended? 

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?

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? Does MPEG-2 video suffer from these side 
effects?? Or DVD compliant MPEG-2 video?  In this test, I've only 
noticed better quality with vqmin=1 with mpeg2video.

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.

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?

Your help is appreciated,







More information about the MEncoder-users mailing list