zenrav1e

AV1 encoder optimized for still and animated AVIF images. Fork of rav1e by Imazen.
Fork of rav1e
All changes are additive on top of upstream rav1e.
Encoding features
- Quantization matrices — frequency-dependent quantization weights, ~10% BD-rate improvement
- Filter intra prediction — 5 recursive filter modes, auto-enabled at speed <= 6
- Trellis quantization (experimental, disabled by default — marginal gains at +34% encode time)
- Variance adaptive quantization (VAQ) (experimental, disabled by default)
- Tune::StillImage mode — tuning preset for photographic content
- Lossless mode — mathematically lossless encoding via
quantizer: 0 - Cooperative cancellation —
enough::Stopsupport behind thestopfeature
Modernization
- Rust 2024 edition (MSRV 1.89)
safe_unaligned_simdfor safe SIMD load/store in entropy coding
All upstream rav1e video encoding capabilities are preserved.
Usage
zenrav1e is a library. If you want to encode AVIF images, use ravif or zenavif, which wrap zenrav1e with a higher-level API.
For direct use:
use *;
let mut enc = default;
enc.width = 640;
enc.height = 480;
enc.speed_settings = from_preset;
enc.still_picture = true;
enc.enable_qm = true; // quantization matrices
let cfg = new.with_encoder_config;
let mut ctx: = cfg.new_context.unwrap;
// send frames, receive packets...
Building
# Pure Rust (no asm) — primary development target
# With x86_64 asm (requires nasm)
Requires Rust 1.89+. The asm feature needs NASM 2.14.02+ on x86_64.
Image tech I maintain
| State of the art codecs* | zenjpeg · zenpng · zenwebp · zengif · zenavif (rav1d-safe · zenrav1e · zenavif-parse · zenavif-serialize) · zenjxl (jxl-encoder · zenjxl-decoder) · zentiff · zenbitmaps · heic · zenraw · zenpdf · ultrahdr · mozjpeg-rs · webpx |
| Compression | zenflate · zenzop |
| Processing | zenresize · zenfilters · zenquant · zenblend |
| Metrics | zensim · fast-ssim2 · butteraugli · resamplescope-rs · codec-eval · codec-corpus |
| Pixel types & color | zenpixels · zenpixels-convert · linear-srgb · garb |
| Pipeline | zenpipe · zencodec · zencodecs · zenlayout · zennode |
| ImageResizer | ImageResizer (C#) — 24M+ NuGet downloads across all packages |
| Imageflow | Image optimization engine (Rust) — .NET · node · go — 9M+ NuGet downloads across all packages |
| Imageflow Server | The fast, safe image server (Rust+C#) — 552K+ NuGet downloads, deployed by Fortune 500s and major brands |
* as of 2026
General Rust awesomeness
archmage · magetypes · enough · whereat · zenbench · cargo-copter
And other projects · GitHub @imazen · GitHub @lilith · lib.rs/~lilith · NuGet (over 30 million downloads / 87 packages)
License
Dual-licensed: AGPL-3.0 or commercial.
I've maintained and developed open-source image server software — and the 40+ library ecosystem it depends on — full-time since 2011. Fifteen years of continual maintenance, backwards compatibility, support, and the (very rare) security patch. That kind of stability requires sustainable funding, and dual-licensing is how we make it work without venture capital or rug-pulls. Support sustainable and secure software; swap patch tuesday for patch leap-year.
Your options:
- Startup license — $1 if your company has under $1M revenue and fewer than 5 employees. Get a key →
- Commercial subscription — Governed by the Imazen Site-wide Subscription License v1.1 or later. Apache 2.0-like terms, no source-sharing requirement. Sliding scale by company size. Pricing & 60-day free trial →
- AGPL v3 — Free and open. Share your source if you distribute.
See LICENSE-COMMERCIAL for details.
Upstream code from xiph/rav1e is licensed under BSD-2-Clause. Our additions and improvements are dual-licensed (AGPL-3.0 or commercial) as above.
Upstream Contribution
We are willing to release our improvements under the original BSD-2-Clause license if upstream takes over maintenance of those improvements. We'd rather contribute back than maintain a parallel codebase. Open an issue or reach out.