Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How do I convert an animated GIF to a YouTube friendly video format?

In the second answer, 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.

I didn't have enough reputation to comment, so this is a question instead.

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?

share|improve this question
add comment

1 Answer

$ 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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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