Created
February 7, 2025 16:59
-
-
Save akersten/b7e0f2f5eb3ba5cbec7a151c2bea7623 to your computer and use it in GitHub Desktop.
`gif` alias for ffmpeg to convert video to a gif
This file contains hidden or 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
# Add to e.g., ~/.zshrc | |
# Usage: gif video.mp4 | |
alias gif='f(){ ffmpeg -i "$1" -vf "fps=10,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "${1%.*}.gif"; unset -f f; }; f' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment