| 1 |
# AVIF image serializer (muxer) |
| 2 |
|
| 3 |
Minimal writer for AVIF header structure. This is lean, safe-Rust alternative to [libavif](https://lib.rs/libavif). |
| 4 |
It creates the jungle of MPEG/HEIF/MIAF/ISO-BMFF "boxes" as appropriate for AVIF files. Supports alpha channel embedding. |
| 5 |
|
| 6 |
Compatible with decoders in Chrome 85+, libavif v0.8.1, and Firefox 92. It's used in [cavif](https://lib.rs/cavif) and other encoders. |
| 7 |
|
| 8 |
Together with [rav1e](https://lib.rs/rav1e), it allows pure-Rust AVIF image encoding. |
| 9 |
|
| 10 |
## Requirements |
| 11 |
|
| 12 |
* [Latest stable](https://rustup.rs) version of Rust. |
| 13 |
|
| 14 |
## Usage |
| 15 |
|
| 16 |
1. Compress pixels using an AV1 encoder, such as [rav1e](https://lib.rs/rav1e). [libaom](https://lib.rs/libaom-sys) works too. |
| 17 |
|
| 18 |
2. Call `avif_serialize::serialize_to_vec(av1_data, None, width, height, 8)` |
| 19 |
|
| 20 |
See [`ravif` crate sources](https://github.com/kornelski/cavif-rs) for example usage. |
| 21 |
|