|# Create an animated GIF of a screen recording to upload to d.o|
|# Usage: creategif input_file.mp4 output_file.gif|
|# As described at http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html|
|# 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|
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
You'll need to install ffmpeg (Mac: brew install ffmpeg) and have this script somewhere handy.
Use the QuickTime app on your Mac to record a screen recording and then save as a file somewhere - mp4 format is good.
Put this script in /usr/local/bin and run it on the file which will give you a gif file to upload to d.o BUT CHECK HOW BIG IT IS before uploading!!