Skip to content

moq import ts aborts on continuous content join (TimestampRewind) #3798

Description

@t0ms

Summary

On 5d0991b9 (main after #3793), moq import ts exits at the first content join on a continuous timeline with:

Error: frame timestamp is below the live edge

(moq_mux::container::TimestampRewind from rs/moq-mux/src/container/producer.rs.)

Reproducer

python3 ts-continuous-source.py CNNiEMEA2.ts --passes 2 \
  | tsp -I file - -P regulate --pcr-synchronous -O file - \
  | moq --connect-tls-insecure --connect https://127.0.0.1:443/anon \
        --broadcast repro.hang import ts

Fails at the pass boundary (~600 s on CNNiEMEA2.ts). PCR/PTS stay monotone across the join (0 backward PCR steps); this is a content repeat on a continuous transport timeline, not a true rewind.

Root cause

#3793 merged the monotonic-timeline rule into container::Producer::write, which refuses frame.timestamp < live_edge.

The #3533 fix added reanchor() on the legacy audio path only (LegacyStream in rs/moq-mux/src/container/ts/import.rs; test legacy_resync_below_the_live_edge_publishes_forward). H.264/H.265 and verbatim PES paths call self.track.write(frame)? with no re-anchor, so at least one track publishes below the live edge at a content join and the import aborts.

Expected

Per quest/m1/monotonic-timeline.md: on trusted TS ingest, re-anchor forward (as legacy audio does) or call discontinuity() at the join.

Suggested fix

Extend reanchor() to all TS elementary-stream importers (minimum H.264/H.265 video and verbatim PES), or detect content-join and call Producer::discontinuity() before the new epoch.

Activity

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

    questBeing tracked/planned in a quest. See `quest/`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions