#avif #convert #av1 #rav1f #cav1f

ravif

rav1e-based pure Rust library for encoding images in AVIF format (powers the cavif tool)

21 releases

Uses new Rust 2024

0.13.0 Jan 19, 2026
0.12.0 Jun 21, 2025
0.11.20 Jun 21, 2025
0.11.11 Oct 17, 2024
0.6.3 Oct 18, 2020

#581 in Images

Download history 387551/week @ 2025-10-24 397641/week @ 2025-10-31 402176/week @ 2025-11-07 426719/week @ 2025-11-14 367914/week @ 2025-11-21 318045/week @ 2025-11-28 335679/week @ 2025-12-05 340134/week @ 2025-12-12 264454/week @ 2025-12-19 230147/week @ 2025-12-26 331999/week @ 2026-01-02 365998/week @ 2026-01-09 380373/week @ 2026-01-16 427417/week @ 2026-01-23 455822/week @ 2026-01-30 488087/week @ 2026-02-06

1,816,482 downloads per month
Used in 179 crates (15 directly)

BSD-3-Clause

46KB
797 lines

use ravif::*;
let res = Encoder::new()
    .with_quality(70.)
    .with_speed(4)
    .encode_rgba(Img::new(pixels, width, height))?;
std::fs::write("hello.avif", res.avif_file);

ravif — Pure Rust library for AVIF image encoding

Encoder for AVIF images. Based on rav1e and avif-serialize.

The API is just a single encode_rgba() function call that spits an AVIF image.

This library powers the cavif encoder. It has an encoding configuration specifically tuned for still images, and gives better quality/performance than stock rav1e.

Dependencies

~18MB
~433K SLoC