Skip to content

Commit 07d8fc1

Browse files
gwendalsimonclaude
andcommitted
feat(catalog): add m2tsEsPid field and ES-level carriage mode
Introduce ES-level carriage as a third mode alongside unmodified and modified carriage. A track with `m2tsEsPid` present carries exactly one elementary stream or signaling table per MOQT track, enabling per-ES subscription and subscriber-side program recombination. * Add optional `m2tsEsPid` Number field: identifies the single PID carried in the track; requires m2tsModified true; forbids m2tsMpts, m2tsPmtPid, m2tsSiPids, and m2tsScte35Pid * Add §5.5.3 Modified ES-Level Carriage: defines track payload rules, PCR cross-track reference, Group boundary synchronization requirement, subscriber recombination obligations, and altGroup audio semantics * Define MSF role values for SI-table and SCTE-35 ES-level tracks: "nit", "sdt", "eit", "tdt", "scte35" * Update §5.5 intro to describe three carriage modes * Update m2tsPmtPid, m2tsPcrPid, m2tsSiPids, m2tsScte35Pid definitions with ES-level constraints and cross-track PCR reference semantics * Add ES-level subscriber processing paragraph to §8 * Add catalog example: video + two alternate audio tracks + EIT track Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d0d8f62 commit 07d8fc1

1 file changed

Lines changed: 173 additions & 12 deletions

File tree

draft-gregoire-moq-msfts.md

Lines changed: 173 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,16 @@ assuming every Object has the declared size.
252252

253253
## Source Handling and Carriage Modes {#mpts}
254254

255-
A publisher carries a transport stream in one of two modes, signaled by the
256-
required `m2tsModified` field ({{m2ts-modified}}): unmodified carriage, where
257-
the source packets are forwarded as received, and modified carriage, where the
258-
publisher has changed the stream. The `m2tsMpts` field ({{m2ts-mpts}})
259-
indicates whether the track carries a single program or a whole multiplex, and
260-
it alone controls the presence of the per-program fields.
255+
A publisher carries a transport stream in one of three modes, signaled by the
256+
required `m2tsModified` field ({{m2ts-modified}}) and the optional
257+
`m2tsEsPid` field ({{m2ts-es-pid}}). When `m2tsModified` is false, the
258+
publisher forwards the source packets without modification (unmodified
259+
carriage). When `m2tsModified` is true and `m2tsEsPid` is absent, the
260+
publisher has modified the stream at the program level (modified carriage).
261+
When `m2tsModified` is true and `m2tsEsPid` is present, the track carries a
262+
single elementary stream (ES-level carriage). The `m2tsMpts` field
263+
({{m2ts-mpts}}) indicates whether the track carries a single program or a
264+
whole multiplex, and it alone controls the presence of the per-program fields.
261265

262266
### Unmodified Carriage {#unmodified-carriage}
263267

@@ -336,6 +340,39 @@ tracks are derived from the same MPTS source, the publisher SHOULD use the MSF
336340
`altGroup` field if the programs are alternate renditions of the same content;
337341
programs that are independent services SHOULD be published as separate tracks.
338342

343+
### Modified ES-Level Carriage {#es-level-carriage}
344+
345+
When `m2tsEsPid` ({{m2ts-es-pid}}) is present, the track carries a single
346+
elementary stream or signaling table. The track payload contains only TS
347+
packets for the PID identified by `m2tsEsPid`; PAT, PMT, and null packets are
348+
not included. Publishers SHOULD use the MSF `initDataList` field to carry the
349+
PAT and PMT of the originating program so that subscribers can identify the
350+
program structure before processing elementary-stream packets. When the
351+
publisher chooses to interleave PAT and PMT in the track payload for inline
352+
program initialization, `m2tsPsiInterval` SHOULD be declared; otherwise
353+
`m2tsPsiInterval` MUST be absent.
354+
355+
When `m2tsPcrPid` equals `m2tsEsPid`, the track embeds the Program Clock
356+
Reference and provides the timing reference for the program. When `m2tsPcrPid`
357+
identifies a different PID, that PID is carried by another track; a subscriber
358+
requiring PCR-based timing MUST subscribe to the track carrying that PID.
359+
360+
A publisher producing multiple ES-level tracks for the same program MUST align
361+
Group boundaries across all those tracks so that matching Group numbers
362+
correspond to the same presentation position. This alignment allows a
363+
subscriber to combine ES-level tracks reliably. A subscriber combining
364+
multiple ES-level tracks into a single TS output MUST construct a PAT listing
365+
the carried program and a PMT listing the PIDs of all subscribed ES-level
366+
tracks, and MUST interleave packets from all tracks. The subscriber sources
367+
PCR from the track where `m2tsPcrPid` equals `m2tsEsPid`. When `m2tsMuxRate`
368+
is declared on the PCR-bearing track, the subscriber SHOULD use that value to
369+
restore the original mux rate in the combined output.
370+
371+
Audio ES-level tracks for the same program MAY share an `altGroup` to indicate
372+
that they are alternate language renditions. A subscriber MAY subscribe to
373+
more than one audio track within an alternate group and include all subscribed
374+
audio PIDs in the reconstructed PMT.
375+
339376
## PCR and Timing {#pcr-timing}
340377

341378
The Program Clock Reference (PCR) is carried inside adaptation fields of
@@ -398,6 +435,7 @@ Table 1 lists the m2ts-specific fields defined within a track object.
398435
| M2TS random access | m2tsRandomAccess | {{m2ts-random-access}} |
399436
| M2TS timestamp mode | m2tsTimestampMode | {{m2ts-timestamp-mode}} |
400437
| M2TS SCTE-35 PID | m2tsScte35Pid | {{m2ts-scte35-pid}} |
438+
| M2TS ES PID | m2tsEsPid | {{m2ts-es-pid}} |
401439
| M2TS MPTS | m2tsMpts | {{m2ts-mpts}} |
402440

403441
Use of the MSF `initRef` and `initDataList` fields by m2ts tracks is described
@@ -446,7 +484,8 @@ Required: Optional JSON Type: Number Location: Track Object
446484
The packet identifier carrying the Program Map Table for `m2tsProgramNumber`.
447485
This field is advisory and does not replace the Program Association Table or
448486
Program Map Table carried in the transport stream. It MUST be absent when
449-
`m2tsMpts` is true.
487+
`m2tsMpts` is true. It MUST be absent when `m2tsEsPid` is present, because
488+
an ES-level track does not carry a PMT in its payload.
450489

451490
## M2TS PCR PID {#m2ts-pcr-pid}
452491

@@ -455,7 +494,9 @@ Required: Optional JSON Type: Number Location: Track Object
455494
The packet identifier carrying the Program Clock Reference for the program
456495
identified by `m2tsProgramNumber`. This field is advisory and does not
457496
replace PCR signaling in the transport stream. It MUST be absent when
458-
`m2tsMpts` is true.
497+
`m2tsMpts` is true. When `m2tsEsPid` is present, this PID MAY be carried by
498+
a different track in the same session; a subscriber requiring PCR-based timing
499+
MUST subscribe to the track where `m2tsPcrPid` equals `m2tsEsPid`.
459500

460501
## M2TS PSI Interval {#m2ts-psi-interval}
461502

@@ -486,7 +527,9 @@ The packet identifiers of SI tables retained in the filtered track, in addition
486527
to those listed in the Program Map Table. This field is advisory. Publishers
487528
SHOULD include this field when they retain DVB or ATSC SI tables. Subscribers
488529
MAY use this list to verify which service information tables are present without
489-
inspecting the packet stream.
530+
inspecting the packet stream. This field MUST be absent when `m2tsEsPid` is
531+
present; at ES-level granularity, each SI table is published as a separate
532+
track identified by `m2tsEsPid` and the MSF `role` field.
490533

491534
## M2TS Random Access {#m2ts-random-access}
492535

@@ -513,9 +556,33 @@ Required: Optional JSON Type: Number Location: Track Object
513556

514557
The PID carrying SCTE-35 splice_info_section() messages for this track. This
515558
field is advisory; SCTE-35 messages are also discoverable via the PMT
516-
conditional access or registration descriptor. When present, receivers MAY use this value to locate splice events
517-
without parsing PMT. Publishers SHOULD include this field when the track carries
518-
SCTE-35 splice signaling.
559+
conditional access or registration descriptor. When present, receivers MAY
560+
use this value to locate splice events without parsing the PMT. Publishers
561+
SHOULD include this field when the track carries SCTE-35 splice signaling.
562+
This field MUST be absent when `m2tsEsPid` is present; when SCTE-35 is
563+
published as an ES-level track, the track's `m2tsEsPid` and `role` fields
564+
identify it.
565+
566+
## M2TS ES PID {#m2ts-es-pid}
567+
568+
Required: Optional JSON Type: Number Location: Track Object
569+
570+
The Packet Identifier of the single elementary stream or signaling table
571+
carried by this track. When present, the track carries only TS packets for
572+
this PID; it does not carry PAT, PMT, or null packets. This field MUST be
573+
absent when `m2tsMpts` is true. When `m2tsEsPid` is present, `m2tsModified`
574+
MUST be true, `m2tsPmtPid` MUST be absent, `m2tsSiPids` MUST be absent, and
575+
`m2tsScte35Pid` MUST be absent.
576+
577+
For tracks carrying DVB or ATSC service information tables, publishers SHOULD
578+
set the MSF `role` field to one of the following values: `"nit"` for the
579+
Network Information Table (PID 0x0010), `"sdt"` for the Service Description
580+
Table and Bouquet Association Table (PID 0x0011), `"eit"` for the Event
581+
Information Table (PID 0x0012), and `"tdt"` for the Time and Date Table and
582+
Time Offset Table (PID 0x0014). For tracks carrying SCTE-35 splice
583+
information, publishers SHOULD set `role` to `"scte35"`. For media
584+
elementary streams, publishers SHOULD set `role` to the MSF-defined value for
585+
the stream type, for example `"video"` or `"audio"`.
519586

