Why does this gif seem to have a duration of 0ms? How can I find the true duration?

I am trying to get the duration and number of frames from animated gif files so that I can calculate the average frame rate of gifs and then convert it to video.

I came across this image recently during my testing, and everyone seems to think that it has a duration of 0 ms.

enter image description here

Why? How can I find the real duration?

So far I have tried:

  • exiftool

    exiftool -v image.gif

  • Imagemagick

    define -verbose -format "Frame% s:% Tcs \ n" image.gif

  • This Python script that uses the Python image library

  • And two more programs that are used for gif animation, such as Microsoft Gif Animator
+7
image-processing gif animated-gif
source share
1 answer

The actual duration of this GIF animation is really zero seconds. It has 41 frames, and each of them has a frame duration of zero. (It also has an invalid XMP record, but that doesn't matter here.)

The infinite frame rate is obviously pretty dumb, and there is no reason your browser should even try to display it. In fact, it happens that your browser slows down the frame rate of GIF animations like this so that they can actually display reasonably without tying your processor or giving you epileptic seizures.

There is no specific standard behavior, but usually any GIF with a frame delay of less than 0.05 or 0.06 seconds per frame can be slowed down by web browsers.

Literature:

http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

http://forums.mozillazine.org/viewtopic.php?t=108528

+6
source share

All Articles