Skip to content

Instantly share code, notes, and snippets.

@tmilewski
Last active August 21, 2018 14:44
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 tmilewski/f65dd9b6bfcf5c2a39742ce1e515a481 to your computer and use it in GitHub Desktop.
Save tmilewski/f65dd9b6bfcf5c2a39742ce1e515a481 to your computer and use it in GitHub Desktop.

Giphy WEBP Converter

giphy [mp4 gif url]

Install

  • Copy and run the following:
curl -o /usr/local/bin/giphy https://gist.githubusercontent.com/tmilewski/f65dd9b6bfcf5c2a39742ce1e515a481/raw/3baa4e5ecdc5d07bd3948d406360e90d8223aa90/giphy; chmod +x /usr/local/bin/giphy

How To Run

  • Grab the MP4 version of the GIF via the media link to the right of the page
  • giphy https://media.giphy.com/media/dIxkmtCuuBQuM9Ux1E/giphy.mp4
  • The resulting GIF will be saved in ~/Downloads
#!/usr/bin/env bash
NOW=$(date +"%Y-%m-%d_%H-%M-%S")
ffmpeg -i "$1" -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" ~/Downloads/$NOW.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment