convert MOV to GIF with ffmpeg & gifsicle

command line
1
2
3
./ffmpeg -i in.mov -s 360x640 -pix_fmt rgb24 -r 12 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif
  • -r 12 tells ffmpeg to reduce the frame rate from 25 fps to 10
  • -s 360x640 tells ffmpeg the max-width and max-height
  • –delay=3 tells gifsicle to delay 30ms between each gif
  • –optimize=3 requests that gifsicle use the slowest/most file-size optimization
demo

参考