Today I learn how to create gif with ffmpeg and quicktime player. Well I’m researching and looking issue on issue queue and look this awesome comment from Rachel Lawson . And she response my message on d.o. It’s a really cool script for people that love gif =)

# Create an animated GIF of a screen recording to upload to d.o
# Usage: creategif input_file.mp4 output_file.gif
# As described at
# GIF supports a 256 colour palette. Determine the best palette and store as temp file
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
# Use the stored palette to encode the GIF
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2

Gist Link

More info : High quality gif with ffmpeg