[MEncoder-users] Encoding test results

Matyas mplayer.list at sustik.com
Mon Aug 3 04:05:52 CEST 2009


A ran some x264/mencoder encoding tests in order to find out whether single
or two pass encoding is best suited for my needs.

I used log=3 and then plotted the SSIM values from octave, the results are at:

sustik.com/mencoder-tests/.

Below are some explanations regarding what exactly I did.  I plan to run
further tests using other type of sources and parameters.  Suggestions and
comments regarding the tests and the results are welcome.

The source is a 24fps (progressive) movie containing 140629 frames, which was
cropped to 656 x 448 size.  I also used the hqdn3d=2:1:2 filter in all runs.

The x264 options:
X264OPTS=pass=1:subq=7:8x8dct:frameref=4:bframes=9:b_adapt=1:weight_b:\
b_pyramid:nointerlaced:nofast_pskip:trellis=1:mixed_refs:weight_b:me=umh:\
me_range=32:nodct_decimate:partitions=all:psy-rd=0.5,0.3:qcomp=0.7:\
direct_pred=auto:keyint=300:threads=auto:psnr:ssim:log=3

(The second pass used the same options; some runs with turbo=2 added, and
crf, qp, bitrate set as applicable.)

I used:
MEncoder SVN-r29443-4.3.2
x264 - core 68 r1189 9d0b5e9

I compared three single pass encodes first.  crf=23 resulted in a 656 kb/s
file, qp=23 produced a 626 kb/s file.  So I also ran a single pass with
bitrate=656.

        crf=23       qp=23         bitrate=656
PSNR    43.683       44.519        43.588
SSIM     0.9784801    0.9794548     0.9782447
kb/s   656.35       626.86        656.84

The SSIM graph (per frame) for qp=23 and bitrate=656:
qp=23.bitrate=656.compare.png
(On the graphs in parenthesis: the mean SSIM and standard deviation.)
For crf=23 and bitrate=656:
crf=23.bitrate=656.compare.png

Next, I ran a two pass encode using a qp=23 first pass and 626 kb/s second pass:
qp=23.compare-passes.png
I did not expect the second pass do worse but that appears to be the case
(for this source anyway):

       "qp=23 1-pass"      "qp=23 1st pass, bitrate=626 2nd pass"
PSNR    44.519              43.793
SSIM     0.9794548           0.9787170
kb/s   626.86              626.17

Then I ran a 2-pass encoding with both passes using bitrate=656, the first
pass used turbo (this is how I encode usually).

qp=23.2-pass-turbo-bitrate=656.compare.png
Compares the results (compared to qp=23 since it was better than crf=23).
The qp=23 single pass produced the best result, even the standard deviation
was better.  I also run the 2-pass encoding without turbo.  That did not
improve the results, in fact it was worse (which I did not expect).

I did other runs like a 2-pass with a crf=23 as first pass, that was slightly
better than the one-pass crf=23, but worse than the one-pass qp=23.
(I tried a 3-pass encoding to see what happens; a segfault happened in the
second pass...)

Matyas
-
Every hardware eventually breaks.  Every software eventually works.


More information about the MEncoder-users mailing list