View Full Version : Jaggies using RemoveSpots
TruthOverFacts
13th May 2026, 16:25
Greetings,
I’ve been noticing these weird diagonal “jaggy” lines popping up occasionally after running RemoveSpotsMC3X(0). They seem to happen mostly in shots where there’s a drastic frame-to-frame change — fast motion, lighting shifts, or in this example, the shadows on the wall changing rapidly.
See attached frame example.
Maybe I'm wrong but I’ve been noticing it more often on the right side of the frame specifically, but maybe that's because I'm looking harder for it now? Which makes me wonder if it’s related to how the motion analysis/block math works mathematically?
Also, does resolution play a role in this? I hardly ever noticed these artifacts back when I was mostly working with 720x480 material, but lately I’ve been working with 2K film scans and the issue seems much more visible. I’m guessing maybe with the higher resolution the filter behaves differently when dealing with much finer grain/detail structures?
Has anyone else encountered this behavior? Any known tweaks/settings that help minimize it? Right now I’ve literally been fixing them frame-by-frame in Photoshop.
Thanks,
TOF
Arx1meD
13th May 2026, 17:28
Try cleaning the movie with another script, for example SpotRemover (https://forum.doom9.org/showthread.php?t=182407) or SpotLess (https://forum.doom9.org/showthread.php?t=181777) (сleans well, but removes parts of moving objects). And also try other filters from the Film_Damage_correction (http://avisynth.nl/index.php/External_filters#Film_Damage_correction) group.
TruthOverFacts
13th May 2026, 20:19
Thanks for the response. I'll check these out. I figured any kind of dirt removal will remove fast moving objects but I'm specifically talking about the jaggy lines. Is anyone even able to see the picture I attached?
For some reason it says "Attachments Pending Approval", is this normal? If so, how long does it take to get approved?
Thanks
Emulgator
14th May 2026, 13:19
Just report your attachment for approval using the exclamation mark button.
TruthOverFacts
18th May 2026, 09:32
Has anyone else encountered this issue as well? What are you experiences in using what I'm using vs. the other suggestions from Arx1meD? Thanks
Selur
18th May 2026, 19:55
out of curiosity: anyone to a link to the RemoveSpotsMC3X script?
Arx1meD
19th May 2026, 07:28
Try updating the filters that RemoveSpotsMC3X uses. Or you use the same filters but different versions. This may be causing this glitch.
lollo2
20th May 2026, 16:08
out of curiosity: anyone to a link to the RemoveSpotsMC3X script?
function RemoveSpotsMC3x(clip clip, int "limit", bool "_grey")
{
_grey = default(_grey, false)
limit = default(limit, 6)
i=MSuper(clip,pel=2)
bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
backw = MFlow(clip,i,bvec)
forw = MFlow(clip,i,fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveSpots().RemoveSpots().RemoveSpots()
clp=clp.SelectEvery(3,1)
return clp
}
Selur
20th May 2026, 17:18
That script looks wrong,... limit and _grey are not used,.. shouldn't they be a parameters of RemoveSpots?
Assuming RemoveSpots is still:
function RemoveSpots(clip clp, int "limit", bool "_grey")
{
_grey = Default(_grey, false)
limit = Default(limit, 16)
clmode = 17
clensed = Clense(clp, grey=_grey, cache=4)
sbegin = ForwardClense(clp, grey=_grey, cache=-1)
send = BackwardClense(clp, grey=_grey, cache=-1)
##### Uncomment ONE line below to use that filter to degrain #####
# alt = Repair(SCSelect(clp, sbegin, send, clensed, debug=true), clp, mode=limit, modeU = _grey ? -1 : limit).fluxsmoothst(5,5)
# alt = Repair(SCSelect(clp, sbegin, send, clensed, debug=true), clp, mode=limit, modeU = _grey ? -1 : limit).msmooth(threshold=5,strength=3,highq=true,chroma=false)
# alt = Repair(SCSelect(clp, sbegin, send, clensed, debug=true), clp, mode=limit, modeU = _grey ? -1 : limit).convertToYUY2().peachsmoother(100).convertToYV12()
restore = Repair(clensed, clp, mode=limit, modeU = _grey ? -1 : limit)
clp = RestoreMotionBlocks(clensed, restore, neighbour=clp, alternative=alt, gmthreshold=70, dist=1, \
dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return clp
}
right?
lollo2
21st May 2026, 11:39
Source of the code I posted: https://forum.videohelp.com/threads/357149-Can-someone-create-a-comet-removal-Avisynth-plugin-please/page3#post2266938
Selur
21st May 2026, 15:05
@TruthOverFacts: What do your scripts look like?
TruthOverFacts
25th May 2026, 09:53
AVISource("e:\2kfilmscan.avi")
ConvertToYV12
RemoveSpotsMC3X(0)
Stab()
Greyscale()
Selur
25th May 2026, 12:54
What do your RemoveSpotsMC3X, RemoveSpots and Stab scripts look like?
TruthOverFacts
26th May 2026, 10:55
Here's RemoveSpotsMC3X:
###Use like RemoveSpotsMC(Last,0)
function RemoveSpotsMC3X(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
i=MSuper(clip,pel=2)
bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
backw = MFlow(clip,i,bvec)
forw = MFlow(clip,i,fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveSpots().RemoveSpots.RemoveSpots
clp=clp.SelectEvery(3,1)
return clp
}
Here's Stab:
##############################################################################
#Original script by g-force converted into a stand alone script by McCauley #
#latest version from December 10, 2008 #
##############################################################################
#mirror - fill empty borders with mirrored from frame edge pixels (instead of black):
# 0 - no mirror (default);
# 1 - top;
# 2 - bottom;
# 4 - left;
# 8 - right;
# sum any of above - combination (15 - all ).
# From Depan
function Stab (clip clp, int "range", int "dxmax", int "dymax") {
range = default(range, 5)
dxmax = default(dxmax, 8)
dymax = default(dymax, 8)
temp = clp.TemporalSoften(7,255,255,25,2)
inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp)
mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxmax,dymax=dymax)
DePan(inter,data=mdata,offset=-1,Mirror=5)
SelectEvery(2,0) }
Selur
26th May 2026, 12:44
okay, your RemoveSpotsMC3X also doesn't use any of the parameters *gig*
What does your RemoveSpots script look like?
TruthOverFacts
26th May 2026, 13:08
What does your RemoveSpots script look like?
# ###################################################
#
# Added function RemoveSpots(), requires RemoveDirt()
#
# ###################################################
function RemoveSpots(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return corrected
}
###To Use: RemoveSpots()###
Selur
26th May 2026, 14:11
Did some tests and couldn't reproduce the problem here.
Might be an issue with your source or your source filter.
Can you reproduce this with a sample of the source that you can share with us here?
TruthOverFacts
29th May 2026, 08:49
Did some tests and couldn't reproduce the problem here.
Might be an issue with your source or your source filter.
Can you reproduce this with a sample of the source that you can share with us here?
In order to reproduce what I'm seeing, you'd need to run the RemoveSpotsMC3X on footage with a drastic frame-to-frame change—fast motion, rapid panning, sudden lighting shifts, etc.
Here's the original clip I was testing with:
https://www.mediafire.com/file/2aiem8qz5oknovr/JaggiesGalore.mov/file
Please let me know what results you get.
Selur
29th May 2026, 16:50
No, problem just using
RemoveSpotsMC3X, script: https://pastebin.com/gDP6QfiR
since you used:
ConvertToYV12
RemoveSpotsMC3X(0)
I tried that, but got:
ConvertToYV12: only 8 bit sources allowed
Hmm,.. I'm using 'Avisynth+ 3.7.3 (r4003, 3.7, x86_64)', what version are you using?
Then I:
used 'ConvertToYUV420()' instead of 'ConvertToYV12' (since the source file you shared was YUV422P10) => no problem either
added Stab() => no problem either
and GreyScale() => no problem either
Can't reproduce the problem here.
(Also ported the script to Vapoursynth and couldn't the problem reproduce there either, so it's not something inherent of the scripts used.)
=> Maybe try:
a. updating Avisynth+
b. updating your:RgTools, mvtools2, RemoveDirt, DePan, DePanEstimate dll files.
It might be a bug in the Avisynth version you are using or the dlls which got fixed a while ago.
Cu Selur
TruthOverFacts
30th May 2026, 09:39
The reason you got the "ConvertToYV12: only 8 bit sources allowed" is because the sample I gave you was a ProRes clip from my original file. The original file I used that script with was Grass Valley Lossless because I edited everything in Grass Valley Edius which is why I had the ConvertToYV12 in the script.
I'm using AviSynth 2.6.0.6 as a friend helped me set up AviSynth nearly 15 years ago, and I honestly haven't touched most of it since. Everything I currently use works well enough for my workflow, so I've been hesitant to start updating plugins, DLLs, or AviSynth itself out of fear of breaking something and then not knowing enough to get everything working again.
I'd love to bring things up to date but I don't even remember exactly how everything was originally configured. This issue has been here since I started using RemoveSpots. If you're unable to reproduce it, it does sound like it may have been fixed in an AviSynth or plugin update at some point. In your opinion, what do you think the most likely cause is, and how would you recommend I proceed from here?
Thanks for taking the time to test it and for the suggestions.
Selur
30th May 2026, 21:15
Since your setup is 15 years old, your pc probably is too, and you are probably running a 32bit version of AviSynth.
While trying to change as little as possible:
I would check where the dll (RgTools/Removegrain, mvtools2, RemoveDirt, DePan, DePanEstimate dll ) you are using are located.
Then I would backup, that folder to a separate location.
After that I would try updating those dlls with newer variants of those filters. (delete old dll replace it with new one)
That might already fix your problem.
If that doesn't help and if you have 64bit system, replacing Avisynth with its filters with a (64bit) Avisynth+ version and (64bit) filters might be a good idea, but you then would also have to replace the tools you use with a 64bit version. (just going from 32bit to 64bit usually gives a 10% speed boost)
Cu Selur
TruthOverFacts
4th June 2026, 13:33
Just wanted to post a quick follow-up and say that the jaggies issue has been resolved. Thanks Selur!
I did what you suggested and updated all of the DLLs you mentioned. It took me a while to sort through everything.
I'm not entirely sure which change ultimately fixed it, but I did end up keeping my old mvtools2.dll since the newer one didn't seem to agree with my setup.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.