Vapoursynth RemoveSpots: Difference between revisions
New filter page (via create-page on MediaWiki MCP Server) |
Update to current Hybrid behaviour; code as <pre> (via update-page on MediaWiki MCP Server) |
||
| Line 22: | Line 22: | ||
== Example == | == Example == | ||
Default settings on a 10-bit YUV 4:2:0 source: | Default settings on a 10-bit YUV 4:2:0 source: | ||
< | <pre> | ||
# spot/dirt removal using RemoveSpots | # spot/dirt removal using RemoveSpots | ||
clip = artifacts.RemoveSpots(clip, tools={'rg': 'zsmooth', 'removedirt': 'removedirt'}) | clip = artifacts.RemoveSpots(clip, tools={'rg': 'zsmooth', 'removedirt': 'removedirt'}) | ||
</ | </pre> | ||
== How Hybrid calls it == | == How Hybrid calls it == | ||
Latest revision as of 09:51, 16 November 2026
RemoveSpots removes short-lived spots, dirt specks and impulse noise that appear on a single frame, as found on old film and analog captures. It is the plain, fast variant; RemoveSpotsMCX is the motion-compensated, multi-pass one.
Filtering → Vapoursynth → Artifacts

What it does
Each frame is compared with its previous and next frame. A temporal median and a forward and a backward clean are built; a scene change check picks the right candidate, so frames of different scenes are not mixed. Two Repair passes limit the candidate against the source. Finally the cleaned pixels are put back only in blocks judged static, so moving areas keep the original picture.
Settings
| Control | Parameter | Range / values | Hybrid default | Meaning |
|---|---|---|---|---|
| Limit | limit | 1 – 24 | 16 | Repair mode used to limit the cleaned result against the source (all planes). The modes are different clipping rules, not a strength scale. |
| Tools: RG | – | zsmooth, neo_smo | zsmooth | Clense/Repair implementation. |
| Tools: RemoveDirt | – | removedirt | removedirt | RemoveDirt plugin (scene change selection and motion detection). |
Example
Default settings on a 10-bit YUV 4:2:0 source:
# spot/dirt removal using RemoveSpots
clip = artifacts.RemoveSpots(clip, tools={'rg': 'zsmooth', 'removedirt': 'removedirt'})
How Hybrid calls it
- RemoveSpots works on 8 – 16-bit integer YUV 4:2:0, 4:2:2 and 4:4:4; other formats (RGB, float, gray) are converted first.
- Limit is only written when it differs from 16, which is also the script's default. It is a mode number, so it is not scaled. The Tools choice is always written.
- All planes are processed. The motion detection values are fixed (70 % for a scene change, distance 1, mode 2, noise 10, 12 noisy pixels).
- RemoveSpots is left out when encoding in chunks, since it needs neighbor frames.
- RemoveSpots also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).
Background
zsmooth functions
Clense is a temporal median of the previous, current and next frame; ForwardClense uses the current and the next two frames, BackwardClense the current and the previous two. Repair corrects a processed clip against a reference clip, with one mode per plane.
RemoveDirt
Ferenc Pinter's RemoveDirt is a port of kassandro's RemoveDirt 0.9 with more color formats and VapourSynth support since version 1.0. It provides the scene change selection (SCSelect) and the block-wise motion detection (RestoreMotionBlocks).
Sources
- zsmooth README
- RemoveDirt plugin
- VapoursynthScriptsInHybrid (the script collection Hybrid uses)
- Hybrid's tooltips