Animation Effects
Complete guide to animation effects in the Zvid Package, including entrance and exit animations for all visual elements.
Overview
Animation effects allow you to add smooth entrance and exit animations to any visual element (text, images, videos, and SVGs). The animation system uses FFmpeg's xfade filter to create professional-looking transitions that enhance the visual appeal of your videos.
How Animations Work
The animation system creates smooth transitions by:
- Entrance Animations: Transitioning from a transparent background to your element
- Exit Animations: Transitioning from your element to a transparent background
- Timing Control: Using
enterBegin,enterEnd,exitBegin, andexitEndproperties - FFmpeg Integration: Leveraging FFmpeg's powerful xfade filter for smooth effects
Animation Properties
Timing Properties
| Property | Type | Default | Description |
|---|---|---|---|
enterBegin | number | 0 | When element starts appearing (seconds) |
enterEnd | number | 0 | When entrance animation completes (seconds) |
exitBegin | number | project.duration | When exit animation starts (seconds) |
exitEnd | number | project.duration | When element completely disappears (seconds) |
Animation Properties
| Property | Type | Default | Description |
|---|---|---|---|
enterAnimation | string | null | null | Entrance animation effect name |
exitAnimation | string | null | null | Exit animation effect name |
Available Animation Effects
All supported animation effects are listed on the official FFmpeg xfade page.
These animations are not yet supported: squeezeh, squeezev, hlwind, hrwind, vuwind, vdwind, coverleft, coverright, coverup, coverdown, revealleft, revealright, revealup, revealdown, zoomin, and distance
Fade Animations
fade - Standard fade in/out
{
enterAnimation: "fade",
exitAnimation: "fade",
enterBegin: 0,
enterEnd: 1, // 1-second fade in
exitBegin: 9, // Start fading out at 9s
exitEnd: 10 // Complete fade out at 10s
}
fadeblack - Fade through black
{
enterAnimation: "fadeblack",
exitAnimation: "fadeblack"
}
fadewhite - Fade through white
{
enterAnimation: "fadewhite",
exitAnimation: "fadewhite"
}
fadegrays - Fade through grayscale
{
enterAnimation: "fadegrays",
exitAnimation: "fadegrays"
}
Slide Animations
slideleft - Slide from/to left
{
enterAnimation: "slideleft", // Slides in from left
exitAnimation: "slideleft" // Slides out to left
}
slideright - Slide from/to right
{
enterAnimation: "slideright",
exitAnimation: "slideright"
}
slideup - Slide from/to top
{
enterAnimation: "slideup",
exitAnimation: "slideup"
}
slidedown - Slide from/to bottom
{
enterAnimation: "slidedown",
exitAnimation: "slidedown"
}
Smooth Slide Animations
smoothleft, smoothright, smoothup, smoothdown - Smoother slide transitions
{
enterAnimation: "smoothleft",
exitAnimation: "smoothright" // Can mix different directions
}
Wipe Animations
wipeleft, wiperight, wipeup, wipedown - Wipe effects
{
enterAnimation: "wiperight", // Wipes in from right
exitAnimation: "wipeleft" // Wipes out to left
}
wipetl, wipetr, wipebl, wipebr - Diagonal wipes
{
enterAnimation: "wipetl", // Wipe from top-left
exitAnimation: "wipebr" // Wipe to bottom-right
}
Shape Animations
circlecrop - Circular reveal/hide
{
c;
}
rectcrop - Rectangular reveal/hide
{
enterAnimation: "rectcrop",
exitAnimation: "rectcrop"
}
circleopen / circleclose - Circle opening/closing
{
enterAnimation: "circleopen",
exitAnimation: "circleclose"
}
horzopen / horzclose - Horizontal opening/closing
{
enterAnimation: "horzopen",
exitAnimation: "horzclose"
}
vertopen / vertclose - Vertical opening/closing
{
enterAnimation: "vertopen",
exitAnimation: "vertclose"
}
Diagonal Animations
diagbl, diagbr, diagtl, diagtr - Diagonal transitions
{
enterAnimation: "diagtl", // Diagonal from top-left
exitAnimation: "diagbr" // Diagonal to bottom-right
}
Slice Animations
hlslice / hrslice - Horizontal slices
{
enterAnimation: "hlslice", // Horizontal slice left
exitAnimation: "hrslice" // Horizontal slice right
}
vuslice / vdslice - Vertical slices
{
enterAnimation: "vuslice", // Vertical slice up
exitAnimation: "vdslice" // Vertical slice down
}
Creative Effects
dissolve - Dissolve effect
{
enterAnimation: "dissolve",
exitAnimation: "dissolve"
}
pixelize - Pixelation effect
{
enterAnimation: "pixelize",
exitAnimation: "pixelize"
}
radial - Radial wipe
{
enterAnimation: "radial",
exitAnimation: "radial"
}
hblur - Horizontal blur
{
enterAnimation: "hblur",
exitAnimation: "hblur"
}
Examples
Simple Fade Animation
{
type: "TEXT",
text: "Hello World",
x: 640, y: 360,
enterBegin: 0,
enterEnd: 1, // 1-second fade in
exitBegin: 9,
exitEnd: 10, // 1-second fade out
enterAnimation: "fade",
exitAnimation: "fade"
}
Quick Animation
{
type: "SVG",
svg: "<svg width=\"200\" height=\"150\" viewBox=\"0 0 200 150\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"0\" y=\"0\" width=\"200\" height=\"150\" fill=\"#ff6b35\" /></svg>",
x: 500, y: 200,
enterBegin: 5,
enterEnd: 5.5, // 0.5-second quick entrance
exitBegin: 7,
exitEnd: 7.3, // 0.3-second quick exit
enterAnimation: "dissolve",
exitAnimation: "dissolve"
}
Best Practices
Animation Design
- Consistency: Use similar animation styles throughout your video
- Timing: Match animation speed to content pace
- Direction: Use logical directions (entrance from one side, exit to opposite)
- Duration: Keep animations between 0.3-2 seconds for best effect
Visual Guidelines
- Entrance Direction: Consider where viewer attention should come from
- Exit Direction: Plan where attention should go next
- Element Hierarchy: More important elements can have more dramatic animations
- Content Relationship: Related elements can use similar animations
Common Animation Combinations
Professional Presentation
// Title: Dramatic entrance, subtle exit
{
enterAnimation: "slidedown",
exitAnimation: "fade"
}
// Content: Smooth entrance and exit
{
enterAnimation: "fade",
exitAnimation: "fade"
}
Social Media Style
// Quick, energetic animations
{
enterAnimation: "slideright",
exitAnimation: "slideleft",
}
Creative/Artistic
// Unique, eye-catching effects
{
enterAnimation: "dissolve",
exitAnimation: "pixelize",
enterBegin: 0,
enterEnd: 2, // Longer, more artistic timing
exitBegin: 5,
exitEnd: 7
}
Troubleshooting
Common Issues
- Animation Not Visible: Check timing properties and ensure
enterEnd > enterBegin - Choppy Animation: Increase animation duration or simplify effects
- Timing Conflicts: Ensure animations don't overlap unintentionally
- Performance Issues: Reduce simultaneous animations
Animation Tips
- Preview: Test animations with different durations to find the right feel
- Coordination: Plan animation timing with audio and other elements
- Accessibility: Ensure content is readable even during animations
Related Pages
- Text Elements - Animating text content
- Image Elements - Animating images
- Video Elements - Video animations vs transitions
- Transitions - Video-to-video transitions
Next Steps
- Transitions - Learn about video transition effects
- Text Elements - Apply animations to text