Browse Source

Merge pull request #3 from s-p-k/master

Quote variables and clean up shift expression.
pull/4/head
Luke Childs 9 years ago
committed by GitHub
parent
commit
fcc884d708
  1. 7
      gifgen

7
gifgen

@ -47,8 +47,7 @@ while getopts "hi:o:f:sv" opt; do
;;
esac
done
shift $(($OPTIND - 1))
shift "$((OPTIND-1))"
# Grab input file from end of command
input=$1
@ -69,8 +68,8 @@ fi
# Encode GIF
echo "Generating palette..."
ffmpeg -v $verbosity -i $input -vf "fps=$fps,palettegen=stats_mode=$stats_mode" -y $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=dither=$dither" -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