View Full Version : Filters for standard improvement
Cafisho
26th June 2008, 18:24
I'm just a newbie trying to get the best image quality possible without messing around with many filters on DVD-RB. Anyone could advice me on which ones to use on almost every encode i make...? Right now the only filter i'm using is colormatrix with these settings:
C:LoadPlugin("c:\program files\AviSynth 2.5\plugins\colormatrix.dll")
C:P:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0)
C:I:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0,interlaced=true
I must enable "Force reencoding (for filters)" to make them work, right......?
Thanks!
steptoe
26th June 2008, 19:42
Thats a very difficult question to answer as it depends on your source and what is wrong with it and what you are trying to do
If its noise then you need a noise filter
If its a B&W film then its treated differently, especially if its very old so will have scratches, white spots, dust, and various age related problems and then you need to decide what you want to remove and what you want to keep
ANIME is a massive subject all on its own as there are vast differences between ANIME films, with soem very strange enconding using hard interlaced, interlaced, partial interlaced, blended, DVDs converted from NTSC or PAL to other sources, different frame rates converted (frequently badly from what I read)
There isn't really a one filter does it all as to get the best you need to look at your source and what you want to remove
I personally use what you are using for all my DVD purposes, but do have some things that need filtering but at the moment my system is too slow to be useful, even with a dual core AMD 6000+ as the functions I intend to use are incredible slooooow, and I mean 5-7 FPS on a good day so a full DVD is about 2 days continuous encoding but the results a very very good on some very small test runs to get them working with DVD-RB Pro
Force reencoding is used when the DVD will fit on a DVD, otherwise it would basically be copied without any encoding by DVD-RB or the encoder of your choice, so what you doing is forcing is to be encoded regardless if it needs it or not
Blue_MiSfit
26th June 2008, 20:28
There are some good general purpose filters that are safe to use in almost every case - at least with low strength settings.
fft3dfilter / fft3dgpu comes to mind right away. At low sigma (.5 to 1) it can provide effective denoising without killing detail. I use it just about every single time - if only on the chroma planes (plane=3)
Of course, that's a denoising filter. For other specific-case filters and specialty deinterlacers, you shouldn't really apply them to everything.
Something that's totally safe in every scenario is a simple removegrain(mode=1). It's lightning fast, gives you a small noise reduction, and is totally harmless IMO :)
~MiSfit
TheRyuu
26th June 2008, 20:41
fft3dfilter / fft3dgpu comes to mind right away. At low sigma (.5 to 1) it can provide effective denoising without killing detail. I use it just about every single time - if only on the chroma planes (plane=3)
Yes, and don't forget about using the other sigma values as well.
fft3dfilter(sigma=1.5,sigma2=0.2,sigma3=0.5,sigma4=1,plane=4,bt=5)
Blue_MiSfit
26th June 2008, 20:54
Oh sure, rolling off sigma is a good idea. I'm curious why you put the other sigmas rolling up though?
I guess I don't fully understand which frequency bands the different sigmas affect!
~MiSfit
TheRyuu
26th June 2008, 21:47
Oh sure, rolling off sigma is a good idea. I'm curious why you put the other sigmas rolling up though?
I guess I don't fully understand which frequency bands the different sigmas affect!
~MiSfit
It goes from highest to lowest I believe so you can afford to have higher ones on the highest frequencies and higher ones on the lowest frequencies because you won't notice them as much.
I have yet to find a good way of putting the sigma values so it does change based on your source.
Blue_MiSfit
26th June 2008, 22:35
Yeah, it definitely depends.
I tried your method, and definitely preferred it. Thanks :D
Learn something new every day...
~MiSfit
fibbingbear
27th June 2008, 01:23
There are some good general purpose filters that are safe to use in almost every case - at least with low strength settings.
Quoted for truth. For just about every rip, I do:
1.) Color correction (usually ColorMatrix, but sometimes I tweak the saturation/etc manually with the builtin functions of Avisynth).
2.) Deinterlacing / inverse telecining (assuming the source is interlaced or telecined, which it is for the stuff I encode). Telecide + Decimate, or Yadif, is what I use, although I really need to look into others.
3.) Denoising. I think this one is often overlooked. Unless your source was given to you in a completely uncompressed format and was computer generated, it will have noise in it. Even for clean sources, I like using a sigma of 0.5 to 1 with FFT3DFilter. At the bare minimum, use Undot.
4.) I typically add a sharpen at the end. It's strength depends on the amount of denoising done earlier, and the source. If it's anime, I'd recommend looking into mfToon (or is it vmToon now?).
Ranguvar
27th June 2008, 03:23
Quoted for truth. For just about every rip, I do:
...
3.) Denoising. I think this one is often overlooked. Unless your source was given to you in a completely uncompressed format and was computer generated, it will have noise in it. Even for clean sources, I like using a sigma of 0.5 to 1 with FFT3DFilter. At the bare minimum, use Undot.
...
A lot of the others I'd debate using for every source, as they can effect the "feel" of the video a lot, but especially denoising. Especially with film grain, it can add to the feel of the video, even though it's hard to encode (PsyRDO, VAQ, slightly lowered deblocking, etc. help a lot with x264). UnDot() especially - while it does a good job at removing slight mosquito noise in anime DVDs, has a very high tendency to kill dots (since that is its purpose), notably, stars, and light reflections in peoples' eyes.
Gavino
27th June 2008, 13:03
Unless your source was given to you in a completely uncompressed format and was computer generated, it will have noise in it.
That's interesting. Until now, I had been thinking of 'noise' as something originating in the analogue domain. Are you saying that noise reduction techniques can remove compression artefacts too?
If so, which filters are more (I almost said best :)) suited for this purpose?
fibbingbear
27th June 2008, 13:55
A lot of the others I'd debate using for every source, as they can effect the "feel" of the video a lot, but especially denoising. Especially with film grain, it can add to the feel of the video, even though it's hard to encode (PsyRDO, VAQ, slightly lowered deblocking, etc. help a lot with x264). UnDot() especially - while it does a good job at removing slight mosquito noise in anime DVDs, has a very high tendency to kill dots (since that is its purpose), notably, stars, and light reflections in peoples' eyes.
@Ranguvar: You make some very good points Ranguvar, but I must add, for the sources I typically deal with (either analog capture from TV or animated DVD), I pretty much always use these (and these typically have low complexity in them). You are right, though -- any of these will affect the quality. However, usually I can't tell the difference between the two, and it significantly helps compression, so I end up doing it.
@Gavino: Maybe I'm wrong, but yes, I think good denoising can remove/lessen some compression artifacts. But only some. Take a look at:
http://www.aquilinestudios.org/avsfilters/spatiotemp.html
Scroll down to the part about FFT3Dfilter. You can see it does a good job of removing some artifacts.
Blue_MiSfit
27th June 2008, 19:02
When I process MPEG-2 HD sources there's usually a fair amount of macroblocking that isn't always visible (except when you use Histogram(mode="luma"). Deblocking fixes most of it, but leaves behind some junk - which fft3dfilter is very good at cleaning up.
~MiSfit
Cafisho
27th June 2008, 20:36
Thanks for the info, it really helped me a lot.
I'm used to encode a lot of old DVD B&W movies that have grain/noise/dots (i don't fully understand the difference between them). For example i've taken this capture that seems to be grainy, what settings should i use, and most of all... which ones should i use with FFT3DFilter? (the one that catches my attention is 'plane').
http://img50.imageshack.us/img50/135/203845vobst3.png
Oh, and if mix it with colormatrix in another colour encode, this script should be ok in it's sintaxis/order? What does it means the "C:" at the beginning?
C:LoadPlugin("c:\Archivos de programa\AviSynth 2.5\plugins\colormatrix.dll")
C:P:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0)
C:I:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0,interlaced=true)
C:loadplugin("C:\Archivos de programa\AviSynth 2.5\plugins\FFT3DFilter.dll")
C:fft3dfilter(sigma=1.5,sigma2=0.2,sigma3=0.5,sigma4=1,plane=4,bt=5)
Blue_MiSfit
27th June 2008, 21:03
If a movie is black and white, the first thing you should do is add greyscale() right after the MPEG2Source, and throw away all the chroma. Then you can ditch colormatrix too :)
THat screenshot looks like pretty heavy noise to me. It will be difficult to remove without softening the image.... if you have time to kill, MVDegrain2 should to a fantastic job.
~MiSfit
Cafisho
28th June 2008, 01:31
First i'd like to try with fft3dfilter since it's a lot faster according to what i've read so far (but no as good :p)... this script it's ok? I'm not sure about the order... the loadplugin should be first?
MPEG2Source("C:\Documents and Settings\Administrador\Escritorio\D2V\VTS_01_1.d2v", cpu=0)
greyscale()
LoadPlugin("colormatrix.dll")
C:P:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0)
C:I:ColorMatrix(mode="Rec.601->Rec.709",clamp=false,threads=0,interlaced=true)
loadplugin("FFT3DFilter.dll")
fft3dfilter(sigma=1.5,sigma2=0.2,sigma3=0.5,sigma4=1,plane=4,bt=5)
Cafisho
28th June 2008, 23:18
I just finished encoding a sample with MVDegrain2 and the results are amazing... 100% difference, the only VERY BAD thing is the encoding time. It was a test vob of just 3 minutes and took to my dear barton mobile 2500 one hour and a half to encode, so i don't think i'll use it anymore... at least with the current script (i just copied and pasted a Boulder's one).
LoadPlugin("C:\Archivos de programa\AviSynth 2.5\plugins\DGDecode.dll")
MPEG2Source("C:\Documents and Settings\Administrador\Escritorio\D2V\VTS_01_1.d2v", cpu=0)
LoadPlugin("C:\Archivos de programa\AviSynth 2.5\plugins\mvtools.dll")
backward_vec2 = MVAnalyse(last, isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = MVAnalyse(last, isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = MVAnalyse(last, isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = MVAnalyse(last, isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
MVDegrain2(last, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
Besides adding greyscale() after mpeg2source, what should i tweak to make the filter work faster without sacrificing too much quality?
kandrey89
29th June 2008, 05:23
Would you mind posting your results of the tests you've done with the parameters you posted here, preferably of the same frame as already posted above?
thx
Cafisho
29th June 2008, 15:38
I've made a sample from another capture, take a look:
Original
http://img339.imageshack.us/img339/2241/2513originalqh4.th.png (http://img339.imageshack.us/my.php?image=2513originalqh4.png)
FFT3Dfilter
http://img403.imageshack.us/img403/2373/2513fft3dfilter66minutoyx0.th.png (http://img403.imageshack.us/my.php?image=2513fft3dfilter66minutoyx0.png)
MVDegrain2
http://img80.imageshack.us/img80/8017/2513mvdegrain2bo0.th.png (http://img80.imageshack.us/my.php?image=2513mvdegrain2bo0.png)
Clearly the MVDegrain2 one is the best, but is so hideously slow...
EDIT: By looking at the pictures i can see a 'washing' effect on the hair, most noticeable on the MVDegrain2 one... this is where a sharpener would help, right? Which one should i use for that B&W source?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.