Video Transitions
Complete guide to video transitions in the Zvid Package, including smooth transitions between video clips and advanced timing control.
Overview
Video transitions create smooth visual changes between video clips using FFmpeg's xfade filter. Unlike animations that transition between transparent backgrounds and elements, transitions blend one video directly into another, creating professional video sequences.
How Transitions Work
The transition system:
- Groups Related Videos: Videos with transition effects are grouped together
- Creates Base Canvas: Each video is overlaid on a transparent canvas
- Applies XFade Effects: Uses FFmpeg's xfade filter to blend between videos
- Manages Timing: Coordinates transition timing with video enter/exit times
Timing Properties
| Property | Type | Default | Description |
|---|---|---|---|
enterBegin | number | 0 | Start time for entrance (seconds) |
enterEnd | number | 0 | End time for entrance animation (seconds) |
exitBegin | number | project.duration | Start time for exit animation (seconds) |
exitEnd | number | project.duration | End time for exit (seconds). Must equal the enterBegin of the next video element for transitions |
Transition Feature for Video Elements
To enable transitions between two video elements, specific properties must be defined in the JSON structure. Here’s how it works:
-
Applicable to Video Elements Only:
Thetransitionfeature is available exclusively for elements with"type": "VIDEO". Other element types like IMAGES, TEXTS, or GIFS do not support transitions. -
Defining the Transition:
On the first video element:transition: Specifies the type of transition effect (e.g.,"fade","wipe","slide").transitionId: Theidof the next video element that will be used for the transition.transitionDuration: Duration (in seconds) of the transition effect.- Important: The
exitEndof this video must equal theenterBeginof the next video.
-
Second Video Element Requirements:
The second video, identified bytransitionId, should be a standard video element with at least atype,src, andid.
Example:{
"type": "VIDEO",
"src": "https://cdn.pixabay.com/video/2025/06/03/283533_large.mp4",
"id": "clip1",
"transition": "fade",
"transitionId": "clip2",
"transitionDuration": 2,
"enterBegin": 0,
"exitEnd": 5
},
{
"type": "VIDEO",
"src": "https://cdn.pixabay.com/video/2025/06/09/284566_large.mp4",
"id": "clip2",
"enterBegin": 5,
"exitEnd": 10
}
fadeblack - Fade through black
{
transition: "fadeblack",
}
fadewhite - Fade through white
{
transition: "fadewhite",
}
fadegrays - Fade through grayscale
{
transition: "fadegrays",
}
Wipe Transitions
wipeleft, wiperight, wipeup, wipedown - Directional wipes
{
transition: "wiperight", // Wipes from left to right
}
wipetl, wipetr, wipebl, wipebr - Diagonal wipes
{
transition: "wipetl", // Wipes from top-left
}
Slide Transitions
slideleft, slideright, slideup, slidedown - Slide effects
{
transition: "slideright", // Slides to the right
}
smoothleft, smoothright, smoothup, smoothdown - Smooth slides
{
transition: "smoothleft",
}
Shape Transitions
circlecrop - Circular transition
{
transition: "circlecrop",
}
rectcrop - Rectangular transition
{
transition: "rectcrop",
}
circleopen / circleclose - Circle opening/closing
{
transition: "circleclose",
}
horzopen / horzclose - Horizontal opening/closing
{
transition: "horzclose",
}
vertopen / vertclose - Vertical opening/closing
{
transition: "vertopen",
}
Diagonal Transitions
diagbl, diagbr, diagtl, diagtr - Diagonal effects
{
transition: "diagbr", // Diagonal bottom-right
}
Slice Transitions
hlslice / hrslice - Horizontal slices
{
transition: "hlslice", // Horizontal slice left
}
vuslice / vdslice - Vertical slices
{
transition: "vuslice", // Vertical slice up
}
Creative Transitions
dissolve - Dissolve effect
{
transition: "dissolve",
}
pixelize - Pixelation transition
{
transition: "pixelize",
}
radial - Radial wipe
{
transition: "radial",
}
hblur - Horizontal blur
{
transition: "hblur",
}
distance - Distance-based transition
{
transition: "distance",
}
These transitions are not yet supported: squeezeh, squeezev, hlwind, hrwind, vuwind, vdwind, coverleft, coverright, coverup, coverdown, revealleft, revealright, revealup, revealdown, and zoomin
Examples
Simple Fade Transition
// First video
{
type: "VIDEO",
src: "https://cdn.pixabay.com/video/2025/06/03/283533_large.mp4",
width: 1280,
height: 720,
exitEnd: 5,
transition: "fade",
transitionId: "main",
transitionDuration: 2
},
{
type: "VIDEO",
src: "https://cdn.pixabay.com/video/2025/06/09/284566_large.mp4",
width: 1280,
height: 720,
enterBegin: 5,
enterEnd: 10,
id: "main"
}
Wipe Transition
// First video
{
type: "VIDEO",
src: "https://cdn.pixabay.com/video/2025/06/03/283533_large.mp4",
width: 1280,
height: 720,
exitEnd: 5,
transition: "wiperight",
transitionId: "main",
transitionDuration: 2
},
{
type: "VIDEO",
src: "https://cdn.pixabay.com/video/2025/06/09/284566_large.mp4",
width: 1280,
height: 720,
enterBegin: 5,
enterEnd: 10,
id: "main"
}
Best Practices
Transition Design
- Consistency: Use similar transition styles for related content
- Duration: Match transition duration to content pace (0.3-2 seconds typical)
- Direction: Use logical directions that guide viewer attention
- Content Matching: Choose transitions that complement the video content
Technical Guidelines
- Timing Coordination: Ensure that the exit of the previous item is the same as enter of the next item.
- Duration Matching: Exit and enter transition durations should match
- ID Management: Use clear, descriptive IDs for transition linking
- Performance: Longer transitions require more processing time
Visual Considerations
- Content Continuity: Ensure transitions don't disrupt narrative flow
- Color Matching: Consider color relationships between transitioning videos
- Motion Direction: Align transition direction with video content motion
- Viewer Attention: Use transitions to guide where viewers should look
Common Transition Patterns
News/Documentary Style
// Professional, clean transitions
{
transitionDuration: 1.5;
}
Music Video Style
// Quick, rhythmic transitions
{
transitionDuration: 0.3;
}
Corporate/Business
// Smooth, professional transitions
{
transitionDuration: 2;
}
Creative/Artistic
// Unique, eye-catching transitions
{
transitionDuration: 2.5;
}
Action/Sports
// Dynamic, energetic transitions
{
transitionDuration: 0.8;
}
Troubleshooting
Common Issues
- Transition Not Working: Check ID linking and timing coordination
- Choppy Transitions: Increase transition duration or check video quality
- Performance Issues: Reduce transition complexity or duration
Debugging Tips
- ID Verification: Ensure
transitionIdmatches the next source video'sid - Timing Check: Verify overlap between exit and enter times
- Duration Consistency: Match transition durations between linked videos
- Group Validation: Check that transition chains are properly formed
Transition vs Animation
When to Use Transitions
- Video-to-Video: Smooth changes between video clips
- Narrative Flow: Maintaining story continuity
- Professional Look: Creating polished video sequences
When to Use Animations
- Element Entrance/Exit: Bringing elements in/out of frame
- Text Effects: Animating text appearance
- Overlay Elements: Animating graphics over video
Related Pages
- Video Elements - Video element properties and configuration
- Animation Effects - Element animations vs transitions
- Audio Elements - Audio transitions and mixing
Next Steps
- Video Elements - Learn more about video configuration
- Animation Effects - Understand the difference between animations and transitions