record_clip
Render a video clip from HTML/CSS/JS or a URL by playing it headlessly at a set size and duration, then save it as MP4, WebM, or GIF. Defaults to 1080x1920 vertical for Shorts, TikTok, and Reels.
Instructions
Render a video clip from code: pass a complete HTML document (CSS/JS/canvas/SVG animation) or a URL; it is played headlessly at the given size for durationMs and saved as mp4/webm/gif. Default 1080x1920 (vertical, Shorts/TikTok/Reels). If the page defines window.startClip(), it is called when recording begins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| url | No | ||
| html | No | ||
| name | No | File name inside the clips folder | |
| width | No | ||
| format | No | mp4 | |
| height | No | ||
| output | No | Explicit output path (overrides name) | |
| durationMs | No | ||
| readySelector | No | Wait for this selector before starting the clock | |
| resourceWaitMs | No |