Simple high quality GIF encoding
Shell
Switch branches/tags
Clone or download
Latest commit 218a1af Apr 17, 2017
Permalink
Failed to load latest commit information.
gifs Add GIF examples Jul 3, 2016
LICENSE Add LICENSE file Oct 16, 2016
README.md Update README.md Apr 14, 2017
gifgen 1.1.2 Jul 20, 2016

README.md

gifgen

Simple high quality GIF encoding

If you've ever tried encoding GIFs with ffmpeg there's a good chance your results came out looking pretty bad. This is because GIFs are limited to a palette of 256 colours and ffmpeg just uses a generic palette to be able to cover a wide range of colours.

gifgen produces much better results by doing a 2-pass encode. The first pass generates a custom colour palette based on all of the pixels from each frame. The second pass encodes the GIF using this palette instead of the default one bundled with ffmpeg.

ffmpeg default:

ffmpeg default

gifgen:

gifgen

Usage

$ gifgen -h
gifgen 1.1.2

Usage: gifgen [options] [input]

Options:
  -o   Output file [input.gif]
  -f   Frames per second [10]
  -s   Optimize for static background
  -v   Display verbose output from ffmpeg

Examples:
  $ gifgen video.mp4
  $ gifgen -o demo.gif SCM_1457.mp4
  $ gifgen -sf 15 screencap.mov

Installation

macOS

brew install lukechilds/tap/gifgen

Linux

Just clone this repo and either copy/symlink gifgen to your PATH or run the script directly with ./gifgen. Requires ffmpeg to be installed.

Windows

¯\_(ツ)_/¯

Credits

gifgen is pretty much just the information from this blog article wrapped up in a shell script. Full credit goes to the original author.

License

MIT © Luke Childs