moviepy.video.fx.all.mask_color¶
-
moviepy.video.fx.all.
mask_color
(clip, color=None, threshold=0, stiffness=1)[source]¶ Returns a new clip with a mask for transparency where the original clip is of the given color.
You can also have a “progressive” mask by specifying a non-null distance threshold
threshold
. In this case, if the distance between a pixel and the given color is d, the transparency will bed**stiffness / (threshold**stiffness + d**stiffness)
which is 1 when d>>threshold and 0 for d<<threshold, the stiffness of the effect being parametrized by
stiffness