Decimate Filter for VirtualDub

Important Note: This Decimate filter for VirtualDub was originally written as a proof of concept for IVTC based on field matching following by duplicate removal. It does in fact demonstrate that the approach is viable. But this filter is not a practical and reliable solution for either IVTC or general decimation. It is cumbersome to use and can lead to overflows of the Avisynth stack when the number of frames to be deleted gets large. Therefore, this filter is deprecated in favor of my Decomb filter package, which is available at this site in the Avisynth section. Decomb provides both IVTC, deinterlacing, and general decimation, and is both practical and reliable.

This filter acts on the output of the Telecide filter (or any other stream of progressive frames derived from a de-telecined clip) and deletes extra duplicated frames, while enforcing a desired decimation ratio. For example, suppose Telecide has been used to produce a clip containing progressive frames derived from 3:2 pulldown material. Decimate can take the processed clip as input and delete the duplicated frames by deleting one frame out of each group of five. Actually, because VirtualDub filters cannot delete frames, Decimate writes an Avisynth script that is used to do the actual frame deletion. It is acknowledged that this is a cumbersome procedure. The next generation of VirtualDub will allow filters to delete frames. Avisynth is available from a link given on the main page of this site. Version 0.3 (not 1.0 beta 3) is the most stable and reliable version.

Thanks to Simon Walters for suggesting the idea of writing Avisynth scripts to delete frames (VirtualDub filters cannot delete frames). Thanks to James Lin for suggesting the new approach in version 1.2 that is much more reliable and eliminates the need for setting a threshold.

Version 1.2 [Source code]

This version is a major improvement, thanks to James Lin. It has the following advantages:

Version 1.1 beta 2 was fixed so that the Decimate 1:25 mode ignores the initial duplicate frame put out by Telecide.

Version 1.1 beta 1 is improved as follows: 1) A 1-in-25 decimate mode is added for PAL clips that are telecined from 24fps to 25fps. 2) The duplicate detection is improved as the threshold is no longer dependent on the frame size. 3) The size of the executable is reduced by half. 4) The help is now HTML.

Version 1.0 Beta 5 changed the default threshold to 50 and allows the filter to run when no script filename has been specified.

Beta 4 was changed to produce correct video in the output pane to allow Telecide to be placed ahead of it in the filter chain and produce correct final output. Also, the filter was changed to use the DebugView utility instead of writing an alternate script file.

Beta 3 fixed problems with the Browse function: 1) it now works in Windows 2000; 2) doesn't clear the filename edit box if you hit cancel in the file dialog; and 3) defaults to file type *.avs.

Beta 2 is functionally identical to beta 1 but much faster.

[up to home page]