gifgen is a high-quality GIF encoding that outputs more detailed GIF images.
Encoding GIF with ffmpeg can be bad, because GIF is limited to a palette of 256 colors, and ffmpeg only uses a common palette to cover various colors.
gifgen produces better results by doing a 2-pass encoding, where the first pass generates a custom palette based on all pixels in each frame, and the second pass uses this palette instead of the default palette pair bundled with ffmpeg GIF to encode.
ffmpeg default Gif effect
gifgen:
usage
$ gifgen -h
gifgen 1.2.0
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
-w Scale output with horizontal resolution
-b Begin the clip at a given timestamp (in seconds)
-d Duration in seconds of the resulting gif, can be combined with at
Examples:
$ gifgen video.mp4
$ gifgen -o demo.gif SCM_1457.mp4
$ gifgen -sf 15 screencap.mov
$ gifgen -sf 15 -w 320 screencap.mov
Begin at 3.5 seconds into the video, make the gif using the next 5.5 seconds
$ gifgen -b 3.5 -d 5.5 screencap.mov
Install
Apple system
brew install lukechilds/tap/gifgen
Linux
Clone this repo, and copy/symlink gifgen to your PATH or run the script directly with ./gifgen, requires ffmpeg to be installed.
#gifgen #homepage #documentation #downloads #high #quality #GIF #encoding #News Fast Delivery