render_svg_to_video
Converts animated SVG from code or file into MP4, WebM, MKV, MOV, aPNG, or GIF with transparency and Base64 delivery.
Instructions
Render an animated SVG (from raw SVG code or file path) into a high-quality video (MP4, WebM, MKV, MOV) or animated image (aPNG, GIF) with in-band Base64 media delivery. Use this tool when you need to convert animated SVG graphics into video or image files. First use inspect_svg_animation to detect duration and dimensions if unknown. Specify svgContent for raw XML input or svgFilePath for local files. Pass transparent: true for WebM/GIF/aPNG transparency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second (e.g. 24, 30, 60). Default: 60. | |
| hold | No | Seconds to freeze the last frame at the end of the video. | |
| scale | No | Scale factor (1-4) when using original resolution. Default: 1. | |
| format | No | Output media format. Defaults to webm if transparent is true, otherwise mp4. | |
| outDir | No | Output directory to preserve generated file locally. Omit to deliver purely in-band via ephemeral storage (forbidden in hosted sandboxed mode). | |
| bgColor | No | Background color hex code (e.g. #ffffff). Cannot be used with transparent. | |
| duration | No | Desired animation duration in seconds. If omitted, duration is auto-detected. | |
| resolution | No | Resolution preset. Default: original. | original |
| svgContent | No | Raw SVG string content to render (required if svgFilePath is not provided). | |
| svgFilePath | No | Absolute or relative path to the input .svg file (forbidden in hosted sandboxed mode). | |
| transparent | No | Render with full alpha-channel transparency (supported for webm, gif, apng, mov). |