Browse Source

Set dither=none for static backgrounds

pull/2/merge
Luke Childs 8 years ago
parent
commit
1ffbd8b6d0
  1. 4
      gifgen

4
gifgen

@ -25,6 +25,7 @@ palette="/tmp/gif-palette-$pid.png"
fps="10"
verbosity="warning"
stats_mode="full"
dither="sierra2_4a"
# Parse args
while getopts "hi:o:f:sv" opt; do
@ -43,6 +44,7 @@ while getopts "hi:o:f:sv" opt; do
;;
s)
stats_mode="diff"
dither="none"
;;
v)
verbosity="info"
@ -70,5 +72,5 @@ echo "Generating palette..."
ffmpeg -v $verbosity -i $input -vf "fps=$fps,palettegen=stats_mode=$stats_mode" -y $palette
[[ "$verbosity" = "info" ]] && echo
echo "Encoding GIF..."
ffmpeg -v $verbosity -i $input -i $palette -lavfi "fps=$fps [x]; [x][1:v] paletteuse" -y $output
ffmpeg -v $verbosity -i $input -i $palette -lavfi "fps=$fps [x]; [x][1:v] paletteuse=dither=$dither" -y $output
echo "Done!"

Loading…
Cancel
Save