Control animated gifs

Hi,

I’d love Pressbooks to allow users control frames in animated gifs (or, more generally, to easily navigate a set of images). Apparently, there are several ways this could be achieved:
https://stackoverflow.com/questions/2385203/can-you-control-gif-animation-with-javascript
The way I would love to see this working is like the last answer in the previous thread, or figure 1 in this paper:
http://jasss.soc.surrey.ac.uk/12/1/6.html

@SteelWagstaff and I talked about this, and we realize that there is an issue on how to ensure graceful fallback in other export formats that don’t support javascript. Maybe the first frame could be shown, with a note letting the reader know that there is an animation there, and a link?

Anyway, I’d love to hear your thoughts on this. Right now I am converting my nice animated gifs into (much larger in size) videos, so the user can control the frames, but this is clearly a waste in many regards.
Thanks a lot!
Luis

@lrizquierdo I’m not sure why your videos are bigger but MP4 video is a much more efficient format for animation: https://rigor.com/blog/2015/12/optimizing-animated-gifs-with-html5-video

Hi @ned, thank you so much for your quick and helpful response. I had tried several online tools and the size of the video was larger, but I have now used ffmpeg, as you suggested, and it is indeed smaller. Thanks a lot for that. So I guess your advice is to use .mp4, right?
Thanks a lot!

I would recommend an MP4, yes.

2 Likes