mpeg-ts-core
Status: early development (
0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.
Sans-IO MPEG-2 Transport Stream (ISO/IEC 13818-1) mux and demux for single-program streams: PAT/PMT with correct PSI CRC-32, 188-byte TS packetization with adaptation-field stuffing, and PES encapsulation with 33-bit PTS/DTS. Demux is an incremental reader that tracks PAT/PMT and reassembles PES per PID. No I/O in the core.
Quick start
use ;
let streams = &;
let mut muxer = new?;
let mut ts = Vecnew;
muxer.write_pat_pmt;
muxer.write_access_unit?;
let mut demuxer = new;
demuxer.push_bytes;
while let Some = demuxer.poll_access_unit?
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 (PAT/PMT + per-PID PES, 188-byte packets) | ✅ | Correct adaptation-field stuffing (real bug found via round-trip tests) |
| Demux (incremental, PAT/PMT tracking, per-PID PES reassembly) | ✅ | |
| Timestamps | ✅ | PTS-only or PTS+DTS, 33-bit bit-packed |
| Elementary streams | ✅ | H.264, HEVC, AAC, MP3 |
| Multi-program transport streams | 🛠️ | One PAT entry only |
| PCR insertion/extraction | 🛠️ | PCR_PID written as unassigned |
| Multi-packet PSI section reassembly | 🛠️ | PAT/PMT must fit one TS packet |
Docs
docs/roadmap.md— stages, deferred items, design decisionsmediaway-container— Mediaway-typedtssurface 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.