Skip to content

Instantly share code, notes, and snippets.

@ueokande
Created July 28, 2019 12:47
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 ueokande/11ca9442a52de4cdeb89d6de21445be6 to your computer and use it in GitHub Desktop.
Save ueokande/11ca9442a52de4cdeb89d6de21445be6 to your computer and use it in GitHub Desktop.
Create screenshot GIF
# Get window info
xwininfo
# Save screenshot animation as a PNG format into outputs
ffmpeg -video_size $widthx$height -framerate 24 -f x11grab -i :0.0+$x,$y outputs/%04d.png
# Generate GIF from PNG images
ffmpeg -y -i outputs/%04d.png -ss 2.3 -t 15 -filter_complex "[0:v]setpts=0.7*PTS,split [a][b];[a] palettegen [p];[b][p] paletteuse" screenshot.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment