av1-obu-parser is a bitstream analysis tool for AV1. It parses AV1 Open
Bitstream Units (OBUs), keeps the cross-frame context required by frame
headers, and can also unpack IVF containers before feeding their payloads to
the OBU parser.
This is not a video decoder. It does not reconstruct pixels. The goal of this project is to inspect AV1 syntax structures and print useful stream metadata for debugging, learning, and tooling.
Features
- Parse AV1 OBU headers and payloads in pure Rust
- Keep parser context across Sequence Header, Frame Header, and Frame OBUs
- Read IVF file headers and iterate frame payloads with
IvfReader - Ship with a runnable example for inspecting
DEMO.ivf - Include focused unit and integration tests
License
This project is licensed under the MIT License. See LICENSE.
Quick Start
Clone the repository and run the test suite:
The repository includes a sample IVF file at the project root:
DEMO.ivf
Example Program
Run the bundled example against DEMO.ivf:
Limit the output to the first 10 OBUs:
Show TemporalDelimiter OBUs as well so the numbering matches other analyzers:
Use a different input file:
Library Usage
Parse a raw OBU payload
use ;
let data: = vec!;
let mut parser = default;
let mut buffer = from_slice;
while buffer.bytes_remaining > 0
Parse an IVF container first
use ;
let file_data = read?;
let ivf = new?;
println!;
let mut parser = default;
for frame in ivf.frames
# Ok::
Project Layout
src/buffer.rs: bit-level AV1 syntax readersrc/obu/: AV1 OBU parsing logicexamples/simple.rs: command-line inspection exampletests/integration_test.rs: parser and IVF integration coverage
Notes
- The example output is intended for debugging and comparison with other AV1 analyzers.
--show-delimiteris useful when you want local output to line up with tools that display every OBU, including temporal delimiters.