render_video
Render page animation timelines to MP4 video, with optional narration, background music, and subtitles, producing deterministic frame output.
Instructions
Render a page's animation timelines to an MP4 video. The page's scripts must expose window.__timelines — objects with duration() and pause(t) (a paused gsap.timeline registered there works as-is). Each frame seeks every timeline to t=i/fps and paints the viewport, so the output is deterministic — no wall clock in the pixel values. Audio: narration[] places TTS/voice clips at start times (mixed into one AAC track), audio adds looped background music, and subtitles_srt muxes an SRT as a soft mov_text track and (by default, burn_subtitles: false to opt out) burns the same cues into the frame pixels — QuickTime, WeChat and most social embeds ignore the soft track. Requires ffmpeg on the server. Returns base64 MP4 (H.264, yuv420p) plus frame count and durations.
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": {
"url": "<url>"
},
"name": "render_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second. Default 24. | |
| url | Yes | Page URL whose scripts register timelines in `window.__timelines` (GSAP-style objects with `duration()` + `pause(t)`). | |
| audio | No | Background music: looped to cover the video, volume-scaled, faded out at the tail. | |
| width | No | Viewport width in CSS pixels (floored to even — yuv420p). Default 1280. | |
| height | No | Viewport height in CSS pixels. Default 720. | |
| narration | No | Voiceover clips, each starting at its own time (any TTS output; mixed into one AAC track). | |
| use_proxy | No | Route through proxy (for blocked foreign sites) | |
| subtitles_srt | No | Inline SRT subtitles muxed as a soft (toggleable) mov_text track. | |
| burn_subtitles | No | Burn the cues into the frame pixels too (hardsub) — on by default when `subtitles_srt` is present; QuickTime, WeChat and most social embeds ignore the soft mov_text track. `false` keeps the soft track only. | |
| hold_tail_secs | No | Freeze the final timeline state for this many extra seconds. Default 0.5. | |
| tls_fingerprint | No | TLS fingerprint override (stealth mode only) | |
| max_duration_secs | No | Safety cap on timeline + hold tail, seconds. Default 120. | |
| wait_timelines_ms | No | How long to wait for `window.__timelines` to appear, ms. Default 10000. | |
| subtitles_language | No | ISO language tag for the subtitle track, e.g. "eng" / "zh". |