SVG to Video
v0.44.1Convert animated SVG (CSS/SMIL) to video (MP4/WebM) or image (GIF/aPNG) with in-band delivery.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
render_svg_to_video
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.
| Parameter | Type | Description |
|---|---|---|
bgColor | string | Background color hex code (e.g. #ffffff). When transparent is true, acts as a keying/matting color for formats requiring color keying (e.g. gif). |
bitrate | string | Target video bitrate (e.g. 5M, 2000k) for video formats (MP4, WebM, MOV, MKV). Optional; if omitted, format default rate control is used. |
crf | number | Constant Rate Factor (0-63) for video formats (e.g. 18-28). Optional; defaults to 20 for MP4/MKV when bitrate is omitted. |
duration | number | Desired animation duration in seconds. If omitted, duration is auto-detected. |
format | string | Output media format. Defaults to webm if transparent is true, otherwise mp4. |
fps | number | Frames per second (e.g. 24, 30, 60). Default: 60. |
hold | number | Seconds to freeze the last frame at the end of the video. |
loop | Loop control for animated formats (GIF, aPNG). Accepts an integer loop count (0 = infinite [default], 1 or -1 = play once, N = loop count) or boolean (false = play once, true = infinite). | |
outDir | string | Output directory to preserve generated file locally. Omit to deliver purely in-band via ephemeral storage. |
quality | number | Quality level (1-100) for animated exports (GIF palette generation max colors, APNG compression). Optional; defaults to max quality (100) if omitted. |
resolution | string | Resolution preset (original, 1080p, 720p) or formatted dimension string (e.g. 1080x1080, 1080x1920). Default: original. |
scale | number | Scale factor (1-4) when using original resolution. Default: 1. |
svgContent | string | Raw SVG XML string content. |
svgFilePath | string | Path to the input .svg file (required if svgContent is not provided). |
transparent | boolean | Render with full alpha-channel transparency (supported for webm, gif, apng, mov). |
inspect_svg_animation
Analyze an SVG file or raw SVG content to detect CSS keyframe animations, estimate duration, and extract viewBox dimensions. Call this tool first before rendering to discover animation parameters and calculate optimal resolution.
| Parameter | Type | Description |
|---|---|---|
svgContent * | string | Raw SVG XML string content. |
svgFilePath | string | Path to the input .svg file (required if svgContent is not provided). |