# FFmpeg xfade Transition Reference — 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 `.md` to its path. Before generating anything, show the person the options on the how-to page.

All 58 built-in xfade transitions plus custom expressions, grouped by look, with the options that matter.

- **Type:** [Effect](https://varg.ai/how-to/effects.md) · [Transitions](https://varg.ai/how-to/browse/skills/transitions.md)
- **Slug:** `ffmpeg-xfade-reference`
- **Status:** live
- **Publisher:** varg (varg, verified)
- **License:** MIT
- **Source:** https://github.com/vargHQ/skills/blob/main/varg-video-edit-library/references/transitions.md#ffmpeg-xfade-reference
- **Works in:** Claude Code, Claude.ai, Codex, Cursor, OpenClaw, Gemini CLI, Any MCP client, varg Studio
- **Requires:** ffmpeg
- **Cost:** Free — the take renders locally; generated footage, if any, bills by the model

## What it does

Fades, wipes, slides, covers/reveals, shape opens, slices, wind, squeeze, zoom, pixelize, blur.

**When:** Pick a transition name for any ffmpeg join; check here before writing a custom expression.

**Watch out:** Expecting camera-style effects (whip, spin, shake, glitch, light leak, 3D) from xfade; those need filter chains or GL/HTML engines.

**Timing:** duration 0–60 s (default 1); offset in seconds from the first input's start (default 0)

**Also called:** xfade list, xfade transitions, xfade names, xfade custom expr

### In FFmpeg

Options: `transition`, `duration`, `offset`, `expr`. Both inputs must be constant frame rate with the same resolution, pixel format, frame rate and timebase.

Fades: fade, fadefast, fadeslow, fadeblack, fadewhite, fadegrays, dissolve (dithered), distance.
Wipes: wipeleft/right/up/down, wipetl/tr/bl/br, diagtl/tr/bl/br, smoothleft/right/up/down (soft edge).
Moves: slideleft/right/up/down (push), coverleft/right/up/down (B over A), revealleft/right/up/down (A off B).
Shapes: circleopen, circleclose, circlecrop, rectcrop, vertopen, vertclose, horzopen, horzclose, radial (clock).
Slices and wind: hlslice, hrslice, vuslice, vdslice, hlwind, hrwind, vuwind, vdwind.
Other: squeezeh, squeezev, zoomin, pixelize, hblur, custom.

Custom: variables X, Y, W, H, P, PLANE, A, B and a0..a3(x,y), b0..b3(x,y). P runs from 1 at the start of the transition to 0 at the end (verified), so `if(gt(X/W,P),B,A)` reveals B from the right:
```bash
ffmpeg -i a.mp4 -i b.mp4 -filter_complex \
"[0:v]fps=30,settb=AVTB,format=yuv420p[a];[1:v]fps=30,settb=AVTB,format=yuv420p[b];\
 [a][b]xfade=transition=custom:duration=0.6:offset=4.4:expr='if(gt(mod(Y*10/H,1),P),B,A)'[v]" -map "[v]" blinds.mp4
```
GPU variants exist (`xfade_opencl`, `xfade_vulkan`) with a smaller set.

### Where this comes from

- [FFmpeg filters: xfade](https://ffmpeg.org/ffmpeg-filters.html#xfade)

## Use when

- Pick a transition name for any ffmpeg join; check here before writing a custom expression.

## Not for

- Expecting camera-style effects (whip, spin, shake, glitch, light leak, 3D) from xfade; those need filter chains or GL/HTML engines.

## 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/4040c86aea42/take-ffmpeg-xfade-reference.mp4 — circleclose between two shots, with the timeline strip of the edit. Footage: Cosmos Laundromat (2015), (CC) Blender Foundation | gooseberry.blender.org, CC BY 4.0; Big Buck Bunny (2008), (c) copyright 2008, Blender Foundation | www.bigbuckbunny.org, CC BY 3.0. (credit: Rendered by varg · Cosmos Laundromat (2015) + Big Buck Bunny (2008))

## More transitions skills

- [editly](https://varg.ai/how-to/skills/editly.md): Declarative JSON5 video editing CLI/API: clips, titles, transitions, audio mixing, rendered with ffmpeg.
- [Mix (Cross Dissolve)](https://varg.ai/how-to/skills/mix-dissolve.md): The two shots blend through each other. The quietest transition: "time passes" or "this continues".
- [Dip to Black](https://varg.ai/how-to/skills/black-fade.md): A fades to black, then B fades up. Marks the end of a section or a bigger jump in time.
- [White Flash](https://varg.ai/how-to/skills/white-flash.md): 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)](https://varg.ai/how-to/skills/pull-in-zoom.md): The camera rushes into shot A and lands, still moving forward, in shot B. The signature short-form transition.
- [Pull Out (Zoom Out)](https://varg.ai/how-to/skills/pull-out-zoom.md): The camera jerks backwards out of shot A and keeps pulling back as shot B settles in.
