A wrapper that uses PhantomJS and FFmpeg to take an animated SVG file and convert it to an MP4 with a few parameters.
Also included is a similar PhantomJS script (svg-to-png.js
) that creates a numbered PNG sequence which you can important into a video editor or whatnot.
I wanted to use LibreOffice Impress to generate animated text and diagrams for use in videos. Impress can export animated SVG but my video editor of choice, Blender VSE, only imports raster video formats.
- PhantomJS
- FFmpeg
- Perl
You can get them on Debian-based systems like Ubuntu with:
sudo apt install phantomjs ffmpeg
"Inspired" by:
zlib
- Reduce PNG compression to make frame export faster
- Other FFmpeg options?