Log in

View Full Version : Getting bad comp tests with XviD


neo_sapien
19th August 2002, 12:09
Hi

First of all, I'm a n00b to XviD and likely have no idea what I'm doing, but I've been encoding with DivX 5, DivX 4 and SBC for a year now. I used XviD for a single rip right before DivX 5.0 was released because I was pissed off that DXN wanted to charge us, and if I recall correctly, I got good results. 2 weeks ago I wanted to test XviD again because I heard it had B-frame implementation, and encountered the same error as today with a DVD episode of ST:TNG.

My problem is compressibility. I created a 70 second test.d2v file to see what I could do with Seven Samurai using the new greyscale mode in XviD at 448x336 at 855kbps. Using DivX 5.02 I got a 60.1% compressibility test, while with XviD I got a 12.2% compressibility test. I scanned the XviD stats file in GKnot's stats file editor, and saw that if all frames were encoded at quant 2, the 70 second clip would be 62 megs. I encoded the test clip even though it was 12.2%, and the results looked as though I had tried to encode the clip at 1-pass quality, quant 14.

DivX 5.02 Settings: -b21 830 -pre 3 -psy 3 -key 240 -log "C:firstpass.log" -mv "C:firstpass.mv" -b -dr 12,2,148654,10,20 -sc 50 -pq 5

XviD 15:59:20, August 18 2002 version: (firstpass)
Global (http://mywebpages.comcast.net/darthviscera/xvid/1.gif)
Two Pass (http://mywebpages.comcast.net/darthviscera/xvid/2.gif)
Alt. Curve (http://mywebpages.comcast.net/darthviscera/xvid/3.gif)
(secondpass)
Global (http://mywebpages.comcast.net/darthviscera/xvid/1a.gif)
Quantization (http://mywebpages.comcast.net/darthviscera/xvid/2a.gif)
Two Pass (http://mywebpages.comcast.net/darthviscera/xvid/3a.gif)
Alt. Curve (http://mywebpages.comcast.net/darthviscera/xvid/4a.gif)

I was reading the Options Explained PDF file on Koepi's site while I was entering in the settings, and I read Doom9's XviD guide when I did my XviD TNG test 2 weeks ago.

I have no idea what I'm doing wrong, and I'd like to be able to make good rips with XviD. I'd appreciate any assistance that can be offered.

XP Pro SP1 v.1050
Athlon XP 1500+
512MB DDR
Geforce 3 Ti200
ffdshow

Marc FD
20th August 2002, 11:37
okay, you'r lucky i'm in a good day (i dislike to speak from divx)

1) don't tweak XviD at all. even very experienced encoders use defaults. read some thread about it and you'll see mods & experienced users are repeating this in a thread/week....
so clipping max I-frames quant to 2 and playing with alt-curve is a
"very BAD idea"[tm]
i would just advise you to use search precision 6.

2) You can't compare the price of a stollen car with the price of a brand new car.
what i mean is that DivX 5.02 is in fact designed for n00bs.
(like you, but i hope when after reading this post, you would feel to be a n00b anymore ;) )
psy settings, bframe quant and denoising are in fact some cheat who allows DivX to always keep medium good results even if you mess totally with the settings... it's like lens-flare in 3D games : it costs nothing and it seems very difficult to do :)
but DivX would almost never give you as much quality as XviD does.

3) XviD is _too_ precise !!
i mean if your source is noisy (and all DVDs are), XviD would encode the noise too (because it could be details)
it's why i think avisynth and XviD are intimely linked ;)
so even a very fast and lite .avs script with this filter-chain :
Cnr2().TemporalSoften(1,6,0) would reduce a _huge_ amount of noise, even if you don't see it with your eyes (using tools like See.dll can help you to see it )

4) DivX is outdatted :D
Actually XviD is far better than DivX 5.02 even with the B-frames/gmc/psy/denoise little toys. the ME is simply faster and more accurate !

if you use all these advises, you should be able to enjoy the "XviD-does-magic-on-my-encodes experience" :cool:

neo_sapien
20th August 2002, 17:26
Thank you, I'm up to 30% comp test now (w/out filtering) at 448x336 at 811kbps XviD. Unfortunately, the highest I can get the comp test is 41% (Tempsmoother(5) and Smart Smoother(3,30) I believe), and the image quality here gives off bad-looking grain from the denoising filters. The most powerful GKnot denoising package gave me a 36% comp test.

I've been enabling lumi masking in first pass for comp tests. Is it okay to do that now? The only other changes to default are greyscale enabled and motion search at 6.

Cnr2().TemporalSoften(1,6,0) only got me up to 31% comp test.

Is there a series of filters that can get me up to 60% comp test, or should I give in and lower to 320x240?

Marc FD
20th August 2002, 18:14
Originally posted by Marc FD
2) You can't compare the price of a stollen car with the price of a brand new car.
what i mean is that DivX 5.02 is in fact designed for n00bs.
(like you, but i hope when after reading this post, you would feel to be a n00b anymore ;) )
psy settings, bframe quant and denoising are in fact some cheat who allows DivX to always keep medium good results even if you mess totally with the settings... it's like lens-flare in 3D games : it costs nothing and it seems very difficult to do :)
but DivX would almost never give you as much quality as XviD does.


Apply this to your case : DivX is already going to wash out the first pass, it why you have 60% compressibilty.
you can't compare XviD compressibility with the one from DivX.
40% compressibility for a XviD encode could work.

the best way to compare them fast (if you want to be sure XviD is better ;) ) is to do constant quant encodes and to compare quality/filesize of the two codecs. then you can do full encode (when you think it worth it)

trbarry
20th August 2002, 18:36
3) XviD is _too_ precise !!

Isn't that just the effect of using the MPEG quant table? Maybe switching to the H263 quant like Divx uses would change that because of the higher implied filtering of high frequency components. (if I understand it at all correctly)

- Tom

Marc FD
20th August 2002, 21:09
@trbarry

it's not as simple as that.
in fact XviD don't "cheat" at all, whereas other coders use filtering to improve the result. that the main difference between XviD and DivX :devil:

but i prefer to use a very precise codec and to control filtering myself.

neo_sapien
20th August 2002, 22:54
But that's the real trick, isn't it? The filters.

Marc FD
21st August 2002, 00:44
good filters don't make a good codec.
the codec just _seems_ good, like RV9 and DivX 5.02

for filtering info and help, take a look on the avisynth forum.

MaTTeR
21st August 2002, 18:46
I have to agree with trbarry somewhat in my experience. It might not be the total solution but if you find the MPEG quants retaining too much of the original sources noise, then simply switch to H.263 or possibly even modulated quants. For me that's not an option, I want to retain as much detail as possible, otherwise I'd be using Divx5. heheh

For now MPEG quants with a nice filter chain something like Marc mentions above is the best in between solution for retaining detail but decreasing noise...in my opinion of course.

Marc FD
21st August 2002, 18:54
difference between h263 and MPEG _IS_ a matter of taste.
in fact, if you use some "film-effect" (divx5) or "post-proc noise" (ffdshow) it would be _VERY_ difficult to see any differences between h263 and MPEG. (of course when you play the file, not when you use VDub's frame by frame with 4x zoom)
so i think modulated are the best choice if you really _want_ to use MPEG quant.

of course to compare XviD vs DivX you should use h263 quant for both.

but i still think you simply can't compare them.