can anyone point out to me, how to make a slideshow (with ffmpeg) with svg images. The usual way,
ffmpeg -i bloch_0%2d.svg bloch2.mp4
doesn't work since ffmpeg can't handle svg files obviously (Invalid data found when processing input) is there an easy way to do this?
thanks
First convert the SVG images to a raster format, such as PNG or JPEG. If your SVG editor does not support exporting to a raster format, this can be done using ImageMagick's convert command:
convert bloch_*.svg bloch_%03d.png
Note: For the best SVG support, ensure that ImageMagick was compiled to use the RSVG library. Details
Next, convert the raster images to H.264 in MP4 using ffmpeg:
ffmpeg -r 1 -i bloch_%03d.png -pix_fmt yuv420p bloch2.mp4
The -r 1 option sets the frame rate of the input to 1 frame per second, but you can set it to whatever you like depending on whether these are independent images or a continuous animation of some sort.
The -pix_fmt yuv420p is not required, however PNG color is not subsampled. H.264 video can support non-subsampled color with a specialized profile, but most players only support 4:2:0 color subsampling, so you will probably want to convert it to 4:2:0. JPEG normally uses 4:2:0 so if your input is JPEG then you would not normally need this option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With