Render video to file
render_video_to_fileRender HTML animation to MP4 file saved directly to disk. Specify output path, dimensions, bitrate, and frame rate for integration with other tools.
Instructions
Same as render_video but saves the resulting MP4 directly to a file path on disk instead of returning base64. Useful for integrating with other tools or when dealing with large videos.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Complete HTML document. | |
| output_path | Yes | Absolute path where the MP4 file should be saved. | |
| width | No | Video width in pixels (default: 540). | |
| height | No | Video height in pixels (default: 960). | |
| bitrate | No | FFmpeg bitrate (default: '5M'). | 5M |
| frame_rate | No | Frame rate (default: 60). | |
| max_duration | No | Maximum render duration in seconds (default: 12). |