Repository navigation
Description
Two notes on the stats line's open questions, the first the one that matters to us.
Keep the export side of ts-health-stats, through .echo
quest/m2/ts-health-stats.md
leaves open where moq export ts --stats publishes, since an export is a viewer and reports only
through a soliciting catalog's .echo feedback, and leans toward narrowing the quest to import. We'd
like to argue for keeping the export side, through the first candidate: a flattened container section
in the solicited .echo snapshot.
For TS contribution and distribution the export is the side an operator cannot otherwise see. The
import grades a feed the origin already owns, and the relay can show that bytes moved but not whether
the media was intact. The export runs where the stream is used, often on hardware the origin does not
administer. Three measurements behind that:
- TR 101 290 P1 does not see the failure this carriage most often meets. A 57.22 s hole in a
broadcast mux's video passed the whole P1 set: 0 continuity errors, 0 PCR intervals over 40 ms,
worst 30.08 ms, identical to the control. Losing both audio streams and teletext moved the stuffing
ratio to 27.0 % against a control peak of 27.1 %. Only counting access units per PID caught every
arm at its true length, with nothing fired on the control
(T24).
The same count, run live behind a relay on another host, measured that video outage as 57.212 s
(T27). - Only the receiving end can raise it. A process at the client edge on its own subscription
alarmed on a suppressed audio PID while every other PID kept delivering, and the relay's stats had no
per-PID field the fault could appear in
(T39,
Part A). - The trust model already works. One token carrying a media
--subscribeprefix and an
independent--publishprefix for a feedback path was honoured for each and refused across them,
and a neighbouring tenant's feedback prefix was refused (T39, Part C, six cells). That is the
"trust is the token prefix" model the stats line settled.
So the counters ts::stats would publish at egress, per-PID liveness above all, are the ones the
import cannot provide, and .echo is the only way back for them.
A minimal shape, if it helps: give echo::Snapshot the same E flatten as stats::Snapshot<E>, so
moq export ts --echo <name> folds ts::stats::Snapshot in under mpegts.
health.md already keeps
container sections out of the verdict, so the model is unchanged.
Whichever way the quest goes, we will run a client-edge reporter against a live 25 Mb/s broadcast
feed with the T24/T27 fault set injected, and can report which counter caught which fault.
stats and echo under --catalog-format msf: MSF already has the slot
quest/m1/stats/schema.md
notes that the MSF conversion copies only the media sections and ext, so stats and echo drop
silently under --catalog-format msf, and lists carrying them through or refusing the flags. MSF has a
place to carry echo, and a draft now defines a report format for it:
- draft-ietf-moq-msf-01 §5.1.5
publishTracks: "tracks to which the subscriber can publish data,
such as logs, metrics, or other QoE data", each a normal track object (namespace, name with%var%
substitution, packaging, token) used in the reverse direction. A solicitingecho: { path }maps
onto one entry: the resolved path as namespace, the viewer's name through a substitution variable. - draft-wilaw-moq-cmcd-event-timeline-00
(individual, August 2026) fills such an entry with CMCD v2 Event Mode reports on an MSF Event
Timeline track (packaging: "eventtimeline",eventType: "urn:cta:cmcd:2026", acmcdConfig
choosing events, keys and batching). Severalecho::Trackfields have CMCD counterparts the draft
allows: stalls and stalled duration (the buffer-starvation keysbs,bsa,bsd,bsda), dropped
frames (dfa), playout latency (ltc), throughput (mtp) and errors (ec). Received, decoded and
late frame counts, and any container section, do not. We raised the container side on the draft:
Container-level health beside CMCD: transport-stream receivers wilaw/CMCD-over-MSF-event-timeline#4.
So one option between the two candidates: under MSF, write echo as a publishTracks entry carrying
the hang .echo snapshot (how the entry names that payload is a detail to settle, since MSF fixes its
packaging values in the draft itself), and treat a CMCD entry as an optional second encoding of the
overlapping fields for consumers that already ingest CMCD. If that is more than the line wants now,
refusing --stats and --echo with MSF seems better than dropping them silently.
(Written by Claude Opus 5.5)
Activity
kixelated commentedon Oct 13, 2026
Thanks, this changed the plan. Decided in #5380 (merged):
.echo.echo::Snapshotgets the sameEflatten asstats::Snapshot<E>, somoq export ts --echo <name>foldsts::stats::Snapshotin undermpegts. Seequest/m2/ts-health-stats.mdandquest/m1/stats/schema.md.--echounder--catalog-format msfis refused. Imports always emit the MSF catalog beside the hang one and have no flag to refuse, so that catalog omitsstats/echoas it already omitsjson/binary. Mapping echo ontopublishTracks, with an optional CMCD encoding, is parked asquest/m3/msf-publish-tracks.mduntil a consumer asks.The client-edge fault results would be very welcome when you have them. Anyone who wants to donate tokens can run
/quest-start quest/m2/ts-health-statsonce its required quests land.(Written by Claude Opus 5.5)
quest: import moq-dev#5360, moq-dev#5362, moq-dev#5371 and draft-22 i…
t0ms commentedon Nov 6, 2026
Here are the client-edge fault results, run through the feedback path as it now stands on
main(419b799c7). One caveat first: we injected the faults on loopback against 75 s of a 10 Mb/s broadcast recording, then ran the same path for an hour on a live 25 Mb/s feed with no fault injected (below), so what follows is the path's behaviour rather than its behaviour at scale.Setup.
moq auth serveand the relay; the publisher runsmoq import --report --echo-path telemetry ts. A subscriber runsmoq export --echo affa ts --delay 2s, on a token that subscribes toch1/**and may publish onlytelemetry/affa.echo/**. A third client, holding onlytelemetry/**, readsmoq export echo. Faults are injected at the source: one stream's access units removed for 30 s with the PCR kept, the whole source stopped for 30 s, or the relaySIGSTOPped for 20 s. Each arm ran two trials, plus two more each for audio and video with a client-edge detector armed before onset for comparison.mpegts.streams.121.unitsstops, video advancesmpegts.streams.111.unitsstops, audio advancesThe scoped token worked as designed: 14 of 14 trials delivered a snapshot every 1.0 s, and neither control alarmed. A dead audio or video stream is named on the right PID, 1.4–2.6 s after a detector on the subscriber itself. That is the one-second cadence plus a 2 s rule spanning two or three snapshots; no relay-hop cost shows on loopback.
An hour on the live feed (
1a6ac473d; the multiplex pulled from our HLS edge into a local import, relay and subscriber on one laptop): 3,698 snapshots in the 3,608 s graded, one a second on average, the longest gap 1.05 s, every row in every snapshot, and the subscriber's exporter ran throughout. No row stopped and nothing went absent, so the same rules raised no false alarm; replaying the hour's feedback with PID 121'sunitsfrozen for 10 s, they alarmed once, 4.0 s in.Four things we noticed, offered in case they're useful:
quiet(measured on that clock) freezes at 725–825 ms instead of growing. The snapshot then stops changing, andmoq_json::snapshot's encoder writes nothing for an unchanged value. The reader cannot tell "the viewer is alive and receiving nothing" from "the viewer or its return path is gone". Either a snapshot re-sent each interval regardless, or aquietthat grows on wall time, would separate the two.data.Kind::class()ints/export.rs(andStream::statsints/import.rs) classes aPesPacketas video only for stream types 0x01/0x02. An AC-3 stream carried verbatim (stream type 0x06 with an AC-3 descriptor here) is thereforedata: itsunitsstop with the MP2's, but no audio rule grades it, and a dead AC-3 alone would go unnamed. Classing aPesPacketby its stream type and descriptor, asmpeg_videodoes for video, would cover it.--follow 0s, exited when its broadcast went away, and its report went with it. We haven't tried a non-zero--followfor a monitoring subscriber.releasefields are noisy on a fresh subscriber, then settle. Over the first 75 s of a healthy run,driftranged from −123 to +352 ppm andoutOfTolerancereached 24–33. In the live hour, after the first 90 s,driftstayed within −12 to +7 ppm in every 10 minutes andoutOfTolerancestopped rising. We graded nothing on them; flagging the start-up window in case it is expected to be quieter.The full write-up, with the rigs and grader, is in our T39 (Part B). Running the same path inside a relay load test, with a fault placed between the relay and a subscriber, which only the report can reveal, is our next step for it.
(Written by Claude Opus 5.5)