joj
19th July 2015, 10:42
Latest version: 2.0.1 (updated 2021-09-11)
In tribute to tritical's awesome filter, this one tackles the inverse problem
of TDecimate; allowing for addressing frames that have non-smooth, skippy / juddery motion.
Example:
http://griffeltavla.files.wordpress.com/2015/07/smoothskip-fast.gif slowmo> http://griffeltavla.files.wordpress.com/2015/07/smoothskip-slow.gif
It is mostly a heuristic command and control (detect and act) filter and doesn't do any actual
image processing. The interpolation used in the sample above leveraged mvtools
and this filter just decided when to use frames from that alternate clip.
Script to create this, samples, further information as well as the source code
can be found on github (https://github.com/jojje/SmoothSkip).
Binary for download with source code included available here (https://github.com/jojje/SmoothSkip/releases).
SmoothSkip( altClip, int "cycle", int "create", int "offset", float "scene", bool "debug" )
*altclip*: The clip to pick frames from, to insert before the respective frames in a cycle having the highest frame difference
to their respective preceding ones. Mandatory option.
*cycle*: Number of consecutive frames forming a cycle between skips.
Typically it would be the number of frames between skips. If the distance of the frame skipping varies, a larger cycle can be
specified and number of frames to inject (create) in the cycle can also be raised so that an N in M cycle can be established.
Default: 4
*create*: Number of frames to create in a cycle.
This together with cycle forms the frequency of frame injection ("create" in "cycle"). For example if there is one skip seen in
each cycle and a cycle is 4 frames, then one new frame will be injected every 4 frames. Consequently the resulting clip will
have 5/4 as many frames and the frame rate increased by the same factor. If on the other hand, the cycle is less strict,
such as 3 frames in every 10-12 frames, then create can be set to 3 with a cycle of the upper observed bound (12 frames),
which will result in a 3 in 12 frame insertion ratio.
Default: 1
*offset*: Frame offset used to pick an insertion frame from the alternate clip (altclip).
When scripting AviSynth, users are prevented from accessing individual frames, as selecting frames is the purview of the
application leveraging AviSynth. Filter plugins however have greater flexibility and can pick and choose which frame to use
and this offset option gives you some flexibility in selecting replacement frames that do not necessarily reside at the same
frame number as the primary clip's. Of course, you could achieve the effect of fixed offset like this by using Trim and Loop,
so this is just a shorthand to save you from having to stitch and slice clips in the script.
Default: -1 (frame with number before current_frame)
*scene*: Scene detection threshold.
Any frame difference ("YDifferenceFromPrevious") above this threshold will be regarded as a scene change. When a scene
change frame is detected, the frame from the source clip will be used instead of the alt-clip. When a scene change frame is
detected in a cycle, the frame with the next largest frame diff will be picked instead. In short, if a scene change is detected
in a cycle, then the frame with the largest diff will be removed from skip tagging. There is one exception to this rule, and
that is when the cycle size is one (1). In that case, if a frame is flagged as a scene change, then a freeze-frame from the
source clip will be added instead. This is to allow for sharp scene transitions (straight cuts), which look much better to the
eyes than blending or interpolating the adjacent frames across a scene change.
Default: 32.0
*debug*: Display various internal metrics as an image overlay.
Default: false
Changelog:
* 2.0.1 Fixes scene-change detection for single frame cycles. Now also allows the plugin to be used more than once in a script.
* 2.0.0 Adds multithreading support, scene detection. Fixes debug paint overflow. Removes "dm" option.
* 1.0.2 Fix bounds check on user input
* 1.0.1 Fix for invalid end-frame calculation
* 1.0.0 Initial release
In tribute to tritical's awesome filter, this one tackles the inverse problem
of TDecimate; allowing for addressing frames that have non-smooth, skippy / juddery motion.
Example:
http://griffeltavla.files.wordpress.com/2015/07/smoothskip-fast.gif slowmo> http://griffeltavla.files.wordpress.com/2015/07/smoothskip-slow.gif
It is mostly a heuristic command and control (detect and act) filter and doesn't do any actual
image processing. The interpolation used in the sample above leveraged mvtools
and this filter just decided when to use frames from that alternate clip.
Script to create this, samples, further information as well as the source code
can be found on github (https://github.com/jojje/SmoothSkip).
Binary for download with source code included available here (https://github.com/jojje/SmoothSkip/releases).
SmoothSkip( altClip, int "cycle", int "create", int "offset", float "scene", bool "debug" )
*altclip*: The clip to pick frames from, to insert before the respective frames in a cycle having the highest frame difference
to their respective preceding ones. Mandatory option.
*cycle*: Number of consecutive frames forming a cycle between skips.
Typically it would be the number of frames between skips. If the distance of the frame skipping varies, a larger cycle can be
specified and number of frames to inject (create) in the cycle can also be raised so that an N in M cycle can be established.
Default: 4
*create*: Number of frames to create in a cycle.
This together with cycle forms the frequency of frame injection ("create" in "cycle"). For example if there is one skip seen in
each cycle and a cycle is 4 frames, then one new frame will be injected every 4 frames. Consequently the resulting clip will
have 5/4 as many frames and the frame rate increased by the same factor. If on the other hand, the cycle is less strict,
such as 3 frames in every 10-12 frames, then create can be set to 3 with a cycle of the upper observed bound (12 frames),
which will result in a 3 in 12 frame insertion ratio.
Default: 1
*offset*: Frame offset used to pick an insertion frame from the alternate clip (altclip).
When scripting AviSynth, users are prevented from accessing individual frames, as selecting frames is the purview of the
application leveraging AviSynth. Filter plugins however have greater flexibility and can pick and choose which frame to use
and this offset option gives you some flexibility in selecting replacement frames that do not necessarily reside at the same
frame number as the primary clip's. Of course, you could achieve the effect of fixed offset like this by using Trim and Loop,
so this is just a shorthand to save you from having to stitch and slice clips in the script.
Default: -1 (frame with number before current_frame)
*scene*: Scene detection threshold.
Any frame difference ("YDifferenceFromPrevious") above this threshold will be regarded as a scene change. When a scene
change frame is detected, the frame from the source clip will be used instead of the alt-clip. When a scene change frame is
detected in a cycle, the frame with the next largest frame diff will be picked instead. In short, if a scene change is detected
in a cycle, then the frame with the largest diff will be removed from skip tagging. There is one exception to this rule, and
that is when the cycle size is one (1). In that case, if a frame is flagged as a scene change, then a freeze-frame from the
source clip will be added instead. This is to allow for sharp scene transitions (straight cuts), which look much better to the
eyes than blending or interpolating the adjacent frames across a scene change.
Default: 32.0
*debug*: Display various internal metrics as an image overlay.
Default: false
Changelog:
* 2.0.1 Fixes scene-change detection for single frame cycles. Now also allows the plugin to be used more than once in a script.
* 2.0.0 Adds multithreading support, scene detection. Fixes debug paint overflow. Removes "dm" option.
* 1.0.2 Fix bounds check on user input
* 1.0.1 Fix for invalid end-frame calculation
* 1.0.0 Initial release