Skip to content

Instantly share code, notes, and snippets.



Last active Sep 1, 2015
What would you like to do?
Create a d.o compatible mini movie gif rather than a static screenshot
# 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

This comment has been minimized.

Copy link
Owner Author

@rachellawson rachellawson commented May 30, 2015

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment