arielCo

screengrab and video to GIF

Jun 7th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. # replace everything in UPPERCASE with appropriate values
  2.  
  3. # grab the screen in Linux:
  4. ffmpeg -f x11grab -video_size WIDTHxHEIGHT -i :0.0+LEFT,TOP -t LENGTH -c:v libx264 -preset ultrafast -qp 0 -y OUT.mp4
  5.  
  6. # create an optimal GIF palette for all frames:
  7. ffmpeg -i OUT.mp4 -vf palettegen -y PALETTE.png
  8.  
  9. # convert to GIF, using the palette:
  10. ffmpeg -i OUT.mp4 -i PALETTE.png -filter_complex "[0:v][1:v]paletteuse=dither=none" -y OUT.gif
Advertisement
Add Comment
Please, Sign In to add comment