[Ffmpeg-devel] Differences between mencoder and ffmpeg when encoding using x264

Erik Slagter erik
Fri Feb 24 22:53:53 CET 2006


On Tue, 2006-02-21 at 11:09 +0000, Robert Swain wrote:
> -ac -loop -partitions parti4x4+partp8x8+partb8x8 -me_method 7 -subq 5 
> -me_range 16 -chroma -trellis 1 -gop_size 250 -keyint_min 25 -sc_threshold 40 
> -bit_rate_tolerance 3000 -rc_eq 'blurCplx^(1-qComp)' -qcompress 0.60 -qmin 10 
> -qmax 51 -max_qdiff 2 -rc_buffer_size 8000000 -i_quant_factor 0.71
> 
> ...should bring them into line. me_method 7 corresponds to hex. I think qpstep 
> is 4 in the x264 cli. ip_ratio = 1/abs(i_quant_factor). The rest of the 
> differences you should be able to see. I think these command line options are 
> correct but I may be wrong. Also, I don't know if the mencoder options are 
> synced to the x264 cli precisely. They're pretty close though.

Using these options to ffmpeg:

-qmin 10 -qmax 51
-minrate 0 -maxrate 9000 -b 3000 -bufsize 1000
-coder 1 -loop 1 \
-me hex -me_range 16 \
-subq 5 -cmp 256 -trellis 1 \
-g 250 -sc_threshold 40 \
-rc_eq 'blurCplx^(1-qComp)' \
-partitions parti4x4+partp8x8+partb8x8

You get more or less the options for x264 that are set by mencoder by
default for x264. There is still a very small amount of difference,
either imho non-relevant or nasty to solve without code change.

Diff (-u) in actually used values (from the output):

 cabac=1
 ref=1
@@ -14,7 +14,7 @@
 8x8dct=0
 cqm=0
 chroma_qp_offset=0
-slices=2
+slices=1
 nr=0
 bframes=0
 keyint=250
@@ -22,12 +22,12 @@
 scenecut=40
 rc=cbr
 bitrate=3000
-ratetol=1.3
+ratetol=1.0
 rceq='blurCplx^(1-qComp)'
-qcomp=0.50
+qcomp=0.60
 qpmin=10
 qpmax=51
-qpstep=3
+qpstep=2
 vbv_maxrate=9000
-vbv_bufsize=8192
-ip_ratio=1.25
+vbv_bufsize=8000
+ip_ratio=1.40

I guess with these command lines h264 actually starts doing something
with ffmpeg. And at first sight, it's really good now!

Thanks, all you guys, for your help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2771 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060224/1c922582/attachment.bin>



More information about the ffmpeg-devel mailing list