#avif #convert #av1 #rav1f #cav1f

ravif

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

9 releases

0.11.3 Sep 21, 2023
0.11.2 May 9, 2023
0.11.1 Jan 24, 2023
0.11.0 Dec 11, 2022
0.6.3 Oct 18, 2020

#475 in Images

Download history 2203/week @ 2023-08-18 2250/week @ 2023-08-25 1831/week @ 2023-09-01 2124/week @ 2023-09-08 2093/week @ 2023-09-15 2379/week @ 2023-09-22 2782/week @ 2023-09-29 2842/week @ 2023-10-06 3338/week @ 2023-10-13 2482/week @ 2023-10-20 2041/week @ 2023-10-27 2263/week @ 2023-11-03 2823/week @ 2023-11-10 3080/week @ 2023-11-17 3622/week @ 2023-11-24 1899/week @ 2023-12-01

11,887 downloads per month
Used in 7 crates (6 directly)

BSD-3-Clause

37KB
659 lines

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 cavif encoder. It has encoding configuration specifically tuned for still images, and gives better quality/performance than stock rav1e.


lib.rs:

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);

Dependencies

~14MB
~347K SLoC