[MEncoder-users] Different parameters in two-pass encoding

James Hastings-Trew jimht at shaw.ca
Sun Feb 1 23:32:35 CET 2009


Stjepan Brbot wrote:
> Hi,
>
> several times on Internet and this mailing lists archive I found that
> people recommend setting parameter "turbo" in 1st pass encoding while
> omitting it in 2nd pass. Or even, to define only subset of parameters in
> 1st step and put several additional parameters (like mdb=2:vhq=4) in 2nd
> pass. Generally speaking, is this correct? In my opinion 1st pass log is
> used for better redistribution of bitrate in 2nd pass encoding but 1st
> pass log should be created with exactly the same conditions (encoding
> parameters). Isn't it?
Keeping all parameters equal during both passes is "more correct" but is 
slower. Your final encode might not be perfectly perfect if you specify 
faster parameters in the first pass, buy it will be "very close" and a 
lot faster. You didn't mention which video codec you are talking about 
so it's hard to be specific, but generally on an x264 encode, on the 
first pass I will use:

bitrate=5000:vbv_maxrate=8000vbv_bufsize=2000:bframes=3:nocabac:nofast_pskip:frameref=1:subq=1:level_idc=31:threads=4:pass=1:turbo

And on the second pass I will use:

bitrate=5000:vbv_maxrate=8000:vbv_bufsize=2000:bframes=3:partitions=all:me=umh:nocabac:nofast_pskip:nodct_decimate:frameref=6:subq=6:level_idc=31:threads=4:pass=2

The first pass goes about 5x faster on my machine than the second pass. 
The final file size is very reasonably close to what I wanted, and the 
resulting video looks great.





More information about the MEncoder-users mailing list