Log in

View Full Version : Target Quality, Quantizers, FileSize question


weaver4
30th June 2006, 14:15
There is a statement in the AutoGK documentation that says: "Good quality percentages begin at about 67% (Quantizer 3)." But when I set the target percentage to 67% the filesizes are much larger than using other tools with a quantizer of 3. Also when you look at the bitrate or bit/pixel it shows that these are also much larger than other tools. Is 67% really the right number to use if you want to have a quantizer of 3? If so why are the files so much larger than using a quantizer of 3 in other tools?

Here are my results using avicodec and gspot:

agk xvid 67%
File : 1.06 GB (1.06 GB), duration: 1:36:19, type: AVI, 1 audio stream(s), quality: 67 %
Video : 981 MB, 1425 Kbps, 23.976 fps, 640*288 (2.21:1), XVID = XVID Mpeg-4, Supported
Bitrate: 1421
bits/pixel: 0.321

Avi.net quantizer 3
File : 910 MB (910 MB), duration: 1:36:19, type: AVI, 1 audio stream(s), quality: 55 %
Video : 821 MB, 1193 Kbps, 23.976 fps, 640*288 (2.21:1), XVID = XVID Mpeg-4, Supported
Bitrate: 1190
bits/pixel: 0.269

StaxRip quantizer 3
File : 851 MB (851 MB), duration: 1:36:19, type: AVI, 1 audio stream(s), quality: 60 %
Video : 741 MB, 1076 Kbps, 23.976 fps, 640*272 (2.21:1), XVID = XVID Mpeg-4, Supported
Bitrate: 1070
bits/pixel: 0.256

Dr Divx 2 Divx quantizer 4
File : 938 MB (938 MB), duration: 1:36:20, type: AVI, 1 audio stream(s), quality: 58 %
Video : 828 MB, 0 Kbps, 0.0 fps, 640*480 (4:3), DXSB = DivXNetworks Divx Fusion v6, Supported
Bitrate: 1196
bits/pixel: 0.233

nixo
30th June 2006, 21:21
AutoGK uses the EQM V2 custom matrix in quality mode... that probably accounts for most of the difference. Also only 1 consecutive BVOP is used. I'm afraid I don't know the other tools you mention but the default setting in XviD is 2 consecutive BVOPs.
There's no way to get around the BVOP setting in AutoGK. However, if you choose the .ess option, h.263 quantization will be used and your results should be closer together.
67% in Autogk is actually quant 2.99 but that shouldn't make much difference.

--
Nikolaj

manono
2nd July 2006, 13:06
Thank you, nixo.

At the time I wrote that for the tutorial, the default "sharp" matrix was HVS Better (or was it HVS Best?). Later on len0x switched to Sharktooth's matrix, a slightly better and less compressible one. Therefore, now quant 3 or 67% produces a larger file size (and better quality) than do the other apps when encoding for XviD. DivX 6 you can toss out, as it figures the quants differently, as I understand it. The differences between AVI.Net and StaxRip can most likely be explained by the differences in the matrix they use (H.263 or MPEG), and the default settings (2 B-Frames?). That's just a guess, though, as I have used neither.

Also, with B-Frames, these percentage/quant correlations no longer hold as well as they once did. In the old NanDub days before B-Frames, 100%=Quant 2, 67%=Quant 3, 50%=Quant 4, etc. Those rules are no longer so ironclad. I wrote that as more of a guideline than anything else. But I'm glad you've read it, weaver4. len0x and I put a lot of time and effort into that, once upon a time.

weaver4
13th July 2006, 13:31
I did try the .ess option, and you are right, the filesizes did get much smaller with the same target percentage. So I guess my next question would be:

For a particular movie is the quality better using a Target Percentage of 65% and use Sharktooth's Matrix or setting the Target Percentage of 75% and using the H.263 matrix? Both would have "roughly" the same filesize, and I don't care about the actual quality number, I only care about quality vs filesize.

I am surprised that this topic has not come up before. At least I could not find it.

BigDid
13th July 2006, 21:50
... For a particular movie is the quality better using a Target Percentage of 65% and use Sharktooth's Matrix or setting the Target Percentage of 75% and using the H.263 matrix? ... I only care about quality vs filesize.
Hmmm, Eqm V2 is a little less compressible than H263 so you may have to adjust your percentage to match filesize (see below).
Concerning quality, maybe you can elaborate cause "usually" quality can mean more details or more sharpness or less artifacts, or all of these...
All I can share ATM is my experience with these 4 CQM.
- *V3ULR (AGK low bitrate special ".newsoftmatrix") is really sharp, can have artifacts (ringing) if not enough bitrate, better compressibility of all4 (and many others)
- Jawor 1cd is smooth, has little to no artifacts if enough bitrate, is more compressible than H263 but a little less than V3ULR (5%) has some ringing with anim (less than v3Ulr but more than H263)
- H 263 is smooth, has little to no artifacts if enough bitrate, excellent for anim, is a little more compressible than EqmV2 but less than Jawor 1cd
- EQM V2 (AGK Sharp matrix) is sharper, but less sharp than V3ULR, less compressible than H263, has little to no artifacts if enough bitrate and really keeps a lot of details
So I use Sharpmatrix for best quality/bitrate encodes in AGK, *V3ULR for medium bitrate encodes (min is 608 wide for 16/9, see below), H263 for animes or lower bitrate encodes and Jawor 1cd for really low bitrate (rarely). :cool:

I am surprised that this topic has not come up before. At least I could not find it.
Well H263 vs EQM V3ULR or EQM V2(AGK sharpmatrix) has been discussed in the xvid section here:
http://forum.doom9.org/showthread.php?p=797098#post797098 and following posts;
also here: http://forum.doom9.org/showthread.php?p=799006#post799006

*Edit:have forgotten about Jawor 1cd Cqm cause I use Eqm v3Ulr from Sharktooth, see post below to install it :)

Did

nixo
13th July 2006, 22:31
I don't think AutoGK uses eqm_v3ulr (anymore?). Just did a test and it looks like Jawor's to me.

BigDid
14th July 2006, 00:42
I don't think AutoGK uses eqm_v3ulr (anymore?). Just did a test and it looks like Jawor's to me.
:scared: Absolutely right, my bad, I'm with jggimi :D

I will edit the above post accordingly.

How to use the Eqm v3ulr instead of Jawor 1cd matrix in AGK:
- make an empty file named: ".newsoftmatrix"
- move/copy that file in the AGK program folder to use it permanently
- move/copy/duplicate that file in the Actual AGK encoding folder to use it once

-Trick- how to create that kind of file: use note pad, save as ".newsoftmatrix" (not text but all files) with or without quotes will do it :)

Did