GetDups - Get unique duplicate frames
Plugin for Avisynth 2.5
Version 0.5.2 - April 6, 2004
Copyright (C)2004 Alexander G. Balakhnin aka Fizick.
http://bag.hotmail.ru
GetDups - is a special plugin for selecting unique duplicate frames from clip, it return frames which have copies only, by one from the series (group).
It was developed for processing of clips, produced at capturing of amateur 8 mm (Super 8) films, if we use method with removing of obturator from projector apparatus, with low projection velocity.
Such source clip contains groups of frames duplicates (very similar frames), separated by intermediate transitional smeared (not-similar) frames.
The plugin select one frame per such group.
Function parameters:
first parameter - input clip
threshold - threshold of difference between fields of neighbor frames (real percent, from 0.0 to 100.0, default= 7.0)
fade - maximum of luma correction (default = 10)
chroma - use chroma information too (default = false )
tff - fields order - top fields first or bottom (default = as Avisynth assumes)
show
- mode of processing and info show
(0 -
processing, 1 - processing and info, 2 - test and
info, default = 0)
debug - output info for DebugView utility (default=false)
Features and limitations
1. Works only in YV12 and YUY2 color format.
2. Directly works with progressive clips.
3. Tested with Avisynth 2.55.
4. No arbitrary access to frames. Plugin correctly works only with strictly sequential processing from first frame to end of clip.
5. Uses method and code of pixels block comparing from Dup plugin (by Donald Graft/Klaus Post).
6. Since version 0.2, plugin uses not inter-frame differences, but
inter-fields (for correspondent fields of neighbors frames).
It uses for output a frame with second field chronologically between
these duplicate fields.
Correct fields order definition is very important.
Simple sample script:
Avisource("input.avi")
loadplugin("GetDups.dll")
AssumeTFF()
GetDups()
AssumeFps(16)
#Trim(0,999)
Usage
Plugin is for the specific method for 8 mm films capturing by camcorder
(not for simple direct shooting from screen, not for per-frame one-shot capturing).
1) modify projector apparatus by removing of obturator to prevent brightness variations;
2) set low projection frequency about 4-6 fps;
3) project to small screen, shoot and capture video clip to file;
4) review clip by plugin GetDups in test mode (show=2), check duplicates existence and detection.
If results are bad, then tune threshold or re-capture film with lower fps .
5) make normal processing, write result to output file. Set output clip fps to 16 or 18 by AssumeFps.
6) use only selected unique frames at beginning of clip as final video, remove rest frames by trim.
License
This
program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be
useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Please
consider to make some donation.
Version changes:
Version 0.1, November 2, 2004 - first public. Thanks to Eugen65 for plugin idea and discussions.
Version
0.2, November 3, 2004 - Fields analysis method, mean luma
correction, Show parameter now integer,
ignoring of drops in captured frames.
Version 0.3, November 7, 2004 - Different frames now defined by one filed (was by both field), final frames now is copy of last duplicate.
Version 0.4, November 8, 2004 - Duplicate is now selected by most similar field if both difference are below threshold.
Version 0.5, November 8, 2004 - Compared block size decreased to 8 instead of 32.
Version 0.5.2, April 6, 2005 - was not public, released July 6, 2005 mostly for historical purposes :-). This special version is based on v.0.5 and contains my (Fizick) contribition to v.0.8 (must produce the same output as v.0.8 in mode=0) - Corrected mode=0 algorithm: now plugin does NOT detect the frame as a (false) dup, if the small difference is found for chronological first field only, and the same field difference was small at previous step too.
Download GetDups version 0.5.2