Is there a way to convert svg files to png using ffmpeg on Windows 10 64bit?

I obviously tried ffmpeg -i "file.svg" "file.png" and it doesn't work by default.

Perhaps there is something to do that would make it work? Couldn't find anything for win10.

Something users can do using --enable-librsvg perhaps? Is there a command? Or do you have to download something?


If not ffmpeg, anything that works on win10 is welcomed, as long as I can convert lots of svg files at once.

  • 1
    Can you edit your question and explain why this conversion must be done with ffmpeg, or, if not, what tools would be acceptable (e.g. anything FLOSS that runs in Windows 10).
    – bitinerant
    Jan 30, 2021 at 1:05
  • @bitinerant done
    – goldnick7
    Jan 30, 2021 at 1:55
  • Have you tried IrfanView? It's as close a thing as there is to a universal image viewer/editor for Windows, and should be able to open SVG files and save them as PNG. Jan 30, 2021 at 2:23
  • ffmpeg requires to be compiled with --enable-librsvg. Unfortunately I do not see this included in the pre-compiled ffmpeg executables for Windows provided by Gyan or BtbN. So you would have to compile it yourself or ask one of them to include it. (Looks like someone already asked Gyan).
    – llogan
    Jan 30, 2021 at 18:20
  • 1
    Refer to this answer may it will help you. superuser.com/a/260071/1073152
    – HarshShah
    Feb 2, 2021 at 6:08

1 Answer 1


You best bet is to use Inkscape's command-line mode:

"C:\Program Files\Inkscape\bin\inkscape.exe" -o compass.png -w 1440 compass.svg

Full manpage here:


From what I can tell, to do many images at once will require wrapping it in a loop in a batch file. Maybe something like:

FOR %%I in (*.svg) DO "C:\Program Files\Inkscape\bin\inkscape.exe" -o %%~nI.png -w 1440 %%I


You can also use Inkscape's --shell mode:

The input file (let's call it input.txt) should look something like this:


Put as many input and output files into it as you'd like (though I found around 300 files was as much as I was comfortable doing at once, since sometimes it hangs). The SVG files have to exist already, and the PNG files will be created.

And you run it something like:

cd /path/to/folder/with/svgs
cat input.txt | inkscape --shell

Or, for Windows:

cd C:\path\to\folder\with\svgs
type input.txt | inkscape.exe --shell

What I actually ended up doing was putting it in a Python module. Single-threaded version:


Multi-threaded version that runs multiple Inkscape instances in parallel in order to take advantage of multiple cores, since Inkscape itself seems to be limited to a single core:


I used this Python module to process almost a million SVGs for this video series:


  • Works! 1. Downloaded & Installed Inkscape 2. Tested both commands and both worked at first try. Thanks!
    – goldnick7
    May 5, 2021 at 15:48
  • FWIW, I've since found a much faster way using Inkscape's shell mode. You create a text file with one line per SVG, where each line is "file-open:filename01.svg;export-filename:filename01.png;export-do;file-close;". You then pipe the text file into "inkscape.exe --shell" with something like "type svg_commands.txt | inkscape.exe --shell". I converted a couple of million fairly complex SVGs with a Python version of this, in batches of a few hundred at a time, at a rate of about 1 per second. Dec 23, 2021 at 22:25
  • could you add all the batch files and the instructions.txt in a ZIP .. then upload it and share link? Otherwise maybe share a video showing the steps? Or make a post somewhere (google docs, reddit, pastebin) ... if it's easy... otherwise nvm... I rarely need to deal with svg files... your original solution is good enough for me.
    – goldnick7
    Dec 24, 2021 at 0:03
  • I'm in the middle of other projects right now, but I'll keep that in the back of my mind as something I could do when I get the time. Thanks for the suggestion. Dec 24, 2021 at 16:33
  • I'm also interested in seeing this. Please post
    – Артем
    Jan 12 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .