Log in

View Full Version : My Views: Balance of High Compression and Good Quality : Xvid Settings & CQM Choice


Video Master
3rd August 2008, 18:01
Firstly thanks to Teegedeck for all his Xvid Preset Guides.

SharkTooth , Jawor , Didee , Xvid Builders fore there codec and CQMs

Read a lot of ur posts and experimented a lot of settings.

My Aim : Was to to get a balance between High Compression and Good Quality.

Wanted to share my results with you.

These are the settings that i use for High Compression and Good Quality re-encode
but still there is some loss , its not same as the source.

Can u suggest me some changes.

Softwares i use.

1. Xvid 1.1.2 [xvidcore.dll] Koepis Vanilla CVS Build , Nov 1 2006

2. AVI Synth to create .avs files which can be input to VirtualDub.
[AVI Synth is used for DirectShowSource() & for resizing or trim() on the source]

3. I load the video.avs file in Virtual Dub and do 2Pass Xvid Encoding with CQM.

These are my final settings and views on other CQMs

Xvid 1st Pass
--------------
Profile : AS @ 5
Quantization Type : EQM v3LR [Custom Quantization Matrix]
Adaptive Quantization : Selected
B-Vops : Selected
|-Max Consecutive : 2
|-Quantization Ration : 1.62
|-Quantizer Offset : 1.00
QPEL,GMC,Packed BitStream : Not Selected
Pixel Aspect Ratio : Square

StatFile:\video.pass

Zone Options
Start Frame# : 0
Rate Control
|-Quantizer : 4.00

Static
|-Chroma Optimizer Enabled : Selected
|-BVOP Sensitivity : 0
|-Cartoon Mode : Selected only for Animes and Cartoons not for movies
Begin With Keyframe , Greyscale encoding : Not Selected

Motion
Motion Search Precision : 6-Ultra High
VHQ Mode : 4-Wide Search
Use VHQ For bframes too : Selected
Use Chroma Motion : Selected
Turbo : Not Selected
Frame Drop Ration : 0
Max I-Frame Interval : 10 x Source FPS , 300 mostly

Quantization
Min I/P/B frame quantizer: 3
Max I/P/B frame quantizer: 5
Trellis qunatization : Not Selected

Xvid 2nd Pass
--------------
Profile : AS @ 5
Quantization Type : EQM v3LR [Custom Quantization Matrix]
Adaptive Quantization : Selected
B-Vops : Selected
|-Max Consecutive : 2
|-Quantization Ration : 1.62
|-Quantizer Offset : 1.00
QPEL,GMC,Packed BitStream : Not Selected
Pixel Aspect Ratio : Square

2nd Pass
StatFile:\video.pass
Intra Frame Tuning : 10,1, 20
Overflow Treatment : 5,5,5
Curve Compression
|-High Bitrate Scene Degradation%: 20
|-Low Bitrate Scene Improvement%: 7

Target Bitrate : 800Kbps

Zone Options
Start Frame# : 0
Rate Control
|-Weight : 1.00

Static
|-Chroma Optimizer Enabled : Selected
|-BVOP Sensitivity : 0
|-Cartoon Mode : Selected only for Animes and Cartoons not for movies
Begin With Keyframe , Greyscale encoding : Not Selected

Quality Preset
Motion
Motion Search Precision : 6-Ultra High
VHQ Mode : 4-Wide Search
Use VHQ For bframes too : Selected
Use Chroma Motion : Selected
Turbo : Not Selected
Frame Drop Ration : 0
Max I-Frame Interval : 10 x Source FPS , 300 mostly

Quantization
Min I/P/B frame quantizer: 3
Max I/P/B frame quantizer: 5
Trellis qunatization : Not Selected


---------------------------------------------
QPEL : Off gave better results.

From my Trial and Error , this is what i feel.

Anime : H.263 CQM with Quantizer: 2 @ 1st pass and Cartoon mode enabled ,
Rest all settings same as above.

Dark Scene Videos : Jawors 1CD CQM
Curve Compression
|-High Bitrate Scene Degradation%: 30
|-Low Bitrate Scene Improvement%: 15
Rest all settings same as above.

Little Sharp + Soft Mix Videos : Sharktooth EQM v3 LR - CQM
Rest all settings same as above.

Soft Video Output: H.263 CQM produces good output but slight higher size than others
also the video output is soft the sharpness is a bit lost.

