render_html_video
Convert animated HTML documents (CSS, JS, canvas) to MP4, GIF, or WebM video. Captures frame-by-frame without quality loss, supporting up to 4K resolution and 5–60 fps.
Instructions
Render an HTML document (CSS / JS / canvas animation) to mp4/gif/webm.
Use this to export a self-contained animated HTML page (e.g. one you just
designed) as a shareable clip. Captures the animation frame-by-frame
(full color, no dropped frames, no quality loss) and encodes a
color-correct H.264 MP4 / VP9 WebM / palette GIF — up to 4K, 5-60 fps.
Returns the absolute path to the encoded file, written under the bundle
directory. Requires the optional render extra (Playwright) + ffmpeg.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"html": "<html>"
},
"name": "render_html_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| html | Yes | ||
| width | No | ||
| format | No | mp4 | |
| height | No | ||
| duration_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |