Video Transitions
Video transitions blend one VIDEO element into another using FFmpeg xfade. They are separate from enter/exit animations, which animate an element against transparency.
This page covers element-level VIDEO-to-VIDEO transitions on a single
timeline. For transitions between scenes, set transition on
the scene itself — see Transitions Between Scenes.
Both use the same xfade effects.
Requirements
Transitions apply only to VIDEO elements.
On the first clip:
- Set
id. - Set
transitionto a supported xfade effect. - Set
transitionDuration. - Set
transitionIdto the next clip'sid. - Coordinate timing so the clips overlap: the first clip's
exitEndequals the next clip'senterBeginplustransitionDuration.
On the next clip:
- Set a matching
id. - Set
enterBeginat the start of the overlap. The transition runs from this time throughenterBegin + transitionDuration.
Setting a transition does not move either clip. For a one-second fade between two five-second clips, use windows 0–5 and 4–9 and a nine-second project. The first clip is visible before 4, the fade runs from 4 to 5, and the second clip continues until 9.
Avoid combining an exit animation on the first transition clip or an enter animation on the later transition clip in the same handoff, because that competes with the transition.
Supported Effects
Transitions use the XFadeEffect source list, including fade, fadeblack, fadewhite, wipeleft, slideright, smoothleft, circlecrop, dissolve, pixelize, radial, hblur, and fadegrays.
Examples
These arrays are visual fragments for payload.visuals, not complete
render requests. All times are seconds. The recorded preview below uses a
smaller canvas and an eight-second project to demonstrate the same one-second
fade; its full payload is available with the preview.
Fade Transition
[
{
"type": "VIDEO",
"id": "clip1",
"src": "https://cdn.zvid.io/library/docs/sources/video-a.ad6c92b5d7a1.mp4",
"width": 1280,
"height": 720,
"enterBegin": 0,
"exitEnd": 5,
"transition": "fade",
"transitionId": "clip2",
"transitionDuration": 1
},
{
"type": "VIDEO",
"id": "clip2",
"src": "https://cdn.zvid.io/library/docs/sources/video-b.ba19bdbdd2dd.mp4",
"width": 1280,
"height": 720,
"enterBegin": 4,
"exitEnd": 9
}
]
{
"name": "docs-video-transition",
"width": 960,
"height": 540,
"duration": 8,
"backgroundColor": "#000000",
"visuals": [
{
"type": "VIDEO",
"id": "intro",
"src": "https://cdn.zvid.io/library/docs/sources/video-a.ad6c92b5d7a1.mp4",
"resize": "cover",
"width": 960,
"height": 540,
"volume": 0,
"enterBegin": 0,
"exitEnd": 4,
"transition": "fade",
"transitionId": "main",
"transitionDuration": 1
},
{
"type": "VIDEO",
"id": "main",
"src": "https://cdn.zvid.io/library/docs/sources/video-b.ba19bdbdd2dd.mp4",
"resize": "cover",
"width": 960,
"height": 540,
"volume": 0,
"enterBegin": 4,
"exitEnd": 8
}
]
}
Wipe Transition
[
{
"type": "VIDEO",
"id": "intro",
"src": "https://cdn.zvid.io/library/docs/sources/video-a.ad6c92b5d7a1.mp4",
"resize": "cover",
"enterBegin": 0,
"exitEnd": 5,
"transition": "wiperight",
"transitionId": "main",
"transitionDuration": 1
},
{
"type": "VIDEO",
"id": "main",
"src": "https://cdn.zvid.io/library/docs/sources/video-b.ba19bdbdd2dd.mp4",
"resize": "cover",
"enterBegin": 4,
"exitEnd": 9
}
]
Best Practices
- Keep transition durations between
0.3and2seconds for most videos. - Use clear IDs such as
intro,scene-2, andoutro. - Keep transition chains simple before adding many simultaneous overlays.
- Use
volume: 0on scene clips when a separate narration or music track should drive the audio.