Skip to content

Create sequence of images from svg files and later can be used to create various videos.

Notifications You must be signed in to change notification settings

fpermana/svgbuild-py3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVGBuild-py3

SVGBuild is an open source Python script originally created by Ed Halley. Source code is available for download from here http://halley.cc/code/?python/svgbuild.py.

Python2, Inkscape, and ImageMagick are needed to run that script. FFmpeg, avconv or similar tools could be used to create videos as final result.

This repository is modified version of the original one. I made some improvements such as removing external ImageMagick dependency, add several new options, optimize performance, etc.

Web app version also available here https://fpermana.id/svg-build.

Dependency

Usage

main.py [options] filename.svg

Options available via

main.py -h

Usage With Docker

docker build . -t svgbuild
docker run -itd --name svgbuild -v $(pwd)/svgs:/svgbuild-py3/svgs svgbuild
docker exec -it svgbuild sh

Examples

Below are several results with different options

main.py --build-path --detail-path --path-node-count=2 --use-object-color --zoom=4 inkscape-island-of-creativity.svg

Freedom Machine original file was downloaded from inkscape-island-of-creativity.svg

main.py --build-path --detail-path --circle-path --use-object-color --line-color="#FF0000" --page-view Inkscape_0.92_About_Screen_by_Rizky_Djati_Munggaran_aka_ridjam.svg

Freedom Machine original file was downloaded from Inkscape_0.92_About_Screen_by_Rizky_Djati_Munggaran_aka_ridjam.svg

main.py --build-path --detail-path --path-node-count 1 --page-view --show-camera-frame Hayley-williams-vector-popart-portrait.svg

Hayley Williams Vector Popart Portrait original file was downloaded from Hayley-williams-vector-popart-portrait.svg

FFMPEG

ffmpeg -nostdin -y -f image2 -i inkscape-island-of-creativity/inkscape-island-of-creativity%05d.png -vcodec libx264 -pix_fmt yuv420p  inkscape-island-of-creativity.mp4

.

ffmpeg -nostdin -y -f image2 -i Inkscape_0.92_About_Screen_by_Rizky_Djati_Munggaran_aka_ridjam_page/Inkscape_0.92_About_Screen_by_Rizky_Djati_Munggaran_aka_ridjam%05d.png -vcodec libx264 -pix_fmt yuv420p -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" Inkscape_0.92_About_Screen_by_Rizky_Djati_Munggaran_aka_ridjam.mp4

More Results

More samples and results with different options available here https://fpermana.id/svg-build.

Desktop GUI (Deprecated)

SVGBuild also available as desktop app that run on Linux and Windows here https://github.com/fpermana/SVGBuild-GUI. It requires PyQt4 to run the script.

License

The original script is licensed under Artistic License. This repository is under a GNU GPLv3 License.

About

Create sequence of images from svg files and later can be used to create various videos.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published