Skip to content

Instantly share code, notes, and snippets.

@tieubao
Created August 26, 2023 09:26
Show Gist options
  • Save tieubao/2e9dbc959c256bc94bed712bc194c1ba to your computer and use it in GitHub Desktop.
Save tieubao/2e9dbc959c256bc94bed712bc194c1ba to your computer and use it in GitHub Desktop.
webm2gif
function webm2gif() {
ffmpeg -y -i "$1" -vf palettegen _tmp_palette.png
ffmpeg -y -i "$1" -i _tmp_palette.png -filter_complex paletteuse -r 10 "${1%.webm}.gif"
rm -rf _tmp_palette.png
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment