Skip to content

Live ingest: TARGETDURATION sealed below the provider's delivery rhythm stalls playback, and the item rebuild that follows can leave audio and video slightly apart #684

Open

Description

@superuser404notfound

Seen on an Apple TV 4K (3rd gen), tvOS 26, AetherEngine 7.25.1, Sodalite live TV, direct HLS ingest (.custom(HLSLiveIngestReader), liveJoinProfile: .fastZap), native path. Channel: H.264 720x576 25 fps (fieldOrder=1), AAC stream copy. Independent of how many engines run.

What happened

  1. The ingest joined 4 segments, about 20 s behind the live edge. The provider advertises a 6 s target duration and delivers in bursts with gaps of 6 to 8.6 s.
  2. The engine sealed the served TARGETDURATION at 4 s from its first samples:
    live TARGETDURATION sealed at 4s (holdback 12.000s): max EXTINF 2.000s, 1.5 x cut target 0.750s, measured floor 6.000s needs 4s of patience; upstream advertises 6.000s (reported, not used)
  3. Six seconds later the source paused longer than that:
    #446 source stopped delivering (no segment finalized for 6.0s, TARGETDURATION 4s)
    live TARGETDURATION remains sealed at 4s, later candidate 6s (max segment 2.000s, measured floor 8.492s needs 6s of patience)
  4. AVPlayer logged -12888 (playlist unchanged for longer than 1.5 x target duration) and stalled at t+12.2 s and again at t+49.2 s.
  5. At t+53 s the Presented frame drifts ~6 s ahead of currentTime/sourceTime after a rapid bidirectional seek burst (loopback-HLS native path) — frameAhead/producerShift/hostShift all report 0 #65 nudge did not revive the consumer and the engine reloaded the item:
    #454 placing the fresh item at 31871.11s in its own playlist: segment 26 + 1.91s
  6. From that rebuild on, the viewer reported audio and video slightly out of sync. After the next rebuffer (another rebuild) they were in sync again.

Two questions

  • Patience. The engine itself computes that 6 s of patience is needed but cannot raise a sealed TARGETDURATION. The upstream's advertised 6 s was available before the seal and is "reported, not used". Should an ingest seal at least at the upstream's advertised target duration (or at the larger of advertised and measured), so a provider that delivers one 6 s segment at a time is not read as stalled?
  • A/V after an item rebuild. The fresh item is placed mid-segment (segment 26 + 1.91s). The observation that sync was off after one rebuild and fine after the next suggests the placement, not the stream, decides it. Not measured yet: the native path logs no audio/video offset.

To do

Related: #523 (delivery rhythm instead of client patience), #524, #594, #670 (fastZap seal headroom, explicitly not applied to ingest), #447, #464.

Activity

  1. added a commit that references this issue on Oct 2, 2026
  2. superuser404notfound commented on Oct 2, 2026

    @superuser404notfound
    OwnerAuthor

    Part A (the stalls) is released in 7.25.2 (f5f9a737, #685). On an ingest the seal now follows the longest upstream segment as far as the join pays, and the join is equalised over the phases of one upstream: a channel alternating 6 s and 4 s segments joins four segments in both phases and seals TD 6 instead of 4. Measured on the scripted origin: uniform 6 s, nine 60 s runs, 7 stalls before and none after; alternating 6 s / 4 s, 0 to 1 -12888 per run before and none after. Fewer stalls, not none: the capture had 10 of 110 delivery gaps above 9 s.

    Part B (sound slightly off the picture after an item rebuild) stays open. It could not be produced on macOS: the served segments read in sync to 0.3 ms across a rebuild. One defect on that path is fixed (the AE#440 forced start was taken 36 ms before the item was ready, on the only one of five item starts where it fired), but whether that is the cause is not confirmed. 7.25.2 logs a #684 item line per native live item start for the device round.

  3. added 20 commits that reference this issue on Oct 2, 2026
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