How to convert SMIL-SVG animated file to sequence of frame-by-frame separated SVG files?

206 views Asked by At

I have smil-svg animated file generated by enve https://github.com/MaurycyLiebner/enve and want to convert it to svg sequence.

Here is an example of enve output.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with enve https://maurycyliebner.github.io -->

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1920 1080">
 <rect width="1920" height="1080" fill="#ffffff"/>
 <g transform="translate(1056.79 532.066)">
  <g>
   <animateTransform dur="8.33333s" repeatCount="indefinite" type="translate" attributeName="transform" calcMode="spline" values="-1031.4 0;-1031.4 0;-1031.4 0;1235.15 0;1235.15 0" keyTimes="0;0;0.00020754;0.15;1" keySplines="0 0 1 1;0.331764 0.667159 0.6651 1;0.205076 0 0.833479 0.963957;0 0 1 1"/>
   <g>
    <animateTransform dur="8.33333s" repeatCount="indefinite" type="translate" attributeName="transform" calcMode="spline" values="0 184.373;0 184.373;0 -276.467;0 595.761;0 -48.4465;0 -48.4465" keyTimes="0;0;0.0258113;0.12246;0.15;1" keySplines="0 0 1 1;0.236528 0.733325 0.586247 1;0.294706 0 0.711056 1;0.442917 2.22045e-16 0.800529 0.258159;0 0 1 1"/>
    <g transform="rotate(0)">
     <g transform="scale(1 1)">
      <g transform="skewX(0) skewY(0)">
       <g opacity="1" transform="translate(-1056.79 -532.066)">
        <path stroke-width="1" fill="#000000" stroke="none">
         <animate dur="8.33333s" repeatCount="indefinite" attributeName="d" calcMode="spline" values="M737.851 664.176C737.851 664.176 737.851 598.121 737.851 532.066C737.851 466.011 737.851 399.956 737.851 399.956C737.851 399.956 737.851 213.124 737.851 213.124C737.851 213.124 924.683 213.124 924.683 213.124C924.683 213.124 990.738 213.124 1056.79 213.124C1122.85 213.124 1188.9 213.124 1188.9 213.124C1188.9 213.124 1375.74 213.124 1375.74 213.124C1375.74 213.124 1375.74 399.956 1375.74 399.956C1375.74 399.956 1375.74 466.011 1375.74 532.066C1375.74 598.121 1375.74 664.176 1375.74 664.176C1375.74 664.176 1375.74 851.008 1375.74 851.008C1375.74 851.008 1188.9 851.008 1188.9 851.008C1188.9 851.008 1122.85 851.008 1056.79 851.008C990.738 851.008 924.683 851.008 924.683 851.008C924.683 851.008 737.851 851.008 737.851 851.008C737.851 851.008 737.851 664.176 737.851 664.176Z;M737.851 664.176C737.851 664.176 737.851 598.121 737.851 532.066C737.851 466.011 737.851 399.956 737.851 399.956C737.851 399.956 737.851 213.124 737.851 213.124C737.851 213.124 924.683 213.124 924.683 213.124C924.683 213.124 990.738 213.124 1056.79 213.124C1122.85 213.124 1188.9 213.124 1188.9 213.124C1188.9 213.124 1375.74 213.124 1375.74 213.124C1375.74 213.124 1375.74 399.956 1375.74 399.956C1375.74 399.956 1375.74 466.011 1375.74 532.066C1375.74 598.121 1375.74 664.176 1375.74 664.176C1375.74 664.176 1375.74 851.008 1375.74 851.008C1375.74 851.008 1188.9 851.008 1188.9 851.008C1188.9 851.008 1122.85 851.008 1056.79 851.008C990.738 851.008 924.683 851.008 924.683 851.008C924.683 851.008 737.851 851.008 737.851 851.008C737.851 851.008 737.851 664.176 737.851 664.176Z;M737.851 664.176C737.851 664.176 605.741 532.066 605.741 532.066C605.741 532.066 737.851 399.956 737.851 399.956C737.851 399.956 737.851 213.124 737.851 213.124C737.851 213.124 924.683 213.124 924.683 213.124C924.683 213.124 1056.79 81.0138 1056.79 81.0138C1056.79 81.0138 1188.9 213.124 1188.9 213.124C1188.9 213.124 1375.74 213.124 1375.74 213.124C1375.74 213.124 1375.74 399.956 1375.74 399.956C1375.74 399.956 1507.85 532.066 1507.85 532.066C1507.85 532.066 1375.74 664.176 1375.74 664.176C1375.74 664.176 1375.74 851.008 1375.74 851.008C1375.74 851.008 1188.9 851.008 1188.9 851.008C1188.9 851.008 1056.79 983.118 1056.79 983.118C1056.79 983.118 924.683 851.008 924.683 851.008C924.683 851.008 737.851 851.008 737.851 851.008C737.851 851.008 737.851 664.176 737.851 664.176Z;M737.851 664.176C737.851 664.176 605.741 532.066 605.741 532.066C605.741 532.066 737.851 399.956 737.851 399.956C737.851 399.956 737.851 213.124 737.851 213.124C737.851 213.124 924.683 213.124 924.683 213.124C924.683 213.124 1056.79 81.0138 1056.79 81.0138C1056.79 81.0138 1188.9 213.124 1188.9 213.124C1188.9 213.124 1375.74 213.124 1375.74 213.124C1375.74 213.124 1375.74 399.956 1375.74 399.956C1375.74 399.956 1507.85 532.066 1507.85 532.066C1507.85 532.066 1375.74 664.176 1375.74 664.176C1375.74 664.176 1375.74 851.008 1375.74 851.008C1375.74 851.008 1188.9 851.008 1188.9 851.008C1188.9 851.008 1056.79 983.118 1056.79 983.118C1056.79 983.118 924.683 851.008 924.683 851.008C924.683 851.008 737.851 851.008 737.851 851.008C737.851 851.008 737.851 664.176 737.851 664.176Z" keyTimes="0;0;0.05;1" keySplines="0 0 1 1;0 0 1 1;0 0 1 1"/>
        </path>
       </g>
      </g>
     </g>
    </g>
   </g>
  </g>
 </g>
 <defs/>
</svg>

Is there any good solution?

0

There are 0 answers