Avisynth SpotLess
SpotLess removes spots and dirt (film dust, dropouts, short damage) with a motion-compensated temporal median. It is a script by StainlessS and needs MVTools2.
Filtering → Avisynth → Artifacts

What it does
SpotLess motion-compensates the neighbouring frames and takes the median per pixel over 2 × RadiusT + 1 frames. A spot that is present on up to RadiusT consecutive frames is replaced with content from the neighbours.
Typical uses:
- Remove dust and dropouts from live-action film. It is not meant for cartoons or anime.
- A larger radius removes longer spots but can blur. A value above 2 is usually overkill.
- RadiusT must be smaller than the number of frames.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| RadiusT | RadT | 1–100 | 1 | Temporal radius. The median covers 2 × RadT + 1 frames. |
| ThSAD | ThSAD | 1–16320 | 10000 | SAD threshold for 8×8 blocks at distance 1. Blocks above it use the source block. 10000 is practically off. |
| ThSAD2 | ThSAD2 | 0–16320 | 10000 | Threshold for the furthest frame at RadT; the values in between are interpolated. Unchecked, the script uses ThSAD. The value is only active when the box is checked. |
| Pel | pel | 1, 2, 4 | 2 | Motion search accuracy. |
| Chroma | chroma | on/off | on | Uses chroma in the block matching. Turn off for black-and-white material or colour noise. |
| BlockSize | BlkSz | 4, 8, 16 | 8 | Block size of the motion search. Larger is faster and can be better for HD. |
| Overlap | Olap | 2, 4, 8 | off (half of BlockSize) | Block overlap, at most half of BlockSize: 2 for BlockSize 4, 2 or 4 for 8, 2, 4 or 8 for 16. Unchecked, half of BlockSize is used. When checked, the value starts at BlockSize ÷ 2 and follows it when BlockSize changes. |
| TrueMotion | tm | on/off | on | Motion search that favours smooth motion fields. |
| GlobalMV | glob | on/off | on | Uses a global motion estimate. Independent of TrueMotion. |
| Blur | bBlur | 0–1 (step 0.01) | 0 | Motion search on a blurred clip. 0 is off, about 0.6 is suggested. |
Example
Default settings on a 10-bit YUV 4:2:0 source. Hybrid adds no conversion lines to the script:
# despotting using SpotLess SpotLess()
How Hybrid calls it
- Hybrid loads mvtools2.dll and the neo-smo plugin with its helper script, imports SpotLess.avs and calls
SpotLess(). - The script accepts only 8-bit YV12, Y8, YV16 and YV24. Other formats are converted first, so higher bit depths are reduced to 8 bit.
- Parameters are only written when they differ from the default. ThSAD2 is only written when its check box is on and the value differs from ThSAD. Overlap is only written when its check box is on and the value differs from half of BlockSize.
- The script mirrors the frames at both ends, so the first and the last frame are filtered as well.
- SpotLess also offers the common options and can be added to the filter queue several times.
Background
SpotLess is by StainlessS, based on an idea by Didee (Doom9 forum). Hybrid uses version 1.07. It needs MVTools2 and a temporal median; Hybrid's copy uses the neo-smo implementation. Hybrid does not offer the block size 12.
The script accepts values up to 1.58 for Blur. The SAD thresholds go up to 16320 (8 × 8 × 255). The VapourSynth version has many more options.
See also: Vapoursynth SpotLess
Sources
- SpotLess thread on Doom9
- Hybrid's tooltips
- The AviSynth+ documentation does not cover SpotLess.