18

Is there any kind of GIF/Image viewer, which is able to pause GIF animation at a specific frame or on mouse click?

I tried using 'Image Viewer', but it seems there is no way to stop the GIF animation.

Here is an example which I would like to pause:

Rotating triangle GIF

19

The simplest way to do it is play your gif animation in mplayer

Open your gif file in mplayer using following command

  mplayer -loop 0  -speed 0.2 your_gif

Here

-loop 0 means it will run your gif image untill you are not closing it and
-speed 0.2 means it will decrease the animation speed to 20%.

You can pause your animation by pressing the Space button .
mplayer will also show the frame information of your running gif in terminal.

enter image description here

  • 1
    Yup, it works, but there is latency. When I press space, 2-3 frames changes before stopping. Any idea how to solve it? – niekas Sep 24 '14 at 15:48
  • Adjust the -speed parameter according to your need. Because for me -speed 0.5 is playing your gif file with good speed without any latency. – g_p Sep 24 '14 at 16:54
  • and ... spacebar does nothing. why is this so difficult? – max pleaner Mar 25 '17 at 3:47
6

I guess you want to pause it to grab a specific frame and save it as a stand-alone image.

Open it with the gimp, it will load each frame as a separate layer. You can then delete or make invisible all the frames/layers except for the one you want, and export the image in any format supported by gimp.

  • 1
    Actually, I don't need the image file, I just want to pause the animation for several seconds to write down the coordinates. I have loads of GIF files with spinning figures, so I prefer not use GIMP. +1 for partially solved problem. – niekas Sep 24 '14 at 15:32
5

You can break the gif into images, and browse them with the speed you want:

convert input.gif output%05d.png
  • what is %05d ? I wrote it and nothing special happened, this just became a part of a filename for each part, like foo%05-116.png – user907860 Oct 6 '17 at 19:03
  • @user907860: it works as filename template on my box (ImageMagick 6.9.7-4 Q16 x86_64 20170114). Maybe you forgot the d? Like using foo%05.png instead of foo%05d.png? – Adobe Oct 8 '17 at 5:11
3

Although mplayer is indeed a simple way just to pause GIF animation and perhaps make a screenshot of a particular frame, it seems thas mplayer does not allow to navigate between frames. A tool gifview (provided by gifsicle package in Ubuntu) does a great job to provide fine-grain control over gif viewing. See the (very short) manpage for gifview for corresponding shortcuts.

Make sure you disable the optimized mode with u. Otherwise, only diffs between frames will be shown and one can have an impression that the tool does not work properly.

  • Exactly what i needed, to view gifs frame by frame. Thanks! – Epskampie Nov 21 '16 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.