mencodermencoder output.avi -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -oac copy -o outputmpg.mpginput.avi
-of mpeg -ovc lavc -lavcopts vcodec=mpeg1video \
-oac copyother_options
-ooutput.mpg
mbd=<0-2> (also see *cmp, qpel)
Macroblock decision algorithm (high quality mode), encode each macro block in all modes and choose
the best. This is slow but results in better quality and file size. When mbd is set to 1 or 2,
the value of mbcmp is ignored when comparing macroblocks (the mbcmp value is still used in other
places though, in particular the motion search algorithms). If any comparison setting (precmp,
subcmp, cmp, or mbcmp) is nonzero, however, a slower but better half-pel motion search will be
used, regardless of what mbd is set to. If qpel is set, quarter-pel motion search will be used
regardless.
0 Use comparison function given by mbcmp (default).
1 Select the MB mode which needs the fewest bits (=vhq).
2 Select the MB mode which has the best rate distortion.
trell
Trellis searched quantization. This will find the optimal encoding for each 8x8 block. Trellis
searched quantization is quite simply an optimal quantization in the PSNR versus bitrate sense
(Assuming that there would be no rounding errors introduced by the IDCT, which is obviously not
the case.). It simply finds a block for the minimum of error and lambda*bits.
lambda
quantization parameter (QP) dependent constant
bits
amount of bits needed to encode the block
error
sum of squared errors of the quantization