mpeg-audio
Status: early development (
0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.
Sans-IO MPEG-1/2/2.5 Layer III ("MP3") elementary-stream framing: mux writes a correct
4-byte header around already-encoded frame bodies, demux is an incremental
push_bytes/poll_frame reader. MPEG audio has no container-level header — frames
self-describe, so this crate frames, it does not encode/decode. No I/O in the core.
Quick start
use ;
let header = FrameHeader ;
let muxer = new?;
let mut mp3 = Vecnew;
muxer.write_frame?; // per-call padding bit
let mut demuxer = new;
demuxer.push_bytes;
while let Some = demuxer.poll_frame?
Status
Status marks: ✅ first-class (tests for claimed scope) · ⚡ Zero-Copy path (no payload copy; implies ✅) · 🆗 best-effort / prototype · 🛠️ planned · ❌ attempted and genuinely blocked · 👻 not exercisable yet (no hardware / device / session available)
| Area | Status | Notes |
|---|---|---|
| Mux (Layer III header + per-call padding) | ✅ | MPEG-1/2/2.5 bitrate/sample-rate tables |
| Demux (incremental, partial-input safe) | ✅ | Reads no-CRC and CRC headers; frame length cross-checked against spec values |
| Layer I / II | ❌ | Rejected with a clear UnsupportedLayer error, not misparsed |
| Mux-side CRC | 🛠️ | Demux already reads it; mux writes no-CRC only |
| ID3v1/ID3v2 tag skip, Xing/VBR headers | 🛠️ | Assumes frame-aligned input |
Docs
docs/roadmap.md— stages, deferred items, design decisionsmediaway-container— Mediaway-typedmp3surface over this crate- Root README — container support matrix
Contributing
Contributions are welcome — open an issue or pull request at github.com/nyxways/mediaway.
License
MIT OR Apache-2.0.