Log in

View Full Version : Undersized and oversized encoding


gurabli
31st January 2005, 19:05
I have a constant problem with undersized and oversized encodings with xvid.

Most of the times I get undersized files 2X700Mb results in 1100 MB and so.
My last encoding produced oversized file: 2X700 resulted 1600 MB.

I have read trough the forum, but find out that maybe Trellis is the fault and that I use quan. 2-31-2-31-2-31? But most people use it and I suppose they don't get missmatched sized files.

Settings:

Unrestricted profile
2-pass encoding
Quant. Type: H.236 or HVS Best Picture or Jawor's 1 and 2CD (depends on bitrate)
Quarte Pixel ON, GMC ON, Packed Bit. ON,
Max Bvops: 2, QR:1.50, QO:1.00

6-Ultra High, VHQ=4, B-frames VHQ ON, Chroma Motion ON

Zone Options: Begin with Keyframe ON, Chroma Opt. ON

Trellis ON, quan. 2-31-2-31-2-31


Is it because the Trellis ON that I get these results? Should I turn them of?
How to determine the best resolution that I get exact results?

Sharktooth
31st January 2005, 19:13
The undersizes are caused by quant 2-31 coz you didnt correct the overflow treatment values.
Btw, are you using xvid 1.1 beta1?

gurabli
31st January 2005, 19:17
Yes. Koepi's newest bulid, 1.1beta.

So I should change them back to 1 instead of 2? Or?
With 1 I will get oversized files, or?

Sharktooth
31st January 2005, 19:22
Well you could keep it 2-31 and correct the overflow treatment to 10 or 20 and see if it helps (in udersizes).
For what concerns the oversizes there's a proble with the xvid 1.1 beta1.
Some users experienced oversizes. Maybe you can find some more info in the xvid1.1 beta 1 thread.

gurabli
31st January 2005, 21:15
Thanx for your help!

correct the overflow treatment to 10 or 20

This means to set the second pass settings overflow treatmant:

Overflow control strenght: 10 ot 20 (which would be better?)

and what about the other two options?
max o impr. and max over. degrad.? Leave them at defaults, 5 and 5?

gurabli
1st February 2005, 09:40
I tried the same encoding.
Oveflow control strenght set to 10
max o impr. to 10 and max over. degrad. to 10.

So all 3 values set to 10. No I got a real undersized file, 949 MB insted 1400.
Maybe only the control strenght should be set to 10?

Koepi
1st February 2005, 10:10
Sharktooth, I fear that you mixed up something there:

change the overflow values to 10 or 20 percent if you have oversized files with quant range 1-31.

@all:
If the quant limit is 2-31, there will be no oversize, but sometimes undersized encodes.

So, rule-of-thumb:
a) you want the final size to be bigger than 1st pass:
- quant range 1-31. In case the resulting file is oversized, set overflow treatment values to 10-20%. You can do that as precaution - but the quantizer distribution will fluctuate more - so it's a matter of taste.
b) final size smaller than 1st pass:
Leave everything at default. In case of oversized files, set overflow treatment values to 10-20%.

@gurabli: Trellis has no influence on over- or undersized encodes.

IHTH
Koepi

gurabli
1st February 2005, 10:16
If I use quant limit 2-31 I always get undersized files.

What should I use to get the desired target size? Overflow is not a good option, isn't it? But than what?

Koepi
1st February 2005, 10:19
wtf? i clearly answered that already! (hint: answer a) suites your case.)

quant range 1-31, overflow treatment 20%.

yaz
1st February 2005, 10:21
what about 0/10/10. w/it i always got slightly undersized video but the difference is compensated by the overhead(s) on muxing (i usually mux 2 audios) so i got fitting avis in the end.

strength=0 means 'let xvid decide' (who can make it better ? :-))
m.o.i. - 'larger values will prevent undersized files...'
m.o.d. - 'larger values will prevent oversized files...'
but ... using too high values here may cause a kinda jerking, as the codec would compensate too harshly on some frames.

which matrix do produce that size differences ? (i guess jawor's 1cd 'beast', but who knows ... ) some cqm may also cause such discrepancies, but i've never had such problems with hvs matrices. try one of the standards (h263/mpeg), anyway.

the bests
y

gurabli
1st February 2005, 11:03
Koepi

Sorry for my bad understanding! I realy apriciate your help!!


set overflow treatment values to 10-20%. You can do that as precaution - but the quantizer distribution will fluctuate more

If my question is dumb, please excuse me! Setting to 20% is safe, am I right? I don't realy understand what that means, that will fluctuate more?

gurabli
1st February 2005, 11:05
Jazz

which matrix do produce that size differences ? (i guess jawor's 1cd 'beast', but who knows ... ) some cqm may also cause such discrepancies, but i've never had such problems with hvs matrices. try one of the standards (h263/mpeg), anyway.

The last encoding was done with HVS Best Picture. Is it a good choice for the best quality encoding? Is it safe to use it with 1 and 2 CD encodings?

yaz
1st February 2005, 11:42
Originally posted by gurabli
Jazz khmmm ... would it be me ? :-)))
Originally posted by gurabli
... HVS Best Picture. Is it a good choice for the best quality encoding? Is it safe to use it with 1 and 2 CD encodings? sure, it is. but (again) why not using one of the standard matrices? do u have any problems w/them ?
the bests
y

gurabli
1st February 2005, 12:00
yaz

Sorry, I am so messed up today. Really sorry! I didn't want to offfend you! I guess I will go out and play with my dog in the snow (with my ST. Bernard):) To cool my had a little...



Well no problem with standard matrices (but I don't like MPEG), but HVS give much better results.

Teegedeck
1st February 2005, 12:54
Try whether you still get undersized files when using the full anamorphic resolution (i.e. don't resize, only crop the black bars away completely till you reach a resolution that can be divided by 8 or preferably 16; use XviD's aspect ratio feature). This does more for the quality of your encoding than using a high-bitrate custom matrix, so I would try that first.

yaz
1st February 2005, 13:19
Originally posted by gurabli
Sorry, I am so messed up today. Really sorry! I didn't want to offfend you! heyhey, take it easy :-) u can call me whatever u want ... but maybe i just wont listen up.
Originally posted by gurabli
I guess I will go out and play with my dog in the snow (with my ST. Bernard):) To cool my had a little... u'd be hurry! looking out my window i see heavy thawing :-)) (a hónak, úgy tûnik, annyi :-))
Originally posted by gurabli
Well no problem with standard matrices (but I don't like MPEG), but HVS give much better results. i see. than try increasing the resolution, just as teegy suggested. or try one of the high bitrate matrices of sharktooth. they are hvs tuned so u'd expect the same as w/hvs best.

the bests
y

Sharktooth
1st February 2005, 13:57
@koepi: sorry, these days i'm just too stressed. i mixed up the answares for both questions into one...

Koepi
1st February 2005, 14:27
Sharktooth: I know that situation myself, believe me :)

Cheers
Koepi