[MEncoder-users] Call for video encoding settings

Guillaume POIRIER poirierg at gmail.com
Wed Jul 20 13:52:48 CEST 2005


On 7/20/05, Corey Hickey <bugfood-ml at fatooh.org> wrote:
> Guillaume POIRIER wrote:
> > Hello folks,
> > I'd like to add some encoding settings examples in our HTML
> > documentation. Those settings off course highly depend on personal
> > preferences, so highlighting a certain encoding setting as "very high
> > quality", "high quality", "fast", and "realtime" won't probably make
> > everyone happy, but I guess it'll still be better than having nothing.
> >
> > Here is what I propose (for lavc MPEG-4, XviD and x264, but I'm also
> > interested in MPEG-2, wmv... settings, also long as it's supported by
> > MEncoder off course).
> >
> >  * Very High Quality:
> > lacv: ?
> 
> That's an interesting question... It's been a long time since I did any
> big lavc comparisons, but I'll submit my personal favorite combination
> and the reasons I use each option. I wouldn't go so far as to say it's
> the best, but it's a path in the right direction. These are tuned
> specifically for color non-animated video with low graininess. I don't
> encode much else.
> 
> mbd=2:mv0:trell:cbp:precmp=2:cmp=2:subcmp=2:predia=2:dia=2:preme=2:vme=5:naq:v4mv:qns=2
> 
> 
> ----------------Justifications------------------
> 
> mbd=2:mv0:trell:cbp
> 
> Based on personal experimentation, these options should never hurt. Note
> that in the (rather old) post linked below I say I like a certain set of
> options; ignore that, the set above is much better.
> http://article.gmane.org/gmane.comp.video.mplayer.user/22016/
> 
> precmp=2:cmp=2:subcmp=2
> 
> Although *cmp=6 gave very slightly higher PSNR on my test clip, *cmp=2
> looked very slightly better in a frame-by-frame comparison.
> 
> predia=2:dia=2:preme=2:vme=5:naq
> 
> All these individually gave slightly higher PSNR on my test clip, and
> didn't seem to make a visual difference.

vme=5 is the same as vme=4 according to the man page :)

> qns=2
> 
> Qns lowers PSNR slightly but ends up dramatically reducing the amount of
> ringing artifacts around sharp borders. This makes a large difference
> when bitrate is low enough that ringing would normally be there, but
> little difference when bitrate is already high enough to alleviate the
> ringing. There doesn't seem to be any adverse effect to using it when
> it's not needed, though.
> http://article.gmane.org/gmane.comp.video.mplayer.user/26054/
> http://article.gmane.org/gmane.comp.video.mplayer.user/26148/

Nice benchmark. I'll add a note later about qns based on your findings.

Here is an updated draft:

Note: The following settings are examples of different encoding
options combinations that affect the speed VS quality tradeoff given
the same target bitrate.

If you are aiming at perfect quality without too much thinking, a high
constant quantizer encode with no B-frames will probably look very
good, but will needlessly spend lots of bits to encode details that
could be coded more wisely using some advanced settings.

Note about High and very high encode settings: with lavc and XviD, you
may want to try the "qpel" option, that may improve or diminish encode
quality depending on the source you encode.

* Very High Quality:
lacv: vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:vmax_b_frames=2:vb_strategy=1:precmp=2:cmp=2:subcmp=2:preme=2:vme=5:naq:qns=2
XviD:
chroma_opt:vhq=4:bvhq=1:quant_type=mpeg
x264:
subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b

 * High quality:
lavc:
vcodec=mpeg4:mbd=2:trell:v4mv:last_pred=2:dia=-1:vmax_b_frames=2:vb_strategy=1:cmp=3:subcmp=3:precmp=0:vqcomp=0.6:turbo:psnr
XviD:
vhq=2:bvhq=1:psnr:chroma_opt:quant_type=mpeg:psnr
x264:
subq=5:4x4mv:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b:psnr

 * Fast:
lavc:
vcodec=mpeg4:mbd=2:trell:v4mv:turbo:psnr
XviD:
turbo:vhq=0:psnr
x264:
subq=4:bframes=2:b_pyramid:weight_b:psnr

  * Realtime:
lavc:
vcodec=mpeg4:mbd=2:turbo:psnr
XviD:
turbo:nochroma_me:notrellis:max_bframes=0:vhq=0:psnr
x264:
(irrevelant)

-- 
A lie gets halfway around the world before the truth has a chance to
get its pants on.
 -- Winston Churchill




More information about the MEncoder-users mailing list