#image-encoding #avif #av1 #heif #mux #pixel #bmff

avif-serialize

Minimal writer for AVIF header structure (MPEG/HEIF/MIAF/ISO-BMFF)

5 releases

0.8.2 Oct 16, 2024
0.8.1 Dec 6, 2022
0.7.7 Nov 27, 2022
0.7.6 Apr 7, 2022
0.6.4 Aug 29, 2020

#924 in Images

Download history 48350/week @ 2024-07-31 53369/week @ 2024-08-07 52516/week @ 2024-08-14 51656/week @ 2024-08-21 51688/week @ 2024-08-28 55568/week @ 2024-09-04 62418/week @ 2024-09-11 58904/week @ 2024-09-18 66740/week @ 2024-09-25 65469/week @ 2024-10-02 67638/week @ 2024-10-09 78286/week @ 2024-10-16 73981/week @ 2024-10-23 79274/week @ 2024-10-30 79750/week @ 2024-11-06 77166/week @ 2024-11-13

324,177 downloads per month
Used in 65 crates (via ravif)

BSD-3-Clause

40KB
961 lines

AVIF image serializer (muxer)

Minimal writer for AVIF header structure. This is lean, safe-Rust alternative to libavif. It creates the jungle of MPEG/HEIF/MIAF/ISO-BMFF "boxes" as appropriate for AVIF files. Supports alpha channel embedding.

Compatible with decoders in Chrome 85+, libavif v0.8.1, and Firefox 92. It's used in cavif and other encoders.

Together with rav1e, it allows pure-Rust AVIF image encoding.

Requirements

Usage

  1. Compress pixels using an AV1 encoder, such as rav1e. libaom works too.

  2. Call avif_serialize::serialize_to_vec(av1_data, None, width, height, 8)

See ravif crate sources for example usage.


lib.rs:

AVIF image serializer (muxer)

Usage

  1. Compress pixels using an AV1 encoder, such as rav1e. libaom works too.

  2. Call avif_serialize::serialize_to_vec(av1_data, None, width, height, 8)

See cavif for a complete implementation.

Dependencies

~69KB