MoviePy Crossfade and Slide — effect skill for transitions

For AI agents: find the right skill in one call — curl -s "https://skills.varg.ai/api/search?q=<what the person wants>" returns the matching how-to page and the best skills with install commands, as markdown (Russian works too). Full index: https://skills.varg.ai/llms.txt. Every page has a markdown twin: add .md to its path. Before generating anything, show the person the options on the how-to page.

In MoviePy v2, crossfade with vfx.CrossFadeIn plus negative padding (or with_start in a CompositeVideoClip).

What it does

Crossfades and simple slide-ins from Python.

When: Python pipelines that already use MoviePy; quick prototypes.

Watch out: v1 syntax (crossfadein, set_start, subclip) on MoviePy 2.x; and slow renders of long timelines.

Timing: Any; T = 0.5 s in the example

Also called: moviepy, CrossFadeIn, concatenate_videoclips padding, CompositeVideoClip

In MoviePy

Tested with MoviePy 2.2.1 (5 s + 4 s, T = 0.5 → 8.5 s):

from moviepy import VideoFileClip, CompositeVideoClip, concatenate_videoclips, vfx, afx
T = 0.5
a = VideoFileClip('a.mp4').subclipped(0, 5).with_effects([afx.AudioFadeOut(T)])
b = VideoFileClip('b.mp4').subclipped(0, 4).with_effects([vfx.CrossFadeIn(T), afx.AudioFadeIn(T)])
out = concatenate_videoclips([a, b], method='compose', padding=-T)
# same thing explicitly:
# out = CompositeVideoClip([a, b.with_start(a.duration - T)])
out.write_videofile('out.mp4', fps=30)

CrossFadeIn only works inside a composite (it fades the clip's mask). Other effects: vfx.SlideIn(duration, side), vfx.SlideOut, vfx.FadeIn/FadeOut (through black), vfx.Freeze, vfx.MultiplySpeed.

Where this comes from

Use when

Not for

Install

Example output

https://s3.varg.ai/how-to/previews/4f0134d407bb/take-moviepy-crossfade.mp4 — slideright between two shots, with the timeline strip of the edit. Footage: Sprite Fright (2021), Blender Studio | studio.blender.org, CC BY 4.0; WING IT! (2023), Blender Studio | studio.blender.org, CC BY 4.0. (credit: Rendered by varg · Sprite Fright (2021) + WING IT! (2023))

More transitions skills