Render video
render_videoRender a complete HTML document with CSS animations and JavaScript to an MP4 video. Uses Chromium and FFmpeg for capture and encoding.
Instructions
Render HTML, CSS, and JavaScript code to an MP4 video using Chromium (headless) and FFmpeg. Supports CSS animations, WAAPI, SVG, and canvas animations. Returns the video as base64-encoded MP4.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Complete HTML document including DOCTYPE, <html>, <head>, <body>, and any inline CSS/JS. | |
| width | No | Video width in pixels (default: 540). | |
| height | No | Video height in pixels (default: 960). | |
| bitrate | No | FFmpeg bitrate (default: '5M'). Examples: '2M', '10M'. | 5M |
| frame_rate | No | Frame rate for capture and encoding (default: 60). | |
| max_duration | No | Maximum render duration in seconds (default: 12). | |
| min_duration | No | Minimum render duration in seconds (default: 0.35). |