Skip to content

Instantly share code, notes, and snippets.

@akersten
Created February 7, 2025 16:59
Show Gist options
  • Save akersten/b7e0f2f5eb3ba5cbec7a151c2bea7623 to your computer and use it in GitHub Desktop.
Save akersten/b7e0f2f5eb3ba5cbec7a151c2bea7623 to your computer and use it in GitHub Desktop.
`gif` alias for ffmpeg to convert video to a gif
# 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