Page 1 of 1

convert -delay AND FPS in animated GIF

Posted: 2009-09-24T10:58:52-07:00
by xioni
hopefully an easy question. i am using convert -delay to create animated GIFs from individual images with different frame rates. i didn't understand the ticks/time explanation in the description of the flags on page

LINK: command line options: convert -delay

for example, i used convert -delay 8. when i open the resultant animated GIF in QuickTime, it indicates that the rate is 12.5 FPS (frames per second).

if i choose convert -delay N is the equation to determine frame rate from N and vice versa

100/N = FPS

or is it more subtle than this?

thanks for any input

Re: convert -delay AND FPS in animated GIF

Posted: 2009-09-24T11:21:22-07:00
by fmw42
As I understand it, the (IM default) ticks are 1/100 of a second, i.e. 100 ticks per second. (But the ticks value can be changed). So a delay of 8 would be 8/100 of a second between frames. This makes the frame rate (FPS) = 1/(delay in seconds) = 100/(delay in ticks). So for IM delay of 8, you would get a FPS=100/8=12.5

Note however, that some browsers enforce a minimum delay (that may be different with each browser). Thus any delay shorter than that minimum will be set to that minimum, so that you cannot change frames too fast (faster than the browser can keep up).

If someone knows the precise minimum delays for any given browser, perhaps they can add to this discussion.

Re: convert -delay AND FPS in animated GIF

Posted: 2009-09-24T17:01:14-07:00
by xioni
many thanks for clarifying.

Re: convert -delay AND FPS in animated GIF

Posted: 2009-09-27T21:12:24-07:00
by anthony
You can specify a different tick rate fro example 8/1 would be 8 seconds
or 8 1 second ticks while 8/2 would be 8 half second ticks ot 4 second.

The default is 100 'ticks' per second or N/100 as this is the default used by GIF animations. As such 8 on its own is equivelent to a 8/100 second delay

NOTE internet explorer has a minimum speed of 6. And no browser honors a 0 delay as meaning (so fast don't even bother to display) which is typically used as a GIF animation frame optimization method.

See Zero Delay Frames