Skip to content

Instantly share code, notes, and snippets.

@LaineZ
Created January 13, 2020 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LaineZ/158d6621b098164c4bfa2f3bc000c753 to your computer and use it in GitHub Desktop.
Save LaineZ/158d6621b098164c4bfa2f3bc000c753 to your computer and use it in GitHub Desktop.
BAT GIF Encoder (FFmpeg)
:: A small batch adaptation of this script http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
:: USAGE
:: gifenc.bat [inputfile] [outputfile] [xsize] [ysize]
SET palette="palette.png"
SET filters="fps=15,scale=%3:%4:flags=lanczos"
ffmpeg -i %1 -vf "%filters%,palettegen" -y %palette%
ffmpeg -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment