#avif #av1 #heif #image-encoding #mux #width-height #bmff

avif-serialize

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

4 releases

0.8.1 Dec 6, 2022
0.7.7 Nov 27, 2022
0.7.6 Apr 7, 2022
0.7.5 Sep 15, 2021
0.6.4 Aug 29, 2020

#631 in Images

Download history 21709/week @ 2024-03-14 35986/week @ 2024-03-21 34476/week @ 2024-03-28 34030/week @ 2024-04-04 35529/week @ 2024-04-11 35273/week @ 2024-04-18 41900/week @ 2024-04-25 49284/week @ 2024-05-02 47101/week @ 2024-05-09 47423/week @ 2024-05-16 34503/week @ 2024-05-23 32127/week @ 2024-05-30 33611/week @ 2024-06-06 38629/week @ 2024-06-13 38863/week @ 2024-06-20 35916/week @ 2024-06-27

152,097 downloads per month
Used in 22 crates (via ravif)

BSD-3-Clause

38KB
927 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.

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 cavif 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

~66KB