Skip to content

dubhater/vapoursynth-motionmask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

MotionMask creates a mask of moving pixels. Every output pixel will be set to the absolute difference between the current frame and the previous frame.

This is a port of the mt_motion filter from pinterf's updated version of the Avisynth plugin MaskTools.

Usage

motionmask.MotionMask(clip clip, [int[] planes=all, int[] th1=[10, 10, 10], int[] th2=[10, 10, 10], int tht=10, int sc_value=0])
Parameters:
clip
A clip to process. It must have constant format and dimensions, 8..16 bit integer sample type, and it must not be RGB.
planes
Planes to process. Unprocessed planes will be copied.
th1, th2

Low and high thresholds. Must be between 0 and 255.

Any output pixels less than or equal to th1 will become 0.

Any output pixels greater than th2 will become the maximum value allowed by the format.

Default: 10 for the first plane, and same as the previous plane for the others.

tht

Scene change detection threshold. Must be between 0 and 255.

Lower values will detect more scene changes.

Default: 10.

sc_value

Frames that are considered scene changes will be filled with this value, scaled according to the bit depth. Must be between 0 and 255.

Default: 0.

Compilation

mkdir build && cd build
meson ../
ninja

License

MIT, like the Avisynth+ plugin.