Skip to content

Instantly share code, notes, and snippets.

@tmilewski tmilewski/README.md
Last active Aug 21, 2018

Embed
What would you like to do?

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
You can’t perform that action at this time.