Exiftool перечислит количество кадров в качестве части своего обширного вывода.
Это команда и вывод файла Animated Gif:
$ exiftool -b -FrameCount giphy.gif
33
Exiftool 1]
$ exiftool giphy.gif
ExifTool Version Number : 10.10
File Name : giphy.gif
Directory : .
File Size : 2.1 MB
File Modification Date/Time : 2018:04:22 21:00:42-04:00
File Access Date/Time : 2018:04:22 21:01:03-04:00
File Inode Change Date/Time : 2018:04:22 21:00:52-04:00
File Permissions : rw-rw-r--
File Type : GIF
File Type Extension : gif
MIME Type : image/gif
GIF Version : 89a
Image Width : 500
Image Height : 281
Has Color Map : Yes
Color Resolution Depth : 7
Bits Per Pixel : 7
Background Color : 127
Animation Iterations : Infinite
XMP Toolkit : Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27
Creator Tool : Adobe Photoshop CS6 (Macintosh)
Instance ID : xmp.iid:C312DB1DA6A311E5B8F5D2BA262E999D
Document ID : xmp.did:C312DB1EA6A311E5B8F5D2BA262E999D
Derived From Instance ID : xmp.iid:C312DB1BA6A311E5B8F5D2BA262E999D
Derived From Document ID : xmp.did:C312DB1CA6A311E5B8F5D2BA262E999D
Frame Count : 33
Duration : 2.31 s
Image Size : 500x281
Megapixels : 0.141