moviepy.video.fx.all.mask_or

moviepy.video.fx.all.mask_or(clip, other_clip)[source]

Returns the logical ‘or’ (maximum pixel color values) between two masks.

The result has the duration of the clip to which has been applied, if it has any.

Parameters:
other_clip ImageClip or np.ndarray

Clip used to mask the original clip.

Examples

>>> clip = ColorClip(color=(255, 0, 0), size=(1, 1))  # red
>>> mask = ColorClip(color=(0, 255, 0), size=(1, 1))  # green
>>> masked_clip = clip.fx(mask_or, mask)              # yellow
>>> masked_clip.get_frame(0)
[[[255 255   0]]]