mediaway-container
Status: early development (
0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.
The Mediaway container facade: shared mux/demux traits plus Mediaway-typed modules for
eight container formats — mp4, webm, wav, adts, mp3, ogg, flv, ts. Each
module is a sans-io state machine over the workspace's format cores, speaking
mediaway_common's StreamInfo/Packet types so apps can swap formats behind one
interface.
Quick start
use ;
use mp4;
// Typestate mux: register tracks, begin, push packets, collect bytes.
let mut muxer = new;
let v_track = muxer.add_track?;
let mut muxer = muxer.begin; // Open -> Live
muxer.push_packet?;
muxer.flush;
let mut mp4_bytes = Vecnew;
muxer.poll_bytes;
// Streaming demux: feed bytes, poll packets.
let mut demux = new;
demux.push_bytes;
while let Some = demux.poll_packet
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)
| Format | Module | Status | Notes |
|---|---|---|---|
| MP4 / fMP4 | mp4 |
✅ | Mux + demux + ClearKey CENC |
| WebM | webm |
✅ | Mux + demux (full Matroska-profile demux) |
| WAV / RIFF (PCM) | wav |
✅ | Mux + demux; own method shape (size known up front) |
| ADTS (raw AAC) | adts |
✅ | Mux/Demux traits |
| MP3 | mp3 |
✅ | Demux only; no Mux fit (per-frame padding bit) |
| Ogg | ogg |
✅ | Mux/Demux; codec from OpusHead/Vorbis id header |
| FLV | flv |
✅ | Codec-aware mux + demux (AVC video, AAC/MP3 audio) |
| MPEG-TS | ts |
✅ | Demux only; mux exposes per-PID write_access_unit |
VP8 CodecKind mapping |
— | ❌ | Recognized structurally in WebM, not representable yet |
Docs
docs/roadmap.md— stages, deferred items, design decisions- Sans-IO cores:
iso-bmff,ebml-webm,riff-wave-core,adts-core,mpeg-audio,ogg-core,flv-core,mpeg-ts-core - 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.