Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/bin/ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ moq ... --broadcast event.hang export ts --passthrough > out.ts

| | Semantic | Passthrough (`--passthrough`) |
| --- | --- | --- |
| On the wire | One track per elementary stream, plus the PSI and SI the import keeps, in the [`mpegts`](/draft/moq-mpegts) catalog section | One [`m2ts`](/concept/hang#transport-streams) track of whole 188-byte packets |
| On the wire | One track per elementary stream, plus the PSI and SI the import keeps, in the [`mpegts`](/draft/moq-mpegts) catalog section | One [passthrough](/concept/hang#transport-streams) track of whole 188-byte packets, named in the same section |
| Output | A rebuilt TS: same media, programs, descriptors and kept SI; new packetization, PCR and table cadence | The source's packets, byte for byte, from the first group on |
| Browsers and `moq play` | Watch the video and AAC or Opus audio; MP2, AC-3 and E-AC-3 play only where the player has a decoder for them, which `moq play` does not | Have nothing to decode |
| A relay | Drops and prioritizes per track | Caches and drops whole runs of packets |
Expand Down
11 changes: 8 additions & 3 deletions doc/concept/hang.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,15 @@ Name the section with a namespaced key such as

A broadcast can carry an MPEG transport stream whole instead of demultiplexed
into renditions, for what demultiplexing cannot carry, such as a scrambled
service. The root `m2ts` section names the one track holding it:
service. The `mpegts` section's `passthrough` member names the one track holding
it:

```json
{
"m2ts": { "track": "0.m2ts", "randomAccess": true, "muxRate": 2499999 }
"mpegts": {
"muxRate": 2499999,
"passthrough": { "track": "0.m2ts", "randomAccess": true }
}
}
```

Expand All @@ -171,7 +175,8 @@ steps back is a new broadcast. `randomAccess` says whether every published group
began where a receiver can start decoding, and `muxRate` is the measured
constant multiplex rate in bits per second, absent for a variable-rate source.
A player has nothing to decode here. `moq import ts --passthrough` writes this
section (see [MPEG-TS](/bin/ts#passthrough-mode)); the encoding is in
member (see [MPEG-TS](/bin/ts#passthrough-mode)); the section, which also
describes a demultiplexed stream, is in
[draft-lcurley-moq-mpegts](/draft/moq-mpegts).

## Container
Expand Down
2 changes: 1 addition & 1 deletion doc/setup/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ These land with the next breaking release.
upgrade that offers no `qmux-NN` subprotocol with 400 instead of falling back
to the legacy `webtransport` format, so upgrade such clients before relays.
- **Data-track breaks are an object with no bytes** (#5815). A hang data
track (TS private PES, sections, `m2ts`, text) marks a discontinuity with a
track (TS private PES, sections, passthrough, text) marks a discontinuity with a
group of one empty object instead of a skipped group. Older consumers fail
to decode it, so upgrade exporters and players before publishers.
- **Auth requests name `webtransport`** (#5293). Relays report a WebTransport
Expand Down
55 changes: 4 additions & 51 deletions drafts/draft-lcurley-moq-hang.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ normative:
date: false

informative:
moqmpegts: I-D.lcurley-moq-mpegts
h273:
title: "Coding-independent code points for video signal type identification"
target: https://www.itu.int/rec/T-REC-H.273
Expand Down Expand Up @@ -999,57 +1000,8 @@ An edge that joins partway through a segment lists nothing before the first segm
A rendition's segments after its timestamps go back start a discontinuity on that rendition alone; `EXT-X-PROGRAM-DATE-TIME` lets players resynchronize across renditions.


# MPEG-TS Service Information {#mpegts-si}
A broadcast imported from an MPEG-TS multiplex can carry the multiplex's standalone service-information tables (ISO/IEC 13818-1 program-specific information and ETSI EN 300 468 DVB SI: SDT, NIT, BAT, EIT, and any table the publisher does not recognize) so an exporter can re-emit them byte-for-byte.
The sections are opaque: nothing in this mechanism parses a table, so an unrecognized long-form table round-trips exactly like a known one.
Short-form tables, recognized or not, are carried with latest-value semantics instead (see below): the short-form tables broadcast systems define are clocks and stuffing, and a hypothetical multi-section static one would collapse to its most recent section.

The tables are state, not events: a transport stream retransmits them continuously only because a TS receiver can tune in at any moment, so the repetition rate is a property of the unreliable transport, not of the data.
Here each table rides a dedicated snapshot track, delivered once at join and republished on change, per the root catalog's guidance that dynamic content is delegated to other tracks.
Consumers that are not TS exporters never pay for it.

## Catalog Section {#mpegts-si-catalog}
The catalog's `mpegts` section maps each carried table to its track under an `si` field, keyed by the PID the sections ride on and then by `table_id`:

~~~
type Mpegts = {
// ... other MPEG-TS carriage fields ...
"si": { [pid: string]: { [tableId: string]: SiEntry } } | undefined,
}

type SiEntry = {
"track": string,
"interval": number | undefined,
}
~~~

Both keys are written in decimal, since JSON object keys are strings.
`table_id` is byte 0 of generic section syntax, so the key is no less generic than the PID; which table_id ranges mean what is a DVB convention that appears nowhere in the schema.

* `track`: the name of the snapshot track carrying this table's sections, on the same broadcast as the catalog.
* `interval`: how often an exporter MUST re-emit the sections at most, in milliseconds. A hint carrying the table's own repetition requirement (for DVB, the ETSI TS 101 211 maxima). When absent, an exporter SHOULD fall back to a fast cadence of its own choosing, so an unknown table degrades to a safe rate rather than being dropped.

Entries are added when a table is first observed, which is acquisition-time traffic; steady-state table revisions touch only the named track, never the catalog.

## Track Format {#mpegts-si-track}
An SI track is binary, without the media container framing ({{container}}).

Each frame is one sub-table: its complete current sections, concatenated verbatim in `section_number` order, each including its header and CRC.
Sections are self-delimiting via `section_length`, so the frame needs no framing of its own.
A sub-table's identity is its generic section header (`table_id`, `table_id_extension`) extended by the documented disambiguators for two DVB table families: `original_network_id` (bytes 8..10) for SDT other (`table_id` 0x46), and `transport_stream_id` plus `original_network_id` (bytes 8..12) for EIT (0x4E..0x6F), whose generic identities are only unique within one network or transport stream.

Each group is a snapshot: reading its frames in order yields the table's complete current state, where a later frame replaces an earlier one with the same sub-table identity.
A joiner reads only the newest group and is current; older groups never need to be fetched.
A writer MAY append a frame to an open group to revise one sub-table incrementally; a writer that only ever cuts complete groups is trivially conformant.

A publisher MUST NOT mix versions within a sub-table's frame: sections of one version are buffered until the generation is judged complete and committed atomically.
Completeness is contiguity (all of `0..=last_section_number` present) or one observed full transmission cycle, whichever comes first: some tables number their sections sparsely (DVB EIT schedule skips unused numbers per segment), so a repeated section within the pending generation proves the cycle wrapped and the set is complete as transmitted.
A section lost before the cycle wraps is indistinguishable from a legitimately skipped number, so a committed set can transiently omit it until the next cycle re-supplies it; no section-counting receiver can do better.
A publisher SHOULD carry only sections whose `current_next_indicator` is set.

A section without a long-form header (short-form syntax: TDT/TOT and similar) has no extension, version, or numbering, so its table is a single latest-value slot: each arrival replaces the last, and a byte-identical repetition is not a change.
This is what makes a time table proxyable: each tick republishes a small snapshot, a joiner reads the newest, and staleness is bounded by the source's own repetition interval plus path latency, the same bound a receiver of the original multiplex has.
Carrying the source's time rather than synthesizing one keeps the clock consistent with the EPG (event times are expressed on the source's clock) and preserves TOT's local-time-offset descriptors, which are operator policy a re-multiplexer cannot invent.
# MPEG-TS {#mpegts}
A broadcast imported from an MPEG-TS multiplex MAY carry the `mpegts` root section {{moqmpegts}}: what demultiplexing loses, such as each track's PID and descriptors, the program identity, and the service information tables, or else the one track carrying the multiplex whole.


# Rooms
Expand Down Expand Up @@ -1105,6 +1057,7 @@ This document has no IANA actions.
- A data track marks a discontinuity with a group of one object with no bytes, since its empty payload is data. An object with no bytes on an audio or video track, or sharing its group, is malformed.
- Removed the Recording section: the store layout is a moq-archive format, documented with that crate, not part of this draft.
- Removed the viewer feedback `latency` field.
- Removed the MPEG-TS Service Information section: {{moqmpegts}} defines the `mpegts` root section.
- Added the optional video `preference` field: a consumer selects automatically among the highest preference it can decode.
- Added the optional video `reorder` field: the most frames that can precede one in decode order and follow it in presentation, fixed for the track once declared. A consumer that authors decode times derives them from it and the current group alone, refusing deeper reordering; without it, a consumer infers them from timestamps.
- Added an optional `instance` beside every rendition and data track `broadcast` reference ({{field-instance}}). A consumer reads each referenced path from the first broadcast it resolves for a catalog instance; a present `instance` fails a rendition that resolves another stream, and is best effort against an Instance a receiver minted.
Expand Down
Loading