先用quicktime录制,再用ffmpeg转成gif(质量不好)
ffmpeg -ss 00:00:00.000 -i pngen.mov -pix_fmt pal8 -r 10 -s 800x600 -t 00:00:10.000 output.gif
http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
质量好的:
ffmpeg -i input -vf scale=${width}:-1:flags=lanczos,fps=10 frames/ffout%03d.png
convert -loop 0 frames/ffout*.png output.gif