Download

GIF compressor comparison: lessgif vs gifski, gifsicle and ffmpeg

Which tool makes the smallest GIF that still looks good? We measured it on 363 video clips and 281 existing GIFs, scoring every result with the same perceptual quality metric.

Who wrote this: this page is written by the people who make lessgif, so read it as a vendor's benchmark, not an independent review. Every number below comes from scripts and clip lists in the open-source repository, so anyone can rerun them and check.

The short answer

  • Smallest GIF at the same quality: in this benchmark, lessgif. From video, its GIFs were a median 50% smaller than gifski's; re-compressing GIFs, a median 40% smaller than gifsicle's lossy mode, both at the same SSIMULACRA2 score.
  • Smoothest flat areas up close: gifski. At the same score, lessgif shows a little more fine grain in skies and walls when zoomed in.
  • Already installed and scriptable everywhere: ffmpeg and gifsicle. Both are mature, packaged by most Linux distributions and have many editing options lessgif's command line doesn't.
  • Smallest file of all: not a GIF. If the place you post to accepts video, an MP4 is usually far smaller than any GIF; try GIF to MP4.

Video to GIF: lessgif vs gifski

363 three-second clips at 15 fps, scaled to at most 400 pixels: 300 from the Blender open movies Tears of Steel and Big Buck Bunny, 15 from the Sintel trailer and 48 from Xiph.org's standard test sequences. Each clip was encoded by lessgif at 9 settings and by gifski 1.34 at 11 quality levels. Every GIF was decoded and scored with SSIMULACRA2 against the source frames, and the size each encoder needs for a given score was read off that clip's curve.

SSIMULACRA2 scorelessgif smaller than gifski (median)Clips where lessgif is smaller
50 (medium)49.8%99%
6049.8%100%
70 (high)50.1%100%
8046.6%100%
  • Measured with a second metric, DSSIM, lessgif is 47.7% smaller at equal quality.
  • By source at score 70: Big Buck Bunny 52%, Tears of Steel 50%, Sintel 56%, Xiph sequences 46%.
  • None of lessgif's encodes has a frame scoring below 0; 3.6% of gifski's do.

Compressing existing GIFs: lessgif vs gifsicle

281 GIFs made from the same footage (by gifski and by ffmpeg with two palette modes), plus generated stickers, memes and screen recordings, were re-compressed by lessgif and by gifsicle 1.94.

Targetlessgif smaller than gifsicle (median)
The quality gifsicle -O3 --lossy=35 reaches40.5%
Near-lossless (SSIMULACRA2 90)11.6%
Lossless (quality 100)0.3% bigger than gifsicle -O3; all 281 GIFs reproduced exactly

See for yourself

The same 3-second clip, 360 pixels wide at 15 fps, made by ffmpeg 6.1 (its usual palettegen and paletteuse recipe) and gifski 1.34 at their default settings, and by lessgif at the lowest quality whose GIF scores at least as high as the better of the two. Higher scores are better.

Cartoon: Big Buck Bunny

Big Buck Bunny clip encoded by ffmpeg
ffmpeg 1,181 KB, score 76.5
Big Buck Bunny clip encoded by gifski
gifski 824 KB, score 76.0
Big Buck Bunny clip encoded by lessgif
lessgif 490 KB, score 76.6

Live action: Tears of Steel

Tears of Steel clip encoded by ffmpeg
ffmpeg 1,461 KB, score 83.8
Tears of Steel clip encoded by gifski
gifski 671 KB, score 78.7
Tears of Steel clip encoded by lessgif
lessgif 403 KB, score 83.9

Screen recording: this website

Screen recording encoded by ffmpeg
ffmpeg 663 KB, score 92.8
Screen recording encoded by gifski
gifski 529 KB, score 81.6
Screen recording encoded by lessgif
lessgif 437 KB, score 92.8

Re-compressing ffmpeg's Big Buck Bunny GIF

The input GIF, made by ffmpeg
input 1,181 KB
The input GIF re-compressed by gifsicle
gifsicle -O3 --lossy=35: 936 KB, score 75.4
The input GIF re-compressed by lessgif
lessgif 508 KB, score 76.2

Big Buck Bunny © 2008 and Tears of Steel © 2012 Blender Foundation, CC BY 3.0.

Speed

Timed on 40 of the clips at about SSIMULACRA2 70, one encode at a time: lessgif took a median 1.45 seconds on one thread. gifski took 1.86 seconds and 3.5 seconds of CPU time, because it runs its stages on several threads.

What this benchmark doesn't show

  • No blind viewing test yet. The same SSIMULACRA2 score is not proof that people can't tell the GIFs apart. SSIMULACRA2 forgives fine grain more than blur, and lessgif leans on that.
  • The test material is mostly film. Phone videos, screen captures and GIFs found on the web may shrink more or less.
  • An already-optimised GIF may not get smaller. The compressor then tells you to keep the original.
  • Online tools weren't tested. Services such as ezgif run their own settings of encoders like gifsicle; we only compared tools we could run with fixed, published settings.

Questions

What is the best GIF compressor?

It depends on what you value. For the smallest file at a given perceptual quality, lessgif came out ahead in this benchmark: a median 40% smaller than gifsicle's lossy mode when re-compressing GIFs, and 50% smaller than gifski when making GIFs from video, both at the same SSIMULACRA2 score. gifski gives smoother flat areas up close, and gifsicle and ffmpeg are already installed on many systems. This comparison is published by the lessgif project, and the scripts to rerun it are open source.

How do I compress a GIF without losing quality?

Use lossless re-encoding: at quality 100, lessgif stores every frame exactly as it was, and the compressor tells you if your original is already smaller. For a much smaller file that still looks the same at normal size, quality 90 is near-lossless. Both work in the free GIF compressor in your browser, with nothing uploaded.

Is lessgif better than gifski?

For file size, yes in this test: lessgif's GIFs were a median 50% smaller than gifski 1.34's at the same SSIMULACRA2 score, and smaller on every one of 363 clips at score 70. gifski's GIFs look smoother in flat areas when zoomed in, so if that matters most, gifski is a good choice.

Is lessgif better than gifsicle?

For lossy compression, lessgif's files were a median 40.5% smaller than gifsicle 1.94 -O3 --lossy=35 at the same score, and 11.6% smaller near-lossless. For lossless optimisation they are about equal; gifsicle was 0.3% smaller. gifsicle also has many editing commands that lessgif's command line doesn't.

Is lessgif free?

Yes. The website, the app for Windows, macOS and Linux, and the encoder library are free and open source under the MIT or Apache-2.0 license. The website's tools run in your browser, so your files are never uploaded.