View Full Version : Xvid noise
Chromanin
11th March 2006, 12:17
Heya,
I've been having some trouble with Xvid. Don't shoot me here, I'm still trying to understand everything. Basically, I'm getting noise around the edges, is this because of a setting in the Xvid codec? The compressibility check returned a value of 1.41 and I put the bitrate on the same as well to maintain quality, however each time it just screws up and I have no idea why.
In any case, to tell you guys what exactly I've been doing. I have a high quality source, as in, a 1024x738 AVI encoded in WMV9. I made a huffy encode and another one with the...
lanczos4resize(704,396)
convertToYV12()
Tweak(sat=1.33)
ColorYUV(gain_u=4)
deen("a2d",2,3,3)
FluxsmoothT()
Fastlinedarken()
LimitedSharpen()
filters.
In any case, after that I had a perfectly fine looking encode imo. Yet the conversion to Xvid just seemed to add random noise around the edges.
I set my bitrate at 743, equal to the value the compressibility check returned.
DarkZell666
11th March 2006, 15:10
743kbps could be pretty low, especially looking at the resolution.
Did you use 2-pass or 1-pass ? 2-pass is much prefered, since this 743 is an average bitrate (some portions of the movie could be 500kbps, others 1000kbps)
This noise around the edges is called ringing, and might be solved by using a Custom Quantiser Matrix (CQM) (or not using one at all if ever you did), or simply raising the bitrate.
I'm not keen on using compressiblity tests, though I'll have to investigate that a bit more one of these days =)
Zero1
11th March 2006, 18:31
Make it Mod16 if possible, it might help out.
Also it could be all the sharpening/darkening you are doing. Lanczos already sharpens, so leave out the limited sharpen and try it again and see if that's better.
Chromanin
11th March 2006, 19:47
I basically thought that noise increased the size of a file, hence the use of denoisers. So it seems senseless to me that a compressor would actually add noise. Can someone tell me exactly why this happens? Not that I don't believe you really.
EDIT: I did a 2 pass DarkZell666, I'll try increasing the bitrate to about 850 for my next try.
ChronoCross
11th March 2006, 20:11
I basically thought that noise increased the size of a file, hence the use of denoisers. So it seems senseless to me that a compressor would actually add noise. Can someone tell me exactly why this happens? Not that I don't believe you really.
EDIT: I did a 2 pass DarkZell666, I'll try increasing the bitrate to about 850 for my next try.
But since your using alot of sharpening this will negate any compression gains made by removing noise.
You can resize using limitedsharpen and remove the lanczos completely or the other way around depending on what you really want to do.
Addiitonally compressability check doesn't work IMHO. It only test what 20% of the source? you should go by gut instinct as to what you think is a reasonable bitrate.
I'm guessing this is anime simply since you used fastlinedarken.
plus it looks to me as though you are mangling the source file with all that filtering. Try using something a little less obtrusive than 2 smoothing filters, 2 sharpeners, 2 color changers.
imcold
11th March 2006, 21:03
So it seems senseless to me that a compressor would actually add noise.
it's not adding noise... it's ringing, as DarkZell666 said - artefact, that appears in high-contrast areas (which require higher bitrate than smooth areas) if your bitrate is too low -> higher quantizers -> less precision - more 'errors' in encoded image.
foxyshadis
11th March 2006, 21:12
Replace deen, fastlinedarken, and limitedsharpen with vmToon, from masktools2 package. It does better than all three, but only for cartoons and anime.
Xvid noise, ringing, is not added to the source so much as artifacts of taking too much away. The explanation has to do with DCTs and quantizers, but it's the exact same effect of overcompressing a sharp pic in jpeg. You can cut down the sharpening, use sharktooth's ULR matrix, or raise the bitrate.
sysKin
12th March 2006, 08:51
So it seems senseless to me that a compressor would actually add noise.Well all artifacts are noise. This is why we have this simplistic measure of of quality known as (peak) signal-to-noise ratio, which measures the energy of noise (artifacts).
Can someone tell me exactly why this happens?
Ringing? For every system that distorts high frequencies (either amplitude or phase), you get ringing near sharp edges and pulses. See the "electrical" explaination here: http://en.wikipedia.org/wiki/Ringing and also read this http://en.wikipedia.org/wiki/Gibbs_phenomenon if you're interested. Video codecs work in frequency domain and distort high frequencies by quantization, so they are affected.
Soulhunter
12th March 2006, 13:53
About noise (http://forum.doom9.org/showthread.php?p=647294#post647294) and ringing... (http://forum.doom9.org/showthread.php?t=99795) ^^
Bye
fight2win
12th March 2006, 16:52
has anyone noticed, the xvid decoder that comes with koepi's build, offers better sharpness and quality than libavcodec (ffdshow),even with postprocessing turned off!
Soulhunter
12th March 2006, 17:21
has anyone noticed, the xvid decoder that comes with koepi's build, offers better sharpness and quality than libavcodec (ffdshow),even with postprocessing turned off!
Post screenshots to proof... ^^
Bye
shon3i
12th March 2006, 19:26
has anyone noticed, the xvid decoder that comes with koepi's build, offers better sharpness and quality than libavcodec (ffdshow),even with postprocessing turned off!
I can confirm that but not with screenshots beacouse differents is little especialy when picture is zoomed.
Soulhunter
12th March 2006, 19:33
Erm, if you use the same output-colorspace, renderer, iDCT and no post-processing, they should look exactly the same afaik! And, if there is a difference you would see it on a screenshot (capturing the output-frames)
Bye
shon3i
12th March 2006, 19:53
Erm, if you use the same output-colorspace, renderer, iDCT and no post-processing, they should look exactly the same afaik! And, if there is a difference you would see it on a screenshot (capturing the output-frames)
Bye
I dont know what xvid.ax use as render and iDTC but i use default ffdshow options for this.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.