Log in

View Full Version : bad Xvid 1.02 encoding?!


trodas
29th December 2004, 20:22
I just wanted to reencode some KM videos (very small QT ones) to avi, so, I choosen Xvid :D I had a good past experience with it, but the new version seems react very alergicaly on just trivial almost unnoticable thing in black background, and turn it to something awfully visible and annoing.
Let's see for yourself. There is a very short part of the avi file, used for encoding. At first, I tought that 16MB of uncompressed avi is worth, but the loseless Huffyuv codec smash it to 2.3MB only, and the effect is still there, so, there you go:
http://ax2.old-cans.com/bad_xvid_encoding.avi

...try encode just this few frames. WIth default settings (b frames and stuff) it is horrible. So I tried tweak the settings to get better results. However some settings even give me a green areas of errors!!! :eek:

Basicaly I go for 2 pass encoding, 1 pass unrestricted, maximum quality. Disabling b-frames make things better a lot, however options like Global motion compenzation (and especialy with Quaeter pixel) and cause the green effects/defects... :(

So far, I was using HQ mpeg custom matrix ( http://ax2.old-cans.com/hvs-best-picture-by3.matrix ) witch should give me the best possible sharpness / quality, but even w/o it, the quirks are just bigger and bigger.

Is there something wrong with me, me settings, or the Xvid just alergicaly react on almost unnoticable background noise thing and turn it to something pretty visible/awfull...? :confused: :(


(used Xvid XviD-1.0.2-29082004 - VirtualDubMod 1.5.4.1 and default settings are more that enought to create something very ugly on the second fade-in text Arban)

trodas
29th December 2004, 20:38
http://ax2.old-cans.com/xvid_crash.gif

Holly sh...! :eek: ...if this continue, I quess I should look for the older, stable version... :rolleyes: :confused:

I just tried to run the second pass with custom matrice, sensitivity at 64 and max. 50 frames for the maximum I-frame interval :rolleyes:


PS: setting the I-frame interval to reasonable 50 frames fixed the green encoding errors anyway, when come to this... :rolleyes:

trodas
29th December 2004, 20:45
Ha, it worked, when I manually delete all the files (mainly the stats file :rolleyes: ) - PEBKAC error? :rolleyes:

And yep, with my settings Im now somewhat pleased with the results - after hell big number of tweaking :o


PS. for playing the Xvid I also use the Xvid decoder ;) (just to clarify, that the ugly green sh*t I manage to sometimes produce can't be decoder fault, but a encoder one :( )

PS2. should I expect that with every new build I have to spend hours to tweak it, before it produce acceptable results? :confused:
...this is not mentioned as flamewar, or something - Xvid autors doing wonderfull job, still is Xvid far better that wmv crap (mainly for the seeking - but the quality of custommatrics encoded Xvid rocks too) I just...

/me beginning to just worry about the future, that's all :)

ChronoCross
29th December 2004, 22:54
Remember that if your installing xvid after uninstalling or just installing over an old build you must hit "restore defaults" in the codec setup otherwise it may have random errors.

The green Thing you mentioned is something that was corrected a long time ago in the devapi-3 build. 1.0.2 should not be experiencing this. Additionally there are certain AVIsynth filters wich produce green artifacts along the borders. I haven't watched the clip you posted because the machine I'm currently working at is too weak.

Personally 50 max iframe interval is mcuh too small. the usual recommended length is (10 X framerate) for your I frame interval. Depending on the filesize your shooting for I frames are much bigger in comparrision to b and p frames so this might be causing a degradation in quality. Additionally I believe you should try encoding these with both the default quant matrixes h.263 and MPEG and not a custom matrix and compare the results. There is a slight possibility it could be your custom matrix's fault for the low quality.

Didée
30th December 2004, 02:07
That funny clip thingy encodes fine on my side.

That "HQ" matrix is crap, really big crap. Values < 8 may cause problems with some decoders, by chance even XviD's own one. Use standard H263 or mpeg.
Use qpel, eventually trellis. I wouldn't use AQ here (too small resolution for that). Bframe at defaults with low sensitivity (-5 to -10). Give it as much bitrate as it wants to have (read: fixed quant 2, maximally 3). Stamp sized clips get ugly very fast with strong compressions.

Could be a PEBKAC case indeed :-)