Render an animation to a WebM video
riv_render_videoRender Rive (.riv) animations or state machines to WebM video files, with control over duration, frame rate, size, and background.
Instructions
Render a .riv animation (or state machine) to a real-time WebM video using canvas.captureStream() + MediaRecorder (VP9, falls back to VP8/generic webm). Default duration is one loop of the animation (2s for a bare state machine or when the animation's length can't be determined).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | captureStream() frame rate (default 30) | |
| out | No | Output .webm path (default: alongside the .riv) | |
| path | Yes | Path to the .riv file | |
| width | No | ||
| height | No | ||
| artboard | No | ||
| duration | No | Seconds to record (default: one animation loop, or 2s) | |
| animation | No | ||
| background | No | CSS background color (default: transparent) | |
| stateMachine | No |