You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
export ts: two co-started exports stop being byte-identical after a republish in 5 of 13 runs #5101
Since #4582's closure, a source whose timeline steps back is carried by restarting moq import ts
at the step, under a fresh epoch, and the newer epoch replaces the old broadcast. We measured what
that costs a co-started 1+1 pair of exports, because ST 2022-7 merging needs the two legs to emit
identical packets in identical positions.
Setup.main at f8215bc47, moq-lite-07-wip on every process, one local relay, one host. Two moq export ts --delay 1s --linger 30s started together before the source. The source is a broadcast
clip (AVC, MP2, AC-3, teletext, SCTE-35; CBR 9.95 Mb/s) with one flagged backward step 40 s in, of
1 s or 600 s, played for 90 s, either piped straight into the importer (tsp -P regulate | moq import ts) or through an SRT hop and multicast into a supervised tsp -I ip | moq import ts. A supervisor
restarts the importer as soon as it exits.
What works. In all thirteen runs the importer exits once, on frame timestamp … is below the
previous group's start, the next one publishes 11–12 ms later, and both exports follow the new
broadcast and exit 0, with no unit missing on either side of the break and no late drop. The step
costs 2.9–3.0 s of programme pipe-fed, set by the export's restart rather than the step.
What does not. The two exports are byte-identical across the break in 8 of 13 runs. In the other
five:
Feed, step
Packets in common
Identical
First difference
PIDs differing
pipe, 600 s
579,992
99.52 %
10.6 s after the break
video only
pipe, 1 s
580,832
99.14 %
25.6 s after the break
video only
SRT, 600 s
523,250
99.02 %
25.6 s after the break
video only
SRT, 1 s
534,331
42.34 %
at the cutover
video, MP2, AC-3
The video-only cases, these three and a pipe-fed 1 s run before the batch. In that run, the one
we examined, the video payload and all 3,532 PCR values are identical in both legs. What differs
is which packets carry a PCR and where stuffing falls, from the point where the two multiplexers
ordered one pair of packets differently.
The cutover case. The two exports left the old broadcast one picture apart (1,300 against
1,299 pictures before the break), so everything after differs.
No pair differed before the first discontinuity flag of either leg. So a co-started pair is
identical until a republish, and after one it is identical in most runs but not all.
What we have not located is why the video packet order depends on the run after a re-acquisition
when it does not before one. We read the second case as which old-broadcast frame each export had
received when the new broadcast replaced it, which is arrival rather than the stream. Is the
schedule after a re-acquisition intended to be a function of the stream alone, as it is from a
co-started start? If so, we can rerun with the jitter buffer's acquisition logged on both legs to
find the first decision that differs.
Thanks for the measurements. The answer to your question is no. After a republish, the schedule is not meant to be a function of the stream alone, and byte-identical output across a restart is not something we will support.
A replaced broadcast (a new epoch, or an epochless restart) is a new broadcast. export ts will not carry its stream across one by default. --linger waits only for the same epoch to return, and a replacement ends the export. A new --stitch opts in to following it: a fresh ts::Export with a full program switch (new PMT version, discontinuity_indicator on every PID). That is quest/m0/broadcast-epoch/export-ts.md, and it replaces today's resume().
For ST 2022-7, quest/m2/ts-hitless.md (--sync, catalog-clock anchoring) promises identical legs within one epoch: across joins, skips and drift, but not across a replacement. After one, each leg starts a fresh stream and the two may differ, as in your five runs.
Closing as won't fix for the cross-restart case. The within-epoch guarantee is tracked by ts-hitless.
Activity
kixelated commentedon Oct 9, 2026
Thanks for the measurements. The answer to your question is no. After a republish, the schedule is not meant to be a function of the stream alone, and byte-identical output across a restart is not something we will support.
Decision (planned in #5108):
export tswill not carry its stream across one by default.--lingerwaits only for the same epoch to return, and a replacement ends the export. A new--stitchopts in to following it: a freshts::Exportwith a full program switch (new PMT version,discontinuity_indicatoron every PID). That isquest/m0/broadcast-epoch/export-ts.md, and it replaces today'sresume().quest/m2/ts-hitless.md(--sync, catalog-clock anchoring) promises identical legs within one epoch: across joins, skips and drift, but not across a replacement. After one, each leg starts a fresh stream and the two may differ, as in your five runs.Closing as won't fix for the cross-restart case. The within-epoch guarantee is tracked by ts-hitless.
(Written by Claude Opus 5.5)
quest: import #5052 and #5101 as no-stitch and fresh TS export restar…