View Full Version : Artifacts after applying some filters
cbpoak
2nd February 2007, 18:33
Hello,
After applying this script:
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
AVISource("szkola.avi")
InputClip=ConvertToYUY2()
DeintClip=SmoothDeinterlace(InputClip)
BlendClip=SmoothDeinterlace(InputClip, blend=true)
Overlay(DeintClip, BlendClip, Mode="blend", Opacity=0.35)
FixVHSOversharpL(30,12,8)
FixVHSOversharp(30,14,10)
Cnr2("xxx",4,5,255)
GuavaComb(Mode="PAL", Recall=75, MaxVariation=25, Activation=40)
Crop(8,0,-12,-16)
PeachSmoother(NoiseReduction=60, Stability=30, NoiseLevel=4.200, Baseline=2.800)
VagueDenoiser(threshold=4, method=1, nsteps=9, chromaT=0)
ColorYUV(cont_v=-24, opt="coring")
Levels(0, 0.96, 255, 0, 255)
BicubicResize(640, 480)
#MSharpen(strength=50)
ConvertToYV12()
InputClip=last
DegrainClip=InputClip.DegrainMedian
SeeSaw(InputClip, DegrainClip, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
FadeIO(16)
There are many places of different colour, such as in the frames below: http://smc2k.ifastnet.com/o1.jpg
or
http://smc2k.ifastnet.com/p1_2.jpg
The same frame doesn't always have the same artifacts so maybe that's a bug of AviSynth or some of its filters? For example, when I minimize VirtualDubMod window and restore it again, there are no artifacts on that particular frame. But going one frame back and forward, they are visible again.
Pookie
2nd February 2007, 18:45
That's a lot of filters! Maybe lowering the Slimit value in Seesaw will help, but the real issue is to reduce the number of plugins you are using.
cbpoak
2nd February 2007, 18:50
That's a lot of filters! Maybe lowering the Slimit value in Seesaw will help, but the real issue is to reduce the number of plugins you are using.
That's definitely not a issue with SeeSaw. The second image above (showing a boy) was treated with this script:
AVISource("input1.avi")
SmoothDeinterlace()
ConvertToYUY2()
Cnr2("xxx",4,5,255)
GuavaComb(Mode="PAL", Recall=75, MaxVariation=25, Activation=40)
PixieDust(5)
Crop(8, 0, -12, -16)
ConvertToYV12()
ColorYUV(cont_v=-24, opt="coring")
Levels(0, 0.96, 255, 0, 255)
BicubicResize(640, 480)
At the beginning, I thought it is caused by either Cnr2 or GuavaComb but after removing them, these artifacts sometiems remain and sometimes not!
Pookie
2nd February 2007, 18:58
OK, but what about removing one filter at a time until you find the one causing the problem ?
*.mp4 guy
2nd February 2007, 19:12
Those look like deinterlacing artifacts, try using Bob() instead of smoothdeinterlace() and see if that fixes the problem, if it does then smoothdeinterlace() is the culprit and you should use something else (not bob() though, it is only usefull for testing).
Chainmax
3rd February 2007, 03:20
First of all, welcome to the forums :). You're applying too much filtering:
* The deinterlacing method seems unnecessarily complicated. I suggest you to read Decomb's (http://www.neuron2.net/decomb/decombnew.html) readmes and tutorials, the IVTC tutorial (http://www.doom9.org/ivtc-tut.htm) and the capture guide (http://forum.doom9.org/showthread.php?t=78797) as they have a lot of information on determining what kind of video you're dealing with. For deinterlacing, I recommend you to use TDeint, and for IVTCing I recommend you to use TIVTC. There are more complicated methods, but they are mostly for weird scenarios.
* Your source has quite a bit of blocking, so I recommend you to use DeBlock_QED() because it's designed to remove blocking while preserving as much detail as possible.
* While FixVHSOverSharp is quite good, there is a function that's much better at halo/ghosting removal. That function is DeHalo_Alpha.
* For rainbow removal, since this is not a DVD source I recommend you to use FFT3DFilter on the chroma planes with a sigma of 6 or higher.
* For DotCrawl removal, DeDot is widely considered to be better than GuavaComb.
* For denoising, VagueDenoiser is pretty good, but I recommend you to use DeGrainMedian. It's a very good denoiser that also has the added benefit of removing slight dotcrawling and blocking. As an alternative, try FFT3DFilter on the luma planes.
* Bicubic Resizing is not a very good option, as there are sharper and better resizers out there. You should try Spline36Resize, it's very good.
* For sharpening, nothing can beat LimitedSharpenFaster with SMode=4.
Finally, SeeSaw is meant to be used on detailed sources like clean DVDs, HDTV streams, etc. On sources like the one you have, it will only enhance the artifacts and produce an ugly result. In these cases, I prefer to use AddGrain with a setting of (5,0,0) as it can mask remaining artifacts and give an illusion of detail.
I realize this is probably a little overwhelming, so if you have any questions (like where to find the filters and functions, a sample script using them, etc) don't hesitate to ask :).
*.mp4 guy
3rd February 2007, 19:03
Chainmax I would guess that the blocking isn't from the source, and that the screenshots are from an encode made from the script, I'm basing this on where the ringing artifacts manifest.
cbpoak
3rd February 2007, 22:01
Chainmax I would guess that the blocking isn't from the source, and that the screenshots are from an encode made from the script, I'm basing this on where the ringing artifacts manifest.
Yes, the source has no blocking, so I suppose Deblock_QED is not necessary.
I followed instructions above and that's my script:
AVISource("szkola.avi")
Trim(18,46460)++Trim(46462,48671)
ConvertToYV12()
DeDot()
TDeint()
Crop(8,0,-12,-16)
DeHalo_alpha()
FFT3DFilter(sigma=6, plane=3)
ColorYUV(cont_v=-24, opt="coring")
Levels(0, 0.96, 255, 0, 255)
Spline36Resize(640, 480)
DegrainMedian()
LimitedSharpenFaster(SMode=4)
AddGrain(5,0,0)
FadeIO(16)
Is the filter chain OK?
Now the video is much sharper than with my old script. Thanks Chainmax.
I also noticed artifacts on one frame, but now I discovered that they are caused by interlacing a doubled frame. I didn't know that there are any doubled frames (I captured at 25 fps from PAL VHS tape). How can I check if there are more such frames and remove them?
There are also some artifacts which are due to bad deinterlacing (but no doubled frames):
3 consecutive frames on which it is seen
http://smc2k.ifastnet.com/c1.jpg
http://smc2k.ifastnet.com/c2.jpg
http://smc2k.ifastnet.com/c3.jpg
How to get rid of this effect?
Chainmax
4th February 2007, 04:08
About the blocking misunderstanding: me = reading comprehension < 0 :o.
cbpoak, you're most certainly welcome :).
The script is now very nicely put together. There's only two things I'd change: the denoising should be put somewhere before the resize to maximize its efficiency (since it will have more information upon which to make its decisions), and the Levels line should probably go at the very end of the script as the final luma correction (remember that most of the filters you're using are altering luma). Other than than, congratulations for doing it on your own :) http://smilies.vidahost.com/otn/wink/thumb.gif.
As for the remaining issue you mention, I'll try to check it out later. A sample capture (10s or so) would help us a lot more than a screenshot in assessing it though. I'm shooting in the dark here, but maybe what you have is field-shifted progressive and therefore you'd only need fieldmatching (which can be done with TIVTC's TFM function) and not deinterlacing. Check the links I gave you in the first bullet point for more info.
cbpoak
5th February 2007, 00:28
I've slightly rearranged the script:
AVISource("szkola.avi")
Trim(18,46460)++Trim(46462,48671)
ConvertToYV12()
DeDot()
TFM()
Crop(8,0,-12,-16)
DeHalo_alpha()
FFT3DFilter(sigma=6, plane=3)
DegrainMedian()
Spline36Resize(720, 540)
LimitedSharpenFaster(SMode=4)
AddGrain(5,0,0)
ColorYUV(opt="coring", autogain=true)
FadeIO(16)
I hope that the order is right.
TFM solved all my problems with these strange artefacts. Also Levels was no longer necessary and autogain=true works well for me.
Now, the video looks very good. Pookie was right that there was too many filters but it's very hard for a beginner to know how and which filter to use in a specific case.
Thank you Chainmax for your help.
Boulder
5th February 2007, 09:09
You might want to try using HDRAGC instead of ColorYUV.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.