<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_Stab</id>
	<title>Vapoursynth Stab - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_Stab"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_Stab&amp;action=history"/>
	<updated>2026-11-19T16:50:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_Stab&amp;diff=624&amp;oldid=prev</id>
		<title>Selur: New filter page (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_Stab&amp;diff=624&amp;oldid=prev"/>
		<updated>2026-11-16T08:52:24Z</updated>

		<summary type="html">&lt;p&gt;New filter page (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Stab&amp;#039;&amp;#039;&amp;#039; removes small camera shake (jitter) by measuring how far each frame is shifted against a temporally averaged reference and moving it back.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → Frame → Stabilize&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_Stab.png|none|Stab controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
Stab is a port of the AviSynth Stab/Stab3s idea based on DePan&amp;#039;s global motion estimation and compensation. A temporally softened copy of the clip serves as the steady reference; the global shift of each frame against it is estimated and compensated. Stab corrects shifts (optionally zoom), not rotation – for rotation use [[Vapoursynth StabilizeIT|StabilizeIT]]. Areas uncovered at the frame edges become black, are mirrored, or can be filled from the source and inpainted.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Luma expansion AutoAdjust: the AutoAdjust plugin.&lt;br /&gt;
* Fix false positives: vszip.&lt;br /&gt;
* Fill borders: AvsInpaint and akarin.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Control !! Parameter !! Range / values !! Hybrid default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| Shift (max X/Y) || dxmax / dymax || 0 – 32768 || 8 / 8 || Largest horizontal / vertical shift searched, in pixels. With both at 0 the filter is skipped.&lt;br /&gt;
|-&lt;br /&gt;
| Mirror (top, bottom, left, right) || mirror || four on/off boxes || all off || Which uncovered borders are filled with mirrored edge pixels instead of black; any combination of sides. Hybrid sums the ticked sides into the mirror value (top 1, bottom 2, left 4, right 8). Disabled while Fill borders is on.&lt;br /&gt;
|-&lt;br /&gt;
| Soften radius || ts || 1 – 7 || 7 || Frames before and after that are averaged into the reference.&lt;br /&gt;
|-&lt;br /&gt;
| Max. zoom || zoom || 1.0 – 10.0 || 1.0 || Largest zoom that is estimated; 1.0 = no zoom estimation.&lt;br /&gt;
|-&lt;br /&gt;
| PAR (W:H) || pixaspect || 0 – 999999 each || 0 / 0 || Pixel aspect ratio; 0 in either field = taken from the clip (1.0 if the clip has none). Only matters with zoom or non-square pixels.&lt;br /&gt;
|-&lt;br /&gt;
| Luma expansion || luma_exp || off, TV to PC levels, AutoAdjust || off || Contrast stretch of the copy the motion is measured on; the output is not changed.&lt;br /&gt;
|-&lt;br /&gt;
| Fix false positives || fixfalpos || on/off || off || Frames whose result shows a black edge wider than 2 px (3 px with Fill borders) are replaced by the unstabilized frame.&lt;br /&gt;
|-&lt;br /&gt;
| Fill borders || fillborder || on/off || off || The uncovered area is taken from the source and inpainted (Stab3s FillBorder=1); YUV only, several times slower.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: MV || – || mvutensils, mv || – || MVTools implementation (DePan functions).&lt;br /&gt;
|-&lt;br /&gt;
| Tools: RG / TemporalSoften / SCD || – || zsmooth, neo_smo / zsmooth, focus2 / scd, misc, std, mv || – || Repair, temporal soften and scene change detection.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: PlaneStats || – || vszip || – || Used by Fix false positives.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: Expr / Hysteresis / FFT3D || – || akarin, cranexpr / hysteresis, misc / neo_fft || – || Only used with Fill borders.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Default settings on a 10-bit YUV 4:2:0 source (640x356):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# stabilizing using Stab&lt;br /&gt;
clip = stabilize.Stab(clip, mirror=0, tools={&amp;#039;mv&amp;#039;: &amp;#039;mvutensils&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;temporalsoften&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;scd&amp;#039;: &amp;#039;scd&amp;#039;, &amp;#039;planestats&amp;#039;: &amp;#039;vszip&amp;#039;, &amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;hysteresis&amp;#039;: &amp;#039;hysteresis&amp;#039;, &amp;#039;fft3d&amp;#039;: &amp;#039;neo_fft&amp;#039;})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* Stab works on 8–16-bit integer YUV and gray clips; with Fill borders only YUV is accepted. Other formats are converted first.&lt;br /&gt;
* The mirror value is always written (0 when no side is ticked; the script&amp;#039;s own default would be 5); the other options only when they differ from the defaults.&lt;br /&gt;
* The TV to PC levels expansion is scaled to the bit depth of the clip.&lt;br /&gt;
* Inside, the clip is temporally softened (radius &amp;#039;&amp;#039;Soften radius&amp;#039;&amp;#039;), repaired and interleaved with the source; the motion is estimated and compensated on that interleave.&lt;br /&gt;
* Fix false positives checks edge strips twice the shift limit wide for black.&lt;br /&gt;
* Frame count and frame rate do not change.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Stab and Stab3s ===&lt;br /&gt;
Stab comes from a family of AviSynth stabilization scripts built on DePan. Stab3s added filling the uncovered borders (FillBorder), which Hybrid offers as &amp;#039;&amp;#039;Fill borders&amp;#039;&amp;#039; using [[Vapoursynth InpaintDelogo|InpaintDelogo]]. The mvutensils DePan functions are largely taken over unchanged from MVTools.&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/Selur/VapoursynthScriptsInHybrid VapoursynthScriptsInHybrid] (the script collection Hybrid uses)&lt;br /&gt;
* [https://github.com/dubhater/vapoursynth-mvtools vapoursynth-mvtools]&lt;br /&gt;
* Hybrid&amp;#039;s tooltips&lt;br /&gt;
&lt;br /&gt;
[[Category:Vapoursynth Filters]]&lt;/div&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
</feed>