[zsh] Add function to convert mp4 to gif (from howto file)

This commit is contained in:
lara 2020-11-20 19:17:16 +01:00
parent 17492a7559
commit 776a83d71c

View file

@ -97,4 +97,13 @@ ssh_kitty () {
kitty +kitten ssh "$@" kitty +kitten ssh "$@"
} }
mp4togif() {
if [ "$1" = "-h" ] || [ "$#" -ne "2" ]; then
>&2 echo "Usage: $0 <input.mp4> <output.gif>"
return 1
fi
ffmpeg -i "$1" -vf "fps=10,scale=320:-1:flags=lanczos,split[x][z];[z]palettegen[y];[x][y]paletteuse" -loop 0 "$2"
}
# vim: ft=zsh # vim: ft=zsh