Skip to content

Instantly share code, notes, and snippets.

@tomgco
Last active July 20, 2016 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomgco/e4fb437b8a3cf6c3405e296b8ca6742d to your computer and use it in GitHub Desktop.
Save tomgco/e4fb437b8a3cf6c3405e296b8ca6742d to your computer and use it in GitHub Desktop.
Record GIFs in linux :]
  • Install ffcast
  • chmod +x recordgif
  • recordgif output.gif

gif from wed 20 jul 14 20 07 bst 2016

#!/bin/bash
TMP_AVI=$(mktemp /tmp/outXXXXXXXXXX.avi)
ffcast -s % ffmpeg -y -f x11grab -framerate 15 \
-video_size %s -i %D+%c -codec:v huffyuv \
-t 00:00:05 \
-vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" $TMP_AVI \
&& convert -set delay 10 -layers Optimize $TMP_AVI ${1:-/home/$USER/Pictures/"GIF from ""`date`".gif}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment