PDA

View Full Version : x264 2pass qstep ?


Selur
2nd December 2008, 22:06
I normally da 2pass encodings and set qmin to 1, leave qmax at 51 and change qstep to 16.

Will it help/hurt the overall quality if I set qstep to e.g. 50?

My thought behind using a high qstep value is to give x264 the possibility to adjust the quantization according to what x264 judges as best and not limiting it with e.g. qstep = 4.


Cu Selur

Dark Shikari
2nd December 2008, 23:05
There's a reason the qstep is what it is: don't touch it.

(This rule generally applies to all obscure ratecontrol parameters. If you don't know what they do, don't touch them, because they're default for a reason.)

Selur
2nd December 2008, 23:08
So that I might not die stupid and in the spirit of education a small explanation why qstep is set to 4 would be nice. :)

Cu Selur

Audionut
3rd December 2008, 01:42
Well DS mentions rate control. So I assume that allowing x264 to change to quantizer by a large amount will throw it's rate control off.

Of course, I could just be making an ass out of myself and umption.

Dark Shikari
3rd December 2008, 01:53
QPstep affects three things:

1. The maximum amount by which VBV ratecontrol can adjust the QP per row (note: does not apply to the last-ditch underflow prevention, which can go up to qpmax).

2. The maximum difference in frame quantizer between two neighboring P-frames (AQ is separate).

3. The step size used in 1pass ratecontrol to move avoid bitrate overflow.

Don't touch it.

Selur
3rd December 2008, 02:03
Okay, I kind of thought that lowering the restriction would help rate control instead of harm it.
Thanks for the info.

Cu Selur

pcordes
5th December 2008, 01:41
QPstep ...
Don't touch it.

When I was trying some very-low-bitrate encodes of cartoons maybe a year ago (e.g. Family Guy), I tried raising qpstep to 8. I was hoping that would let x264 use a lower quantizer for an I frame that would be referenced for a long time after a scenecut. Changing ipratio seemed to work better, but I'm curious if raising qpstep might have made sense there. (I didn't spend a lot of time testing qpstep = 4 vs. 8, so I didn't actually find out if my guess about it's effect was right...)

BTW, Family Guy compresses ridiculously well, because most of the time the only difference between frames is a characters lips moving. If you don't mind that being low qual, you can still have good quality in the static backgrounds. Most of the time they don't even pan over backgrounds.

Sagekilla
5th December 2008, 02:34
No, that only affects how large of a jump x264 can make from one frame to another. You're right in changing ipratio to give I frames a lower quant because that's what it's meant to do.