Video templates are in beta. The editor, the API, and the SDK methods can still change.
How a video template works
A video template is a template with a timeline. Each top-level layer has a start and an end on the timeline, and up to one animation of each kind:
Text reveal, Typewriter, and Count up are for text layers. Ken Burns is for images and video layers.
On a text layer, an Enter or Exit preset can animate each word or each letter in turn, in place of the whole layer. Set Animate by to Word or Letter, then set Stagger: the share of the animation between the start of the first word or letter and the start of the last one. At 0%, all of them move together.
A video can also have audio tracks (music, a voice over, sound effects), and video layers that play a clip with its sound.
Each preset has an easing: Linear, Ease in, Ease out, Ease in and out, the back curves (Ease in back, Ease out back, Ease in and out back) that go a little past the end, Hold, and the springs Gentle, Quick, Bouncy, and Slow.
Design a video
- Click New template, then Blank video. The editor opens a 1080 by 1920 canvas with a 5-second timeline at 30 fps.
- Add layers as in an image template: text, images, shapes, and frames. To add a clip, use Objects → Video, or drop a video file on the canvas.
- Drag the bars on the timeline to set when each layer starts and ends. Hold Shift to snap an edge to the playhead.
- Select a layer and open the Motion tab of the right panel. Set its timing, then pick an Enter, Exit, Ambient, or Behavior preset and its easing. Point at a preset to see it on the layer before you pick it. Start after makes a layer start when another layer ends.
- With no layer selected, the Motion tab sets the duration (up to 60 seconds) and the frame rate (24, 25, 30, or 60 fps). You can also type the duration on the timeline, or drag the end of the video on its ruler.
- Press play to watch the video. Play once, Loop, and Ping-pong set what the preview does at the end.
Add audio
Drop audio files on the canvas or on the timeline, or click Add audio in the Motion tab. Each file becomes an audio track that starts at the playhead, or where you drop it on the timeline, and lasts as long as the file.- Drag a track to move it in time, or drag its edges to trim it. The start edge trims the file too, so each sound stays at its time.
- Click the speaker of a track to mute it.
- Select a track and press Alt+K (Option+K on a Mac) to split it at the playhead. Press Delete to remove it.
- The right panel of a selected track sets its name, its file, its volume, a fade in and a fade out, where the file starts, and the loop.
Work on the timeline
- Type a time in the current time or the duration of the timeline, as
0:01.50or as seconds. - Zoom the timeline with its slider, or with Ctrl or Cmd and the mouse wheel. On a trackpad, pinch.
- Drag the top edge of the timeline to make it taller.
- Click the arrow next to a layer to show a bar for each of its animations. Drag the end of an Enter bar or the start of an Exit bar to change its duration. Drag a Behavior bar to move it, or its edges to change it. An Ambient bar lasts the whole layer.
Render a video
Send aPOST request to /v1/templates/renderVideo with the template id and your modifications:
id identifies the video:
- A modification with the name of a video layer and a
srcchanges the clip of that layer. - A modification with the name of an audio track and a
srcchanges the file of that track. The track keeps its time, volume, and fades. In this example, the template has an audio track namedmusic.
Follow the progress
A render takes longer than an image, and a video can wait in line for a renderer. Add?stream=true to get server-sent events while it renders:
Start a video without waiting
Add?wait=false to get the id of the video at once. This is useful when your server cannot keep a connection open for the whole render:
202:
Read a video again
A video renders to its end also when the connection drops. Use itsid from the created event to read it again:
Add
&stream=true to get the events again, from the latest one. Do not send the renderVideo request again: it renders, and counts, a second video.
The SDKs read these events for you, and read the video again when the connection drops. See the JavaScript, PHP, Go, and Python guides.