Animated Gif Cheat Sheet

From WikiOD

Here is the cheatsheat of Animated Gif and basic guide on how to use Animated Gif

Animated GIFs[edit | edit source]

{: .-one-column}

Convert MP4 to GIF[edit | edit source]

mkdir -p gif
mplayer -ao null -vo gif89a:outdir=gif $INPUT
mogrify -format gif *.png
gifsicle --colors=256 --delay=4 --loopcount=0 --dither -O3 gif/*.gif > ${INPUT%.*}.gif
rm -rf gif

You’ll need mplayer, imagemagick and gifsicle. This converts frames to .png, then turns them into an animated gif.

A given range[edit | edit source]

mplayer -ao null -ss 0:02:06 -endpos 0:05:00 -vo gif89a:outdir=gif videofile.mp4

See -ss and -endpos.

Credit:rstacruz