Created
June 10, 2024 09:03
-
-
Save nplusp/e665cadec807f3bfcd88b5a75b1df1b8 to your computer and use it in GitHub Desktop.
Create gifs from video in terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// install dependencies | |
brew install ffmpeg | |
brew install gifsicle | |
// add alias | |
alias gify='function _gify(){ ffmpeg -i "$1" -pix_fmt rgb8 -r 10 /tmp/{1%.*}_tmp.gif && gifsicle -O3 /tmp/{1%.*}_tmp.gif -o "${1%.*}.gif"; rm /tmp/{1%.*}_tmp.gif; unset -f _gify; }; _gify' | |
// run it | |
gify /path/to/file.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment