Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korymath/a49328cb13b1cd84d15973079e83fe78 to your computer and use it in GitHub Desktop.
Save korymath/a49328cb13b1cd84d15973079e83fe78 to your computer and use it in GitHub Desktop.
Using youtube-dl and gifify from the command-line

Using youtube-dl and gifify from the command-line

Turn this cute YouTube cat video into a briefer-but-still-cute GIF:

gif

Software to download

  • youtube-dl is a command-line tool for quickly downloading video files from a given YouTube URL
  • gifify is a command-line tool for converting videos to optimized GIFs

Commands to run

youtube-dl "https://www.youtube.com/watch?v=kl1RwhATTzA" -o catdrawer.mp4
gifify catdrawer.mp4 -o catdrawer.gif  --from 19 --to 27 --resize 600:-1 --colors 128

Then upload to Imgur. You could probably write a curl command to do it via Imgur's API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment