kornelski / avif-serialize

Minimal pure Rust AVIF writer (bring your own AV1 payload)
https://lib.rs/avif-serialize
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link
av1 avif container iso-bmff miaf

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.