>FFmpegLab Start free
FFmpeg Guide

FFmpeg xfade transitions: the complete guide

Everything you need to add smooth transitions between video clips with FFmpeg's xfade filter — syntax, timing, all 30+ presets, audio crossfades, and how to compose your own inside a filter_complex graph.

Stop memorizing FFmpeg flags. Start editing.

Free in your browser — nothing to install, nothing uploaded.

The FFmpeg xfade filter is the modern, built-in way to create a transition between two video streams — a crossfade, wipe, slide, or dissolve — entirely from the command line. Before xfade existed you had to hand-build dissolves with blend and fade; today a single filter does the job, and it ships with more than 30 transition presets out of the box.

Key takeaways

The basic xfade syntax

At minimum, xfade needs a transition type, a duration (how long the blend lasts, in seconds), and an offset (when the transition starts on the first clip's timeline). Here is a one-second crossfade that begins four seconds into clip_a:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i clip_a.mp4 -i clip_b.mp4 \
  -filter_complex \
  "[0:v][1:v]xfade=transition=fade:duration=1:offset=4[v]" \
  -map "[v]" out.mp4

The offset almost always trips people up: it is measured from the start of the first input, and it should equal the first clip's length minus the transition duration. If clip_a is 5 seconds long and you want a 1-second blend, set offset=4 so the fade ends exactly as the clip does.

All 30+ xfade transition presets

Swap the transition= value for any of these. They fall into a few families:

For example, a slick circleopen reveal that takes three quarters of a second:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
[0:v][1:v]xfade=
  transition=circleopen:
  duration=0.75:
  offset=3.0[v]

Crossfading the audio too with acrossfade

A video transition with a hard audio cut feels broken. Pair xfade with acrossfade so the soundtrack blends across the same window:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i clip_a.mp4 -i clip_b.mp4 -filter_complex "
  [0:v][1:v]xfade=transition=fade:duration=1:offset=4[v];
  [0:a][1:a]acrossfade=d=1[a]
" -map "[v]" -map "[a]" out.mp4

If you are mixing more than two audio sources rather than crossfading, reach for amix instead — we cover that in the filter_complex effects guide.

Chaining transitions across many clips

Because every xfade outputs a labeled stream, you can feed that output into the next transition. Three clips, two transitions:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i a.mp4 -i b.mp4 -i c.mp4 -filter_complex "
  [0:v][1:v]xfade=transition=slideleft:duration=1:offset=4[ab];
  [ab][2:v]xfade=transition=wipeup:duration=1:offset=9[v]
" -map "[v]" out.mp4

Note the second offset is cumulative: it is measured against the combined [ab] timeline, not clip C alone.

Common pitfalls

Doing this without memorizing flags

Hand-writing filter_complex graphs is powerful but unforgiving. FFmpegLab gives you a visual timeline on top and the real FFmpeg render script underneath: drag clips, pick from the 30+ xfade presets with a duration slider, and the exact command is generated for you — fully editable when you want to drop down to the graph. It runs offline in your browser, so your footage never leaves your machine, and the whole stack is self-hostable with Docker.

✦  Fresh from the render queue

Better FFmpeg workflows, delivered.

Get practical commands, new templates, and deep-dive guides for the edits that are usually hardest to get right.

✓  Copy-pasteable commands    ✓  Editor templates    ✓  No noise
One useful email at a time.

Stop memorizing FFmpeg flags. Start editing.

Free in your browser — nothing to install, nothing uploaded.