Possibly useful for those making short educational screen-capture tutorials for online display or bundling alongside a .PDF file. As of February 2022 the excellent open-source freeware ScreenToGif Portable no longer requires clunky extra downloads, such as Microsoft .NET Framework or the infernal FFmpeg. Currently the 68Mb ScreenToGif.2.37.1.Portable.x64.zip is the download that most Windows people will want.

ScreenToGif can also output screen recordings to .APNG (animated PNG), which may help if your audience or environment is likely to have .GIF blockers installed. Simply manually rename to .PNG for upload to blogs etc. Web browsers will still recognise it as containing multiple frames, and play it (all major browser now support animated .PNGs). ScreenToGif can set the number of loops to show.

And, yes, there is javascript to ‘play, pause, continue’ an .aPNG on a Web page. So if you have multiple tutorial steps, the reader doesn’t have to see them all animating at once. Also look at another solution.

Or for a simple HTML solution, this works and does have them all play once (assuming one loop). Then it hands over control to the user in the form of “click to replay”.

Yes, you would add math.random here as a cache-buster, but using it appears to mess up the timings of the frames in the replay. The above works fine for reloading the same image on Chrome/Firefox-based browsers, and does not cause problems with frame slippage. You’re welcome.

Note that free WordPress blogs do not support the format, and the uploaded .PNG will there become a normal file that just shows the first frame of the animation. To host and run an animated .PNG file you need your own Web space.

Popular freeware viewers such as IrfanView can (since 2016) run animated .PNG files locally on your PC.

Sadly they can’t be embedded in PDF magazines, and still animate. They can in fixed layout ePubs, but the problem there is Windows. Basically, you have to force your readers to use Thorium, as that’s the only viable ‘fixed layout + animation’ reader choice on Windows desktops.