Skip to main content

Animation Effects

Animations are enter and exit effects for visual elements. They use FFmpeg xfade effects against transparent backgrounds.

Properties

PropertyDefaultNotes
enterBegin0Time when the enter animation starts.
enterEnd0Time when the element is fully visible.
exitBeginproject.durationTime when exit animation starts.
exitEndproject.durationTime when the element has disappeared.
enterAnimationnullSupported xfade effect name.
exitAnimationnullSupported xfade effect name.

Use an animation only when its end time is greater than its start time.

Supported Effects

The API accepts the XFadeEffect source list for enterAnimation, exitAnimation, and video transition.

Examples

Fade In And Out

{
"type": "TEXT",
"text": "Hello World",
"position": "center-center",
"enterBegin": 0,
"enterEnd": 1,
"exitBegin": 9,
"exitEnd": 10,
"enterAnimation": "fade",
"exitAnimation": "fade"
}

Quick SVG Animation

{
"type": "SVG",
"svg": "<svg width=\"200\" height=\"150\" viewBox=\"0 0 200 150\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"200\" height=\"150\" fill=\"#ff6b35\" /></svg>",
"x": 500,
"y": 200,
"enterBegin": 5,
"enterEnd": 5.5,
"exitBegin": 7,
"exitEnd": 7.3,
"enterAnimation": "dissolve",
"exitAnimation": "dissolve"
}

Troubleshooting

  • Animation not visible: ensure the duration is not zero.
  • Validation error: check the effect name against the supported list.
  • Choppy output: reduce simultaneous animated elements or use simpler effects.