Log in

View Full Version : Help with H264 in AviDemux, Quantizers.


movmasty
18th January 2012, 01:02
AviDemux 254 as 256 is not opening here.

Say that i want to encode I at 18, P at 21 and B at 24,

How do i have to set the encoder?

CQ, CRF, or CB ??

And which other settings will specifically force the desidered quantizers for I,P, and B frames?

Because if i set a target quantizer in CQ and CRF, it is only an average, also in CQ, between I and Quantizer Control factor of P and B.

Will work to set min and max quantizer as the same? Maybe with CB?
And how is this compatible with Factor between I- and P-B-Frame Quants?

Also which is the relation among Minimum Quantizer set in Quantizer Control and in 'rate control' "maximum Constant rate factor" ?

If i set the target quantizer in CRF, which will be the real quantizers of I,P, and B frames?

movmasty
18th January 2012, 01:17
*deleted unuseful question*

movmasty
18th January 2012, 19:43
Will work to set min and max quantizer as the same? Maybe with CB?
And how is this compatible with Factor between I- and P-B-Frame Quants?

OK, i see that a precise Q is only set per I frames, so the question doesnt have sense.

movmasty
18th January 2012, 19:49
Since log2 of 1,3 - 1,4 - 1,5 is
0,38
0,485
0,585

*6 = 2,27 - 2,91 - 3,51

I would like to know if the resulting Quantizer for P and B is rounded to the nearest integer or to the lower,
eg. +3,51 results in +3 or +4 ?

(Assuming that the Quantizers are set with the formula
"The mapping is approximately H264QP = 12 + 6* log2 of MPEGQP")

Anyway i'm still not convinced that Q2 in xvid is equivalent to 18 in h264,
maybe in the formula we should put 10 instead of 12?
These years of experience have clarified this question?

TIA.

LoRd_MuldeR
19th January 2012, 13:22
Encoding with x264 in constant quantizers (CQ) mode usually is a very bad idea, though possible (if you insist).

Anyway, x264 still gives higher quantizers to B- and P-Frames, as controlled by the "I- and P-Frame Quantizer Ratio" and the "P- and B-Frame Quantizer Ratio".

This is done for a good reason and you shouldn't touch it. Again, if you insist, you can set these ratios to 1.0 and force the same quantizer on all frames.

In CRF mode x264 will adjust the quantizer to the content of the video. It will also use Adaptive Quantization in CRF mode, while this is not possible in CQ mode.

To make a long story short: Use CRF mode, unless you have a very good reason not to do so.

(BTW: The "Min Quantizer" and ""Max Quantizer" options still apply in CRF mode. They just restrict x264's choice of the quantizer. Leave these at default!)