Why is the gif I created so slow?

I experimented and created the 10ms (delay = 1) version.

10ms delay example

It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.

I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.

In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.

Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):

  • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx
  • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546
  • https://bugzilla.mozilla.org/show_bug.cgi?id=139677

It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:

convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif

enter image description here

convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif

enter image description here

convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif

enter image description here

For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.


UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:

convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif

enter image description here

convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif

enter image description here

UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.


I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.