View Full Version : 1st pass quantizers vs. 2nd pass quantizers
rjc7394
6th June 2008, 00:26
I'm kind of confused about how 2nd pass quantizers work in relation to 1st pass quantizers. In general, do you want the 2nd pass quantizers to be set lower than the 1st pass quantizers so the encoding will be more flexible assigning quantizers? (Question is in relation to high bitrate encoding using high bitrate CQMs).
Dark Shikari
6th June 2008, 00:39
You don't "set" quantizers. The quantizers are a result of the encoder's ratecontrol. Ideally, one should trust the encoder to use any quantizer it believes necessary.
The first pass in Xvid uses CQ2, so its quants will always be the same.
rjc7394
6th June 2008, 01:30
In both passes you manipulate the minimum quantizer values while keeping the maximum quantizers at 31 from everything I've read here.
Brother John
6th June 2008, 02:16
Default behaviour is a 1st pass at CQ2 and creatively scaling down quants in 2nd pass to achieve the desired file size.
Also there’s the school of thought saying that you want to do the 1st pass at approximately the average quant of the final encoding for best result. Resoning behind this: The less severe scaling is necessary in 2nd pass the less quality hurting inaccuracies occur.
If you don’t *really* know what you’re doing it’s probably best to stay with Xvid’s default behaviour. For high bitrate encoding you’re likely to end up in the quant 2 area anyway.
rjc7394
6th June 2008, 08:06
For 1st pass I set the minimum quantizer values for I, P and B frames as stated in the Preset Sticky and for 2nd pass I reduce those quantizer values to hit my file size and bitrate and I get decent results but I wanted to know if there are anymore approaches WRT minimum quantizer values in 2nd pass. If you use higher minimum quantizers values in 2nd pass you eat up a lot of bytes and the quality is reduced in the crucial areas and placed in the non-crucial areas where it's not really needed?
unskinnyboy
7th June 2008, 05:13
By raising minimum quantizers in the 2nd pass, say you raise it from 2 to 3, you are disallowing the encoder to encode a frame at Q2 even when it's in a position to do so. Why would you want to do that, especially for HBR encoding?
ankurs
13th June 2008, 15:57
By raising minimum quantizers in the 2nd pass, say you raise it from 2 to 3, you are disallowing the encoder to encode a frame at Q2 even when it's in a position to do so. Why would you want to do that, especially for HBR encoding?
well i do that if my rips come under/over sized usually to get it to the target size , usually happens in xvid's ...
Ranguvar
13th June 2008, 17:47
well i do that if my rips come under/over sized usually to get it to the target size , usually happens in xvid's ...
Leave all quant restrictions to 2-31.
If you get undersized video, then either use a CQM that retains more detail, use more resolution, use higher quality audio, something... undersized video means that at your settings, that's the max bitrate it could use. Pumping up the size by allowing quants of 1 will do just that, pump up the size... quant 1 and 2 should be indestinguishable.
If you get oversized video, do the opposite of anything recommended above.
Another solution is to increase the Overflow Treatment values slightly... but this is not as efficient as doing what is described above.
Please read this thread thoroughly:http://forum.doom9.org/showthread.php?t=92046
ankurs
13th June 2008, 22:31
Leave all quant restrictions to 2-31.
If you get undersized video, then either use a CQM that retains more detail, use more resolution, use higher quality audio, something... undersized video means that at your settings, that's the max bitrate it could use. Pumping up the size by allowing quants of 1 will do just that, pump up the size... quant 1 and 2 should be indestinguishable.
If you get oversized video, do the opposite of anything recommended above.
Another solution is to increase the Overflow Treatment values slightly... but this is not as efficient as doing what is described above.
Please read this thread thoroughly:http://forum.doom9.org/showthread.php?t=92046
well i rarely use CQM's because of SAP compatibility issues .. MPEG :p
and i've already been through that thread , thanks for your advie though :D
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.