[MPlayer-users] mencoder: effective use of qp, crf params for x264?

matthew.garman at gmail.com matthew.garman at gmail.com
Mon Jan 29 16:28:46 CET 2007


I've got quite a collection of movies and TV episodes on DVD.  I'm
currently in the process of ripping these to my computer to create a
personal "video on demand" system.  (Side note: I own all the DVDs.)

I'm currently in the process of trying to find my personal "best"
level of quality vs. space in my encodings.  I've read this document
multiple times:

    http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html

Since then, I've done some more reading, and come across some
interesting information on doom9's forums, e.g.:

    http://forum.doom9.org/archive/index.php/t-109493.html

Such posts suggest that two-pass encoding may not be necessary with
x264 (when using the crf param).  Likewise, the use of the qp
parameter to -x264encopts is suggested.  The mplayerhq.hu link above
doesn't even mention these parameters; the manpage is too terse for
me to get a good appreciation of how these params should be used and
how they interact with the other parameters.

I'm basically working through the trial and error process right now,
trying to find the settings I like best.  For example, here's how I
encoded Batman Begins:

mencoder dvd://1 -v -alang en -aid 128 -oac copy -ovc x264 \
    -x264encopts crf=18:bitrate=2000:partitions=all:8x8dct:me=umh:subq=6:frameref=5:threads=auto:bframes=4:b_pyramid:weight_b \
    -idx -ofps 24000/1001 -vf spp,hqdn3d=2:1:2 \
    -o batman_begins.avi

That took about 10 hours to encode (Athon 64 X2 3800, fully loaded
with another encoding job and seti at home) and resulted in a 2.4 GB
avi file.  I haven't had a chance yet to check the quality.

Before learning about the crf param, I did a two-pass encode, with
these x264encopts for passes one and two (respectively):

        -x264encopts bitrate=1600:subq=3:frameref=5:turbo=1:threads=auto:pass=1:bframes=4
        -x264encopts bitrate=1600:partitions=all:8x8dct:me=umh:subq=6:frameref=5:threads=auto:pass=2:bframes=4:b_pyramid:weight_b

That took about the same time, resulting file size was 2.1 GB.  So
far I've only had a chance to check the quality for a few
minutes---looked pretty darn good, but I could still tell that it
was encoded.

Thoughts?

Thanks,
Matt




More information about the MPlayer-users mailing list