Decorators

These decorators are implemented to ease the writing of methods and effects in MoviePy

all decorators used in moviepy go there

moviepy.decorators.add_mask_if_none(f)[source]

Add a mask to the clip if there is none.

moviepy.decorators.apply_to_audio(f)[source]

This decorator will apply the function f to the audio of the clip created with f

moviepy.decorators.apply_to_mask(f)[source]

This decorator will apply the same function f to the mask of the clip created with f

moviepy.decorators.audio_video_fx(f)[source]

Use an audio function on a video/audio clip

This decorator tells that the function f (audioclip -> audioclip) can be also used on a video clip, at which case it returns a videoclip with unmodified video and modified audio.

moviepy.decorators.convert_masks_to_RGB(f)

If the clip is a mask, convert it to RGB before running the function

moviepy.decorators.convert_to_seconds(varnames)

Converts the specified variables to seconds

moviepy.decorators.outplace(f)[source]

Applies f(clip.copy(), *a, **k) and returns clip.copy()

moviepy.decorators.preprocess_args(fun, varnames)

Applies fun to variables in varnames before launching the function

moviepy.decorators.requires_duration(f)[source]

Raise an error if the clip has no duration.

moviepy.decorators.use_clip_fps_by_default(f)

Will use clip.fps if no fps=... is provided in **k