Created
August 29, 2016 17:54
-
-
Save robinp/ef5975ff7463ce5b423220b0263a0dca to your computer and use it in GitHub Desktop.
How to save a screen region to gif.
This file contains 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
# Need to install ffcast, and advisedly also xrectsel (on arch can do from AUR) | |
# Below command will let you select a region with the mouse, than stream it to ffmpeg. | |
# Many args magic (taken from SO), but allegedly it saves as lossless. | |
ffcast -s % ffmpeg -f x11grab -show_region 1 -framerate 20 -video_size %s -i %D+%c -codec:v huffyuv -vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" out.avi | |
# Use ImageMagick to covert to gif - works great! | |
convert -set delay 5 -layers Optimize out.avi out.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment