moviepy.video.fx.SlideIn#

class moviepy.video.fx.SlideIn.SlideIn(duration: float, side: str)[source]#

Makes the clip arrive from one side of the screen.

Only works when the clip is included in a CompositeVideoClip, and if the clip has the same size as the whole composition.

Parameters:
  • clip (moviepy.Clip.Clip) – A video clip.

  • duration (float) – Time taken for the clip to be fully visible

  • side (str) – Side of the screen where the clip comes from. One of ‘top’, ‘bottom’, ‘left’ or ‘right’.

Examples

from moviepy import *

clips = [... make a list of clips]
slided_clips = [
    CompositeVideoClip([clip.with_effects([vfx.SlideIn(1, "left")])])
    for clip in clips
]
final_clip = concatenate_videoclips(slided_clips, padding=-1)

clip = ColorClip(
    color=(255, 0, 0), duration=1, size=(300, 300)
).with_fps(60)
final_clip = CompositeVideoClip([clip.with_effects([vfx.SlideIn(1, "right")])])
apply(clip: Clip) Clip[source]#

Apply the effect to the clip.

copy()#

Return a shallow copy of an Effect.

You must always copy an Effect before applying, because some of them will modify their own attributes when applied. For example, setting a previously unset property by using target clip property.

If we was to use the original effect, calling the same effect multiple times could lead to different properties, and different results for equivalent clips.

By using copy, we ensure we can use the same effect object multiple times while maintaining the same behavior/result.

In a way, copy makes the effect himself being kind of idempotent.