Get Delay of Each Frame In A GIF

2

I'd like to get the delay of each frame in a GIF. I plan to turn it into an MP4 file.

In one of the answers to "How do I convert an animated GIF to a YouTube friendly video format?", it explains how with FFMPEG, however something it does not explain is how to get the framerate/delay of each image in a GIF file.

How do I use ImageMagick (or anything else) to get the delay of frames in a GIF so that I can make an MP4 with a variable frame rate?

Andy101

Posted 2013-07-20T07:25:07.387

Reputation: 21

Answers

2

$ ssh eee eix exiftool
[I] media-libs/exiftool
Homepage:      http://www.sno.phy.queensu.ca/~phil/exiftool/
               http://search.cpan.org/dist/Image-ExifTool/
Description:   Read and write meta information in image, audio and video files


$ exiftool.exe -v Newtons_cradle_animation_book_2.gif

(...)

Application Extension: NETSCAPE 2.0
  ExtensionAnimation (SubDirectory) -->
  + [BinaryData directory, 5 bytes]
  | AnimationIterations = 0
Graphic Control: delay=0.05
Image: left=0 top=0 width=480 height=360
Graphic Control: delay=0.02
Image: left=46 top=40 width=170 height=249
Graphic Control: delay=0.02
Image: left=22 top=41 width=195 height=253
Graphic Control: delay=0.02
Image: left=22 top=43 width=194 height=251
Graphic Control: delay=0.02
Image: left=22 top=41 width=196 height=252
Graphic Control: delay=0.02
Image: left=22 top=44 width=194 height=250
Graphic Control: delay=0.02

(...)

  FrameCount = 36
  Duration = 0.82

Ярослав Рахматуллин

Posted 2013-07-20T07:25:07.387

Reputation: 9 076