render_svg_to_video
Convert animated SVGs from files or raw code into MP4, WebM, MKV, MOV, GIF, or aPNG videos with optional transparency.
Instructions
Render an animated SVG (from file path or raw SVG code) into a high-quality video (MP4, WebM, MKV, MOV) or animated image (aPNG, GIF) with optional background 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 for the generated media file. Defaults to current working directory. | |
| 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 (if svgFilePath is not provided). | |
| svgFilePath | No | Absolute or relative path to the input .svg file. | |
| transparent | No | Render with full alpha-channel transparency (supported for webm, gif, apng, mov). |