520587
## M2TS MPTS {#m2ts-mpts}
521588

@@ -772,6 +839,90 @@ PAT and PMT on the new track before routing packets to a decoder.
772839
}
773840
~~~
774841

842+
## ES-Level Tracks - Per-Elementary-Stream Publishing {#example-es-level}
843+
844+
This example shows a live program published as separate ES-level tracks: one
845+
video track carrying the PCR, two alternate audio tracks (English and Spanish),
846+
and one Event Information Table track. The video and audio tracks MUST have
847+
synchronized Group boundaries. A subscriber combining video and one audio
848+
track constructs a PAT and PMT listing the two subscribed PIDs and sources PCR
849+
from the video track (PID 257).
850+
851+
~~~ json
852+
{
853+
"version": "draft-01",
854+
"generatedAt": 1746104606044,
855+
"tracks": [
856+
{
857+
"name": "program-1-video",
858+
"namespace": "live.example.com/channel/1",
859+
"packaging": "m2ts",
860+
"m2tsModified": true,
861+
"isLive": true,
862+
"targetLatency": 1000,
863+
"role": "video",
864+
"mimeType": "video/mp2t",
865+
"bitrate": 5000000,
866+
"m2tsPacketSize": 188,
867+
"m2tsPacketsPerObject": 64,
868+
"m2tsProgramNumber": 1,
869+
"m2tsPcrPid": 257,
870+
"m2tsEsPid": 257,
871+
"m2tsRandomAccess": true
872+
},
873+
{
874+
"name": "program-1-audio-en",
875+
"namespace": "live.example.com/channel/1",
876+
"packaging": "m2ts",
877+
"m2tsModified": true,
878+
"isLive": true,
879+
"targetLatency": 1000,
880+
"role": "audio",
881+
"mimeType": "video/mp2t",
882+
"bitrate": 128000,
883+
"altGroup": 2,
884+
"m2tsPacketSize": 188,
885+
"m2tsPacketsPerObject": 32,
886+
"m2tsProgramNumber": 1,
887+
"m2tsPcrPid": 257,
888+
"m2tsEsPid": 258,
889+
"m2tsRandomAccess": true
890+
},
891+
{
892+
"name": "program-1-audio-es",
893+
"namespace": "live.example.com/channel/1",
894+
"packaging": "m2ts",
895+
"m2tsModified": true,
896+
"isLive": true,
897+
"targetLatency": 1000,
898+
"role": "audio",
899+
"mimeType": "video/mp2t",
900+
"bitrate": 128000,
901+
"altGroup": 2,
902+
"m2tsPacketSize": 188,
903+
"m2tsPacketsPerObject": 32,
904+
"m2tsProgramNumber": 1,
905+
"m2tsPcrPid": 257,
906+
"m2tsEsPid": 259,
907+
"m2tsRandomAccess": true
908+
},
909+
{
910+
"name": "program-1-eit",
911+
"namespace": "live.example.com/channel/1",
912+
"packaging": "m2ts",
913+
"m2tsModified": true,
914+
"isLive": true,
915+
"role": "eit",
916+
"mimeType": "video/mp2t",
917+
"m2tsPacketSize": 188,
918+
"m2tsPacketsPerObject": 16,
919+
"m2tsProgramNumber": 1,
920+
"m2tsEsPid": 18
921+
}
922+
]
923+
}
924+
~~~
925+
775926
# Subscriber Processing {#subscriber-processing}
776927

777928
A subscriber obtains the catalog using the MSF catalog workflow and subscribes
@@ -800,6 +951,16 @@ time bound to a concrete MOQT Group location for use with a Joining FETCH
800951
{{MOQTransport}}. A subscriber MUST NOT begin media presentation until it has
801952
received a valid PAT and PMT for the program to be decoded.
802953

954+
When a subscriber receives ES-level tracks ({{es-level-carriage}}), it MUST
955+
align on the same starting Group number across all subscribed ES-level tracks
956+
for the same program before combining them. The subscriber constructs the combined TS
957+
output by building a PAT listing the carried program and a PMT listing the PIDs
958+
of all subscribed ES-level tracks, then interleaving packets from all tracks.
959+
PCR is sourced from the track where `m2tsPcrPid` equals `m2tsEsPid`. A
960+
subscriber MUST NOT begin media presentation until it has received at least
961+
one Group from each subscribed ES-level track and has obtained the originating
962+
program's PAT and PMT, either from `initDataList` or from the packet stream.
963+
803964
# Switching and Alternate Renditions {#switching}
804965

805966
Tracks with `m2tsMpts` set to true MUST NOT be included in an `altGroup`,

0 commit comments

Comments
 (0)