To get an animated gif from a movie, I do this:
ffmpeg -i themovie.mov themovie-%02d.png convert -verbose +dither -layers Optimize themovie*.gif GIF:- > themovie.gif
convert comes from ImageMagick. I could/should pass some more stuff to
convert, such as
-s to resize and
-r to change FPS of the PNGs, or
-resize to resize the output gif.