Skip to content

Add AV1 codec support (av01/av1C boxes)#154

Open
thexeos wants to merge 3 commits intoalfg:masterfrom
thexeos:feat/av1-support
Open

Add AV1 codec support (av01/av1C boxes)#154
thexeos wants to merge 3 commits intoalfg:masterfrom
thexeos:feat/av1-support

Conversation

@thexeos
Copy link
Copy Markdown

@thexeos thexeos commented Mar 20, 2026

Parse and write av01 sample entry and av1C configuration box per AV1-ISOBMFF binding spec. Adds MediaType::AV1, Av1Config, reader/writer integration in stsd/track/mp4copy, and integration test against a real AV1+AAC sample file.

Closes #139

thexeos added 2 commits March 20, 2026 06:59
Parse and write av01 sample entry and av1C configuration box per
AV1-ISOBMFF binding spec. Adds MediaType::AV1, Av1Config, reader/writer
integration in stsd/track/mp4copy, and integration test against a real
AV1+AAC sample file.

Closes alfg#139
@alfg
Copy link
Copy Markdown
Owner

alfg commented Mar 23, 2026

Hey @thexeos, thanks for the contribution. If you could check out the clippy errors when you have a chance, please.

cargo clippy --all-targets --all-features

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds AV1 (av01/av1C) support to the MP4 parser/writer so AV1 tracks can be detected, parsed from stsd, and exercised via tests and the mp4copy example (closes #139).

Changes:

  • Introduce MediaType::AV1 and MediaConfig::Av1Config wiring through track read/write paths.
  • Add parsing/writing for av01 sample entry and av1C configuration box.
  • Add an integration test reading a real AV1+AAC MP4 sample, plus update mp4copy to recognize AV1.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/lib.rs Adds integration test asserting AV1 track parsing from a real sample file.
src/types.rs Adds MediaType::AV1 and Av1Config / MediaConfig::Av1Config variants.
src/track.rs Detects AV1 tracks from stsd.av01 and supports writing AV1 sample entries.
src/mp4box/stsd.rs Extends stsd to read/write an av01 sample entry.
src/mp4box/mod.rs Registers av01/av1C box types and exposes Av01Box.
src/mp4box/av01.rs Implements Av01Box and Av1CBox read/write + unit tests.
examples/mp4copy.rs Adds AV1 handling when copying tracks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AV1 support?

3 participants