Vapoursynth SmallDeflicker
SmallDeflicker reduces brightness flicker between frames by smoothing a small, downscaled copy of the clip over time and applying only that low-frequency correction to the full-size picture.
Filtering → Vapoursynth → Frame → Stabilize

What it does
The clip is scaled down (by default to about a quarter of its size) and the small copy is smoothed over time with one of three presets. The difference between the small original and the smoothed copy is scaled back up and taken off the full-size frame. Because only slow, large-area brightness changes end up in that difference, fine detail stays sharp. Scene change detection keeps the smoothing from crossing cuts. An optional Repair step at the end limits artifacts such as ghosting.
Settings
| Control | Parameter | Range / values | Hybrid default | Meaning |
|---|---|---|---|---|
| Preset | preset | light, medium, aggressive | medium | Strength of the temporal smoothing: light = soft deflickering (GMJCZP's values), medium = kurish's values, aggressive = Didée's values. |
| Resolution (width/height) | width / height | 0 – 16384, multiples of 16 | 0 / 0 | Size of the downscaled working copy; 0 = source size / 4, rounded down to a multiple of 16. |
| CNR | cnr | on/off | off | Chroma noise reduction at the end of the smoothing; only used by the medium and aggressive presets. |
| Repair | rep | on/off | on | Repairs the result against the source; helps against ghosting on anime/cartoons and some other sources. |
| Tools: TemporalSoften | – | zsmooth, focus2 | – | Implementation of the temporal smoothing. |
| Tools: SCD | – | scd, misc, std, mv | – | Scene change detection; with mv its own thresholds (thSCD1/thSCD2) are shown. |
| Tools: MSmooth | – | std | – | Implementation of the MSmooth step. |
| Tools: CNR | – | zsmooth, neo_smo | – | Implementation of the chroma noise reduction (only with CNR on and preset medium or aggressive). |
| Tools: RG | – | zsmooth, neo_smo | – | Repair implementation (only with Repair on). |
| Tools: Expr / EdgeMasks / Bilateral | – | akarin, cranexpr, std / edgemasks / vszip, vszipcl, vszipcu, vsfeel | – | Helpers used by the MSmooth step; the bilateral variants vszipcl, vszipcu and vsfeel run on the GPU. |
Example
Default settings on a 10-bit YUV 4:2:0 source (640x356):
clip = core.std.AddBorders(clip=clip, left=0, right=0, top=6, bottom=6) # add borders to achieve mod 16 (vsSDeflicker) - 640x368
# removing flickering using Small Deflicker
clip = fromDoom9.Small_Deflicker(clip, tools={'expr': 'akarin', 'bilateral': 'vszip', 'rg': 'zsmooth', 'temporalsoften': 'zsmooth', 'edgemasks': 'edgemasks', 'scd': 'scd', 'msmooth': 'std', 'cnr': 'zsmooth'})
clip = core.std.Crop(clip=clip, left=0, right=0, top=6, bottom=6) # removing added borders from mod requirement (vsSDeflicker) - 640x356
How Hybrid calls it
- SmallDeflicker works on 8–16-bit integer YUV; other formats are converted first. With a GPU bilateral tool the input is limited to 8- or 16-bit YUV (16-bit only with vsfeel).
- The frame width and height must be multiples of 16. Hybrid keeps the resolution values on multiples of 16.
- Options are only written when they differ from the defaults; Hybrid's defaults are the script's defaults.
- The working copy is made with a Bicubic resize; the correction is applied to all three planes.
- Frame count and frame rate do not change.
Background
Origin
SmallDeflicker is a VapourSynth port of the AviSynth script Small Deflicker 2.4 from the doom9 forum: the idea comes from Didée and kurish, GMJCZP adapted it, and the three presets carry their respective values. The presets combine scene change detection, TemporalSoften passes and MSmooth. The script itself calls CNR an experimental attempt to reduce side effects, and Repair an option for content where ghosting shows.
Sources
- VapoursynthScriptsInHybrid (the script collection Hybrid uses)
- doom9 forum: Small Deflicker
- Hybrid's tooltips