Last active
September 29, 2015 06:54
-
-
Save madx/513926799c370f977531 to your computer and use it in GitHub Desktop.
Quick GIF screencasts using bash + ffcast + ffmpeg + imagemagick + yad
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 | |
FILE="$HOME/Images/Captures/`date +%FT%T.gif`" | |
TMP_AVI=$(mktemp /tmp/outXXXXXXXXXX.avi) | |
(yad --notification --image media-playback-stop --command "bash -c 'echo q; quit'") |\ | |
ffcast -s % ffmpeg -y -f x11grab -show_region 1 -framerate 15 \ | |
-video_size %s -i %D+%c -codec:v huffyuv \ | |
-vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" $TMP_AVI \ | |
&& convert -set delay 10 -layers Optimize $TMP_AVI $FILE | |
rm $TMP_AVI | |
echo "$FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment