Python ImageIO Gif Set Delay Between Frames
<p>I am using ImageIO: <a href="https://imageio.readthedocs.io/en/latest/userapi.html" rel="nofollow">https://imageio.readthedocs.io/en/latest/userapi.html</a> , and I want to know how to set delay between frames in a gif.</p>

<p>Here are the relevant parts of my code.</p>

<pre><code>import imageio 
. . . 
imageio.mimsave(args.output + '.gif', ARR_ARR)
</code></pre>

<p>where <code>ARR_ARR</code> is an array of <code>numpy uint8</code> 2d array of couplets.</p>

<p>To be clear, I have no problem writing the gif. I cannot, however, find any clarification on being able to write the amount of delay between frames.</p>

<p>So, for example, I have frames 0 ... 9</p>

<p>They always play at the same rate. I would like to be able to control the number of milliseconds or whatever unit between frames being played.</p>

<p>Found it using <code>imageio.help("GIF")</code> you would pass in something like</p>

<p><code>imageio.mimsave(args.output + '.gif', ARR_ARR, fps=$FRAMESPERSECOND)</code></p>

<p>And that seems to work.</p>

python image numpy gif