<?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_TDecimate</id>
	<title>Vapoursynth TDecimate - 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_TDecimate"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_TDecimate&amp;action=history"/>
	<updated>2026-11-19T04:04:03Z</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_TDecimate&amp;diff=658&amp;oldid=prev</id>
		<title>Selur: Update to current Hybrid behaviour; code as &lt;pre&gt; (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_TDecimate&amp;diff=658&amp;oldid=prev"/>
		<updated>2026-11-16T08:53:31Z</updated>

		<summary type="html">&lt;p&gt;Update to current Hybrid behaviour; code as &amp;lt;pre&amp;gt; (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:53, 16 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot;&gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| m2PA || m2PA || on/off || off || Lifts the read-ahead limit of 100 frames in mode 2, so one pass gives the same result as with stored metrics; long cycles can stall processing for minutes when a new cycle starts.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| m2PA || m2PA || on/off || off || Lifts the read-ahead limit of 100 frames in mode 2, so one pass gives the same result as with stored metrics; long cycles can stall processing for minutes when a new cycle starts.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| DupThresh || dupThresh || 0 – 100 || 1.1 || Difference (percent) below which a frame counts as a duplicate &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/del&gt;modes 1 and 7&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; &lt;/del&gt;always written there&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, so 1&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1 also applies in &lt;/del&gt;mode &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;7)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| DupThresh || dupThresh || 0 – 100 || 1.1 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(mode 1), 0.4 (mode 7) &lt;/ins&gt;|| Difference (percent) below which a frame counts as a duplicate&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; used in &lt;/ins&gt;modes 1 and 7 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/ins&gt;always written there. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Changing the mode sets the plugin&#039;s default for that &lt;/ins&gt;mode.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| VidThresh || vidThresh || 0 – 100 || 3.5 || Difference above which a frame counts as video (mode 7).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| VidThresh || vidThresh || 0 – 100 || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1.1 (modes 0/1), &lt;/ins&gt;3.5 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(mode 7) &lt;/ins&gt;|| Difference above which a frame counts as video (mode 7&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, and modes 0/1 with Hybrid handling&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Changing the mode sets the default for that mode&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| SceneThresh || sceneThresh || 0 – 100 || 15 || Difference that counts as a scene change (mode 7).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| SceneThresh || sceneThresh || 0 – 100 || 15 || Difference that counts as a scene change (mode 7&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, and modes 0/1 with Hybrid handling&lt;/ins&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| DenoiseThresh || nt || 0 – 10 || 0 || Differences below this value are ignored when comparing frames, so grain does not make every frame look different.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| DenoiseThresh || nt || 0 – 10 || 0 || Differences below this value are ignored when comparing frames, so grain does not make every frame look different.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l57&quot;&gt;Line 57:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Default settings on a 10-bit YUV 4:2:0 source (640x356, 25 fps):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Default settings on a 10-bit YUV 4:2:0 source (640x356, 25 fps):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&quot;python&quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Decimate using TDecimate&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Decimate using TDecimate&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;clip = core.tivtc.TDecimate(clip) # new fps: 20&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;clip = core.tivtc.TDecimate(clip) # new fps: 20&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How Hybrid calls it ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How Hybrid calls it ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* TDecimate works on 8–16-bit YUV 4:2:0, 4:2:2 and 4:4:4; other formats are converted first. Thresholds are percentages and do not depend on the bit depth.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* TDecimate works on 8–16-bit YUV 4:2:0, 4:2:2 and 4:4:4; other formats are converted first. Thresholds are percentages and do not depend on the bit depth.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Most options are only written when they differ from Hybrid&#039;s defaults; the options for Hybrid handling are written with Hybrid handling on.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Most options are only written when they differ from Hybrid&#039;s defaults; the options for Hybrid handling are written with Hybrid handling on&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. DupThresh is always written in modes 1 and 7, VidThresh and SceneThresh in mode 7 and with Hybrid handling&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Frame rate, modes 0/1: the input rate × (Cycle − CycleR) / Cycle, e.g. 29.97 fps with 5/1 → 23.976 fps. With &amp;quot;blend 24p→30p, keep 30p&amp;quot; the input rate is kept.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Frame rate, modes 0/1: the input rate × (Cycle − CycleR) / Cycle, e.g. 29.97 fps with 5/1 → 23.976 fps. With &amp;quot;blend 24p→30p, keep 30p&amp;quot; the input rate is kept.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Frame rate, modes 2/7: the Rate fraction; Hybrid also sets this exact rate on the output.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Frame rate, modes 2/7: the Rate fraction; Hybrid also sets this exact rate on the output.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_TDecimate&amp;diff=405&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_TDecimate&amp;diff=405&amp;oldid=prev"/>
		<updated>2026-11-15T07:54:57Z</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;TDecimate&amp;#039;&amp;#039;&amp;#039; removes duplicate frames and is the second half of an inverse telecine, after field matching. It drops the most similar frames, either a fixed number per cycle (29.97 → 23.976 fps) or so that any target rate is reached, and can handle sources that mix film and video.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → Frame → Reduction&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_TDecimate.png|none|TDecimate controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
TDecimate compares each frame with its neighbor and measures how different they are. In modes 0 and 1 it works in cycles: per &amp;#039;&amp;#039;Cycle&amp;#039;&amp;#039; frames it drops &amp;#039;&amp;#039;CycleR&amp;#039;&amp;#039; frames, either the most similar ones (mode 0) or those from the longest runs of duplicates (mode 1, useful for anime). Modes 2 and 7 decimate to an arbitrary target &amp;#039;&amp;#039;Rate&amp;#039;&amp;#039;; mode 7 does it with thresholds. The &amp;#039;&amp;#039;Hybrid&amp;#039;&amp;#039; option handles material where film (24p) and video (30p) sections alternate.&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;
| Mode || mode || 0, 1, 2, 7 || 0 || 0: drop the CycleR most similar frames per cycle; 1: drop from the longest duplicate runs; 2: arbitrary rate; 7: arbitrary rate by thresholds.&lt;br /&gt;
|-&lt;br /&gt;
| Cycle || cycle || 2 – 100 || 5 || Frames per cycle (modes 0/1).&lt;br /&gt;
|-&lt;br /&gt;
| CycleR || cycleR || 1 – Cycle − 1 || 1 || Frames dropped per cycle (modes 0/1).&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid || hybrid || no handling, blend 30p→24p keep 24p, blend 24p→30p keep 30p || no handling || Handling of mixed film/video material (modes 0/1 with CycleR 1). 30p→24p blends the video parts down; 24p→30p blends the film parts up and keeps the input rate.&lt;br /&gt;
|-&lt;br /&gt;
| no blend || noblend || on/off || on || Drop a duplicate instead of blending it with its neighbor (modes 0/1).&lt;br /&gt;
|-&lt;br /&gt;
| VidDetect || vidDetect || A, B, A or B, A and B, A and (B or C) || A and B || Which tests (A: field matches, B: metrics above VidThresh, C: no local minimum) mark a cycle as video (with Hybrid handling).&lt;br /&gt;
|-&lt;br /&gt;
| ConCycle || conCycle || 1 – 2 || 1 || Consecutive cycles that must be detected as video (with Hybrid handling).&lt;br /&gt;
|-&lt;br /&gt;
| SDLim || sdlim || −10 – 10 || 0 || Minimum distance between two dropped frames (modes 0/1 with CycleR &amp;gt; 1).&lt;br /&gt;
|-&lt;br /&gt;
| Rate || rate || fraction || 24000/1001 || Target frame rate (modes 2/7).&lt;br /&gt;
|-&lt;br /&gt;
| Max ndl || maxndl || 0 – 1024 || 0 || Largest number of non-duplicate frames in a row (mode 2; 0 = not set, the plugin decides).&lt;br /&gt;
|-&lt;br /&gt;
| m2PA || m2PA || on/off || off || Lifts the read-ahead limit of 100 frames in mode 2, so one pass gives the same result as with stored metrics; long cycles can stall processing for minutes when a new cycle starts.&lt;br /&gt;
|-&lt;br /&gt;
| DupThresh || dupThresh || 0 – 100 || 1.1 || Difference (percent) below which a frame counts as a duplicate (modes 1 and 7; always written there, so 1.1 also applies in mode 7).&lt;br /&gt;
|-&lt;br /&gt;
| VidThresh || vidThresh || 0 – 100 || 3.5 || Difference above which a frame counts as video (mode 7).&lt;br /&gt;
|-&lt;br /&gt;
| SceneThresh || sceneThresh || 0 – 100 || 15 || Difference that counts as a scene change (mode 7).&lt;br /&gt;
|-&lt;br /&gt;
| DenoiseThresh || nt || 0 – 10 || 0 || Differences below this value are ignored when comparing frames, so grain does not make every frame look different.&lt;br /&gt;
|-&lt;br /&gt;
| Block (X/Y) || blockx / blocky || 4 – 2048 (powers of 2) || 32 / 32 || Size of the blocks used for the difference metrics.&lt;br /&gt;
|-&lt;br /&gt;
| Chroma || chroma || on/off || on || Include chroma in the metrics.&lt;br /&gt;
|-&lt;br /&gt;
| Denoise || denoise || on/off || off || Denoise the frames before the metrics are computed; helps noisy sources and dot crawl, a little slower.&lt;br /&gt;
|-&lt;br /&gt;
| SSD || ssd || on/off || off || Sum of squared instead of absolute differences; the default thresholds are meant for absolute differences.&lt;br /&gt;
|-&lt;br /&gt;
| Display || display || on/off || off || Print the metrics and decisions onto the frame.&lt;br /&gt;
|}&lt;br /&gt;
Controls that the chosen Mode, CycleR and Hybrid setting do not use are disabled.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Default settings on a 10-bit YUV 4:2:0 source (640x356, 25 fps):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Decimate using TDecimate&lt;br /&gt;
clip = core.tivtc.TDecimate(clip) # new fps: 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* TDecimate works on 8–16-bit YUV 4:2:0, 4:2:2 and 4:4:4; other formats are converted first. Thresholds are percentages and do not depend on the bit depth.&lt;br /&gt;
* Most options are only written when they differ from Hybrid&amp;#039;s defaults; the options for Hybrid handling are written with Hybrid handling on.&lt;br /&gt;
* Frame rate, modes 0/1: the input rate × (Cycle − CycleR) / Cycle, e.g. 29.97 fps with 5/1 → 23.976 fps. With &amp;quot;blend 24p→30p, keep 30p&amp;quot; the input rate is kept.&lt;br /&gt;
* Frame rate, modes 2/7: the Rate fraction; Hybrid also sets this exact rate on the output.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== TIVTC ===&lt;br /&gt;
TDecimate comes from tritical&amp;#039;s TIVTC package for AviSynth; the VapourSynth plugin is dubhater&amp;#039;s port. It is normally used after field matching (TFM or a similar filter), whose hints it can read. In the plugin, DupThresh is only used by modes 1 and 7; its default there is 1.1 with chroma (1.4 without), and in mode 7 the plugin falls back to 0.4 if no value is given. VidThresh and SceneThresh also drive the video detection and the blending at scene changes when Hybrid handling is on.&lt;br /&gt;
&lt;br /&gt;
=== Related ===&lt;br /&gt;
For fixed-pattern decimation without analysis see [[Vapoursynth SelectEvery]]; for blended (not duplicated) frames see [[Vapoursynth sRestore]] and [[Vapoursynth ExBlend]].&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/dubhater/vapoursynth-tivtc vapoursynth-tivtc README]&lt;br /&gt;
* [https://github.com/pinterf/TIVTC TIVTC (AviSynth) and its TDecimate read-me]&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>