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 | |
|---|---|
| MozJPEG | Mozilla JPEG Encoder Project |
| pngquant | Utility and a library for lossy compression of PNG images |
| SVGO | Node.js library and command-line application for optimizing SVG files |
| Oxipng | Multithreaded PNG optimizer, forked from Optipng |
| libjxl | Reference implementation of JPEG XL |
| libjpeg-turbo | JPEG image codec |
| QOI | The Quite OK Image Format |
| YOGA | Yummy Optimizer for Gorgeous Assets |
| pngcrush | Optimizer for PNG files |
| jpegoptim | Optimize JPEG files. Lossless and lossy compression available |
| OptiPNG | Advanced PNG optimizer |
| Guetzli | Perceptual JPEG encoder with excellent compression density at high quality |
| ECT | Fast and effective C++ file optimizer |
| Crunch | Lossy PNG image file optimization |
| zopflipng | PNG optimisation tool using zopfli |
| JPEG Archive | Utilities for archive JPEGs for long term storage |
| optimizt | CLI image optimization tool |
| picopt | Multi format lossless image optimize |
| tinifier | CLI tool for compressing images using the TinyPNG API |
Read our verdict in the software roundup.
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. |


Please read our Comment Policy before commenting.