Images

cavif – convert PNG and JPEG images to AVIF

cavif is a command-line image encoder and converter that turns PNG and JPEG files into AVIF images.

It uses the rav1e AV1 encoder through the ravif crate and is implemented entirely in Rust. The program is aimed at users who want a compact, scriptable way to produce modern AVIF assets without relying on a heavyweight graphics application. It can process individual files or groups of images and writes AVIF output alongside the source by default. AVIF is well suited to web publishing and modern image-delivery pipelines, while cavif keeps the conversion workflow deliberately straightforward. Its defaults are intended to provide sensible colour and bit-depth choices without requiring codec-specific tuning.

This is free and open source software.

Key Features

  • Offers quality control for balancing visual fidelity against output file size.
  • Provides a separate encoding-speed control, trading processing time against compression efficiency.
  • Processes multiple input images with multithreaded encoding to make good use of multi-core processors.
  • Can write output to a specific file or direct batches to a chosen directory.
  • Leaves existing AVIF files untouched by default, with an explicit overwrite option when replacement is required.
  • Supports RGB encoding as an alternative to YCbCr where minimising colour shifts matters more than file size.
  • Can produce 8-bit AVIF output when broader compatibility is needed.
  • Includes controls for transparent-pixel RGB data and quiet operation for scripts and automated pipelines.
  • Provides a portable static Linux executable with no runtime dependencies.

Website: github.com/kornelski/cavif-rs
Support:
Developer: Kornel Lesiński
License: BSD 3-Clause License

cavif is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Console Based Image Compression Tools
MozJPEGMozilla JPEG Encoder Project
pngquantUtility and a library for lossy compression of PNG images
SVGONode.js library and command-line application for optimizing SVG files
OxipngMultithreaded PNG optimizer, forked from Optipng
libjxlReference implementation of JPEG XL
libjpeg-turboJPEG image codec
QOIThe Quite OK Image Format
YOGAYummy Optimizer for Gorgeous Assets
pngcrushOptimizer for PNG files
jpegoptimOptimize JPEG files. Lossless and lossy compression available
OptiPNGAdvanced PNG optimizer
GuetzliPerceptual JPEG encoder with excellent compression density at high quality
ECTFast and effective C++ file optimizer
CrunchLossy PNG image file optimization
zopflipngPNG optimisation tool using zopfli
JPEG ArchiveUtilities for archive JPEGs for long term storage
optimiztCLI image optimization tool
picoptMulti format lossless image optimize
tinifierCLI tool for compressing images using the TinyPNG API

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted