- Install
ffcast
chmod +x recordgif
recordgif output.gif
Last active
July 20, 2016 13:20
-
-
Save tomgco/e4fb437b8a3cf6c3405e296b8ca6742d to your computer and use it in GitHub Desktop.
Record GIFs in linux :]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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