Six Of Nine not the HVS one: produced good quality but the file sizes were high
so didnt expreriment much with it.

HVS Better,Best,Good CQMs : didnt try it much

High Compression To Low Compression
Jawor 1CD & EQM v3 ULR rev 3 » EQM v3LR » H.263 » SixOfNine

Doubt

1.> What resize filters are best Bicubic , Lancoz , Lancoz 4
[High Resol To Low Resol]

2.> Has anyone tried using TmpegEnc 4.0 Express instead of Virtual Dub for main encoding , Tmpeg has loads of Video + Audio filters which can be applied and checked directly without waiting for video to be encoded.

3.> I haven't experimented much with HVS Good , Better , Best Matrices can they meet my aim.

If there are any views and opinions which can help me meet my aim please share it here.

If i have gone wrong anywhere do help me correct it.

Ranguvar
3rd August 2008, 19:31
Are those results with VAQ?

AviSynth is a much better choice than TMPGEnc, the VAQ patch tends to hurt CQMs and does better than them by itself usually, Spline36 is better than any Lanczos IMO (almost identical sharpness with less ringing) but Bicbubic I usually use when encoding because the slightly less sharpness helps out the encoder.

Also, Chroma Optimizer is broken. Don't use it.

Sharktooth
3rd August 2008, 19:59
CQMs and VAQ can produce bad results.
Dont use them together. I prefer VAQ though.
oh, FYI. h263 is not a CQM or even a standard matrix...

Video Master
4th August 2008, 04:24
Are those results with VAQ?

AviSynth is a much better choice than TMPGEnc, the VAQ patch tends to hurt CQMs and does better than them by itself usually, Spline36 is better than any Lanczos IMO (almost identical sharpness with less ringing) but Bicbubic I usually use when encoding because the slightly less sharpness helps out the encoder.

Also, Chroma Optimizer is broken. Don't use it.

Those results are with Adaptive Quantization.
How to use Spline36 , can we use it in AVI Synth any specific version of Avi Synth.
I too prefer Bicubic mostly.
Will disable Chroma Optimizer.
What about Chroma Motion in Motion Precision settings , should i keep it On or OFF.

----------------------------------------------------------------------------
CQMs and VAQ can produce bad results.
Dont use them together. I prefer VAQ though.
oh, FYI. h263 is not a CQM or even a standard matrix...

VAQ = Adaptive Quantization [hope thats correct]

I never knew that that clubbed together cud produce bad results,
AQ enabled did give me good results since i hoped it wud add to the compression.

Also you said "I prefer VAQ though." , So u dont use CQMs.
VAQ really didnt look that bad.
----------------------------------------------------------------------------

1.> Also shud QPEL be enabled or shud i leave it disabled.

2.> Will try with AQ , Chroma Optimizer : disabled on my current codec

3.> Should i download any newer version of Xvid codec or my current
[Xvid 1.1.2 [xvidcore.dll] Koepis Vanilla CVS Build ] will be good.

4.> Will also try Dark Shikari's patched "Xvidcore.dll"

fbgd
4th August 2008, 06:09
You have to use a build patched with Dark Shikari's VAQ patch to make use of VAQ. It doesn't sound like the build you have been using has been patched with it.

Video Master
4th August 2008, 06:27
No the build i have been using was not patched with DS VAQ Xvidcore.dll
I came to know later about it , but my views are of the unpatched version.

I now did some more tests on the original unpatched Xvid.

With AQ and Chroma Optimizer disabled ,
the compression was the same and quality looked slight better on my above settings.

Will try the settings on more video files.

Sharktooth
5th August 2008, 02:06
try also a VAQ build.
VAQ is doing some nice work (ensure to try it with h263) or a balanced matrix (that means it will produce more or less the same filesize of h263 at the same quantizers).
In the VAQ builds, VAQ replaces the xvid AQ... so enabling AQ will enable VAQ.

Video Master
5th August 2008, 03:50
I downloaded following files from here : http://www.koepi.info/

Normal 1.1.3 : http://www.koepi.info/Xvid-1.1.3-27042008.exe
VAQ 1.1.3 : http://www.koepi.info/Xvid-1.1.3-VAQ-27042008.exe
VAQ 1.2.127 : http://www.koepi.info/XviD-1.2.-127-VAQ.exe

Are these VAQ builds just having the Dark Shikari patched .dll or there is
something more in it , as i have downloaded the .dll but not yet replaced it
in the system32 folder , will replacing the .dll be sufficient.

Also can i use VAQ with other CQMs like EQMv3 Series , Jawor , SoulHunter v6 for testing
Or is VAQ recommended to be switched off for CQMs.

Will try VAQ only with H.263.

Also i am keeping QPEL , GMC , Trellis , Chroma Optimizer disabled now.

Also wanted to know should Fast Recompress or Full Processing Mode be used in VDub.

@SharkTooth : can u elaborate more on "balance matrix"

Edit :
Installed Xvid 1.1.3 VAQ Build
Reverted back to my old Xvid 1.1.2 [xvidcore.dll] Koepis Vanilla CVS Build , Nov 1 2006
Not statisfied with the results with 1.1.3 normal and vaq builds.

henryho_hk
5th August 2008, 17:22
Trellis should be enabled.

And it's better to use "Fast Recompress" in VDub.

henryho_hk
7th August 2008, 11:07
Video Master, what problems have you found with the 1.1.3 builds?

Video Master
7th August 2008, 13:55
There were Blocks after video encoding , also the normal files which i had and were working fine
showed some blocks while playback.

Reverting back to my old codec , everything was back to normal.
I also test my xvid encodes on my DVD Player , they work fine there too.

So sticking with my old version.

Sharktooth
7th August 2008, 15:46
that's maybe a problem with the decoder...
use ffdshow to override the xvid decoder.
as i said a balanced matrix for MPEG-4 ASP is a matrix that will produce more or less the same filesize as h.263 quantization at the same quantizer.

Video Master
7th August 2008, 16:50
that's maybe a problem with the decoder...
use ffdshow to override the xvid decoder.
as i said a balanced matrix for MPEG-4 ASP is a matrix that will produce more or less the same filesize as h.263 quantization at the same quantizer.

If i use ffdshow to override then xvid codec will be of no use for video playback.

How can i use the balanced matrix , i am still unclear. :(
I know about H.263 , MPEG , and CQMs created by various users like jawor , sharktooth , soulhunter , 6of9

but never seen sth called balanced CQM. :(

Confused :(

Ranguvar
7th August 2008, 19:34
A balanced matrix, not the balanced matrix. A matrix can be balanced or not. I'm not aware of any that are.

And why is it a problem if ffdshow decodes the video? You don't need Xvid for playback if ffdshow is in action.

Video Master
8th August 2008, 03:14
I was fine with ffdshow decoding , but the encoding with 1.1.3 still produced the blocks in video , this didnt happen with 1.1.2 for me
donno how this happens.

Also recently i realized that "Offset" should be set to "0" , so that b-frames cud be quantized at lower value producing better results.

Earlier settings
B-Vops : Selected
|-Max Consecutive : 2
|-Quantization Ration : 1.62
|-Quantizer Offset : 1.00

I somehow missed this setting in Xvid Presets thread by Teegedeck.
This one value @ 0 produces totally different results.

Now
B-Vops : Selected
|-Max Consecutive : 2
|-Quantization Ration : 1.62
|-Quantizer Offset : 0

Sharktooth
8th August 2008, 16:50
what of the 2 1.1.3 builds produced blocks? the VAQ one or the other?
i actually use xvid 1.2 with VAQ though... no blocking problems here.

Video Master
8th August 2008, 17:15
I used the one with 1.1.3 VAQ only , since i wanted to try VAQ with H.263 in encoding.
Donno what exactly went wrong ,

Sharktooth
14th August 2008, 16:12
and was adaptive quant. option enabled of disabled?

Adub
14th August 2008, 23:59
I believe that it is disabled by default, so if you didn't enable on purpose, it is probably not being used.

Video Master
17th August 2008, 05:19
Sorry for the late reply but facing some problems with my ISP.

VAQ enabled and disabled both game me problems.

Also after using all the CQMs still feel H.263 produces the best results but size is a bit on the high side
and the final file might be a bit soft too but looks good.

For Dark Source : Jawor 1CD and EQM v3ULR.
EQM v3 LR comes close to H.263.

My Views.

kypec
17th August 2008, 11:55
@Video Master: What frame resolutions are you trying to encode? I just saw you aim for 800kbps bitrate but no resolution specified anywhere...

Video Master
17th August 2008, 12:23
624x352 - this is the normal resolution for all my final video output.