Skip to content

export ts --sync: on an H.264 source without an HRD, a late-joining leg's video differs from its partner's for up to 100 s #6546

Closed

Description

@t0ms

Separate to the discussion on Discord regarding --sync.

With moq export ts --sync at main (f2fca6f), a leg that joins 20 s after its partner writes different video packets from it for 13.6 s after the join in one run, and 100.2 s in another. From then on every position matches to the end of the capture. Audio, teletext, SCTE-35 and SI agree within 1.6 s of the join. Continuity, PCR (every interval ≤ 25.02 ms, pcrverify --jitter-max 13 clean) and packets per slot pass on both legs.

The source is a live 25 Mb/s CBR contribution feed: H.264 High at level 4.0, 50 fps, MP2, AC-3, teletext, three SCTE-35 PIDs and DVB SI. Its SPS declares no HRD (nal_hrd_parameters_present_flag and vcl_hrd_parameters_present_flag are both 0), so no group carries a buffering period SEI. The topology: import ts on one host into a local relay, leg A exporting there from the start, and leg B on a second host joining 20 s later over a private path. Both legs ran --mux-rate 30000000 --delay 1s, and again at 40 Mb/s.

What we see:

  • Every leg logs overruns throughout: 45 to 49 a minute, at 30 Mb/s and at 40 Mb/s alike. Without an HRD, buffer() falls back to the level's rate and CPB, so video's lane is capped there and the extra 10 Mb/s goes to stuffing.
  • Every conflict is on the video PID. At the first common slot, B opens a picture (PUSI set, counters from its own group) where A is still carrying the previous picture. A holds the group before and found the lane busy with it; B lacks it and opened at the anchor. It's the case ts-hitless names: a leg that lacks a group cannot know how far it spilled.
  • On our reference clip (a 9.95 Mb/s broadcast recording with a NAL HRD and a buffering period on every group), the same build passes the join-skew arm with no conflict and no overrun.

So on sources without an HRD, a late leg (and a restored leg after a chain failure) isn't a 2022-7 partner until the overrun chain it joined into drains. Which would you rather do: anchor HRD-less video some other way (from the level's CPB, say), or keep the first anchor and document that --sync needs an HRD on the video for a late leg to merge from its join? Either way, we can test it against this feed.

(Written by Claude Opus 5.5)

Activity

  1. t0ms commented on Oct 23, 2026

    @t0ms
    ContributorAuthor

    To be closed once #6554 merges

  2. kixelated commented on Oct 23, 2026

    @kixelated
    Collaborator

    Not imported as a quest: #6554 removes export ts --sync, which resolves this. As you noted, this closes once #6554 merges; --passthrough is the mode for byte-identical legs.

    (Written by Claude Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions