Avisynth Hysteria
Hysteria darkens the lines of drawn material, using an edge mask built by hysteresis so only connected, real lines are touched.
Filtering → Avisynth → Line → Darkening

What it does
Two cartoon edge masks are made, a noisy one with a low threshold and a clean one with a high threshold. Only edges of the noisy mask that are connected to strong edges survive; the mask is then grown and blurred. Pixels under the mask are darkened by the difference to their brighter neighbourhood. Only luma is changed; chroma is kept.
Typical uses:
- Darken the outlines of anime and cartoons without darkening noise.
- Use Show mask to check which edges are found and adjust Threshold.
The filter works on progressive material.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Strength | strength | 0.1–10 | 1.0 | Darkening strength. |
| Change (min/max) | minchg / maxchg | 0–255 | 0 / 255 | Darkening smaller than min is dropped; darkening is capped at max. |
| Luma cap | luma_cap | 0–255 | 191 | Brightness cap for the darkening. 0 means no darkening at all, 255 means no cap. |
| Use mask | usemask | on/off | on | Off darkens every edge, which makes lines thicker; keep Strength low then. |
| Show mask | showmask | on/off | off | Output the mask together with the chroma of the source. |
| Threshold (low/high) | lowthresh / highthresh | 0–255 | 6 / 20 | Thresholds of the noisy and the clean edge mask. |
Example
Default settings on a 10-bit YUV 4:2:0 source (no conversion is needed):
Hysteria()
How Hybrid calls it
- The Hysteria script is loaded together with masktools2 and the shared helper functions it needs.
- Only parameters that differ from the defaults are written.
- The script works on gray and planar YUV clips, not on RGB or YUY2.
- Hysteria also offers the common options and can be added to the filter queue several times.
Background
- Hysteria.avsi is by Scintilla. It was first released in 2010; the 2016 update removed the YV12 limit and the 2020 update added high bit depth.
- The VapourSynth port by Overdrive80 (2015) credits Scintilla: Doom9 thread. Hybrid's VapourSynth page: Vapoursynth Hysteria.
Sources
- Doom9 thread: Hysteria for VapourSynth
- Hybrid's tooltips
- The AviSynth+ documentation does not cover Hysteria.
See also: Avisynth FastLineDarken, Avisynth mfToon