guetzli

Perceptual JPEG encoder that optimizes for visual quality at small file sizes

TLDR

Re-encode a JPEG
$ guetzli [input.jpg] [output.jpg]
Encode a PNG to JPEG
$ guetzli [input.png] [output.jpg]
Set quality level (84-100)
$ guetzli --quality [90] [input.jpg] [output.jpg]
Maximum compression (lowest supported quality)
$ guetzli --quality [84] [input.jpg] [output.jpg]
Show progress trace
$ guetzli --verbose [input.png] [output.jpg]

SYNOPSIS

guetzli [--quality Q] [--verbose] input output.jpg

DESCRIPTION

Guetzli is a JPEG encoder that targets the human visual system. It uses Butteraugli, a psychovisual model, to search the JPEG quantization space and produce baseline-compatible JPEG files that are typically 20-30% smaller than equivalent libjpeg output at the same perceived quality.Output files are compatible with all standard JPEG decoders. The trade-off is encoding cost: guetzli is computationally and memory intensive.

PARAMETERS

input

Source image. PNG and JPEG inputs are supported.
output.jpg
Destination JPEG file.
--quality Q
Visual quality, expressed in libjpeg-equivalent units. Range 84-100, default 95. Values below 84 are not supported.
--verbose
Print a trace of encoding attempts.

INSTALL

sudo apt install guetzli
sudo pacman -S guetzli
sudo apk add guetzli
brew install guetzli
nix profile install nixpkgs#guetzli

CAVEATS

Very slow: encoding a single megapixel can take a minute or more. Memory usage is roughly 300 MB per megapixel. Only quality values 84-100 are accepted. Best results come from non-degraded sources (PNG or high-quality JPEG); re-encoding heavily compressed JPEGs offers limited gains.

HISTORY

Guetzli was developed by Google Research and released as open source in March 2017 alongside the Butteraugli perceptual distance metric.

SEE ALSO

cjpeg(1), jpegoptim(1)