moviepy.video.fx.Scroll#

class moviepy.video.fx.Scroll.Scroll(w=None, h=None, x_speed=0, y_speed=0, x_start=0, y_start=0, apply_to='mask')[source]#

Effect that scrolls horizontally or vertically a clip, e.g. to make end credits

Parameters:
  • w – The width and height of the final clip. Default to clip.w and clip.h

  • h – The width and height of the final clip. Default to clip.w and clip.h

  • x_speed – The speed of the scroll in the x and y directions.

  • y_speed – The speed of the scroll in the x and y directions.

  • x_start – The starting position of the scroll in the x and y directions.

  • y_start – The starting position of the scroll in the x and y directions.

apply_to

Whether to apply the effect to the mask too.

apply(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.