Gif

1 - About

gif is an image format.

It is normally recommended to save drawings in the webp or png format rather than the GIF format. But for animation, as the animated versions of the PNG format, MNG and APNG, have limited support, GIF is the only real option for animation.

2.1 - Characteristic

3 - Management

3.1 - Creating

3.2 - Convert Video to Gif

  • Video to Gif: ffmpeg

#basic
ffmpeg -i video.avi video.gif -hide_banner
ffmpeg -i video_320x180.mp4 agif_320x180.gif -hide_banner

# reduce resolution
ffmpeg -i video_320x180.mp4 -vf scale=160:90 agif_160x90.gif -hide_banner

# reduce Frame per second to 10
ffmpeg -i video_320x180.mp4 -r 10 agif_r10_320x180.gif -hide_banner

3.3 - Resize and Crop

3.4 - Compression

3.5 - Command line

3.6 - Diff

3.7 - Concat

Giffsicle


gifsicle --delay 50 -- loop=3 pic1.gif pic2.gif pic3.gif > animation.gif

Options:

  • --delay or -d: 50 = half second
  • --loopcount or --loop, read in loop N times
  • --optimize

3.8 - Explode


gifsicle --explode anim.gif

4 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap