zhuker
11/9/2018 - 4:04 PM

gifka.sh

#!/bin/sh

palette="/tmp/palette.png"

filters="fps=15,scale=270:-1:flags=lanczos"

ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$2"