MoviePy Crossfade and Slide — effect skill for transitions
For AI agents: find the right skill in one call —
curl -s "https://varg.ai/how-to/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://varg.ai/how-to/llms.txt. Every page has a markdown twin: add.mdto 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).
- Type: Effect · Transitions
- Slug:
moviepy-crossfade - Status: live
- Publisher: varg (varg, verified)
- License: MIT
- Source: https://github.com/vargHQ/skills/blob/main/varg-video-edit-library/references/transitions.md#moviepy-crossfade
- Works in: Claude Code, Claude.ai, Codex, Cursor, OpenClaw, Gemini CLI, Any MCP client, varg Studio
- Requires: Python + MoviePy
- Cost: Free — the take renders locally; generated footage, if any, bills by the model
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
- Python pipelines that already use MoviePy; quick prototypes.
Not for
- v1 syntax (
crossfadein,set_start,subclip) on MoviePy 2.x; and slow renders of long timelines.
Install
- Claude Code:
claude plugin marketplace add vargHQ/skills && claude plugin install varg@varg - Codex:
npx skills add vargHQ/skills --skill varg-video-edit-library -a codex -y - Cursor:
npx skills add vargHQ/skills --skill varg-video-edit-library -a cursor -y
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
- editly: Declarative JSON5 video editing CLI/API: clips, titles, transitions, audio mixing, rendered with ffmpeg.
- Mix (Cross Dissolve): The two shots blend through each other. The quietest transition: "time passes" or "this continues".
- Dip to Black: A fades to black, then B fades up. Marks the end of a section or a bigger jump in time.
- White Flash: The frame blows out to white for a moment and opens on the next shot. Energy, memory or a camera snap.
- Pull In (Zoom In): The camera rushes into shot A and lands, still moving forward, in shot B. The signature short-form transition.
- Pull Out (Zoom Out): The camera jerks backwards out of shot A and keeps pulling back as shot B settles in.