Skip to content

fastZap on an HLS ingest with long upstream segments always ends at the bounded start: the join is shorter than the holdback it seals #678

Closed

Description

@superuser404notfound

Reported by a downstream IPTV integrator (7.22.2, loopback route, liveJoinProfile = .fastZap, maxConcurrentSourceRequests = 1, HLS upstreams). Every zap exits the first-serve gate through the fastZap grace, never through the cushion, and the gate is 60 to 85 % of time-to-play:

2.035 s: 6 seg / 19.2 s < 27 s holdback (TD 9 s), grace 2.0 s
2.006 s: 9 seg / 18 s < 21 s (TD 7 s), grace 2.0 s
0.807 s: 24 seg / 19.2 s < 21 s (TD 7 s), grace 0.8 s

Cause

The served TARGETDURATION is floored by the longest upstream segment, ceil(longest / 1.5) (AE#447), so a provider cutting 10 s segments seals TD 7 and the gate wants a 21 s holdback. The ingest join covers max(8, 1.5 x advertised TD), i.e. 15 s, which takes two 10 s segments: 20 s, and the last GOP of the last one stays open downstream, so 19 s cut. That is short of the holdback by construction, for every segment length above ~5 s, and the grace then waits for content a strict-realtime origin cannot deliver inside it.

Reproduced on aetherctl hlsfixture --segments-dir <10 s segments, 1 s GOP> --segment-seconds 10 --window 6 + play --live --fast-zap, 3 of 3:

[HLSIngest] joined 2 segment(s), ~20s behind the live edge
[HLSVideoEngine] live TARGETDURATION sealed at 7s (holdback 21.000s): ... measured floor 10.000s needs 7s of patience
[HLSVideoEngine] first live manifest served after 1.010s: 19 segments / 19.000s < 21.000s holdback (TARGETDURATION 7s), fastZap bounded start after 1.000s grace
PHASE playing t+2.24s .. t+2.52s

Related findings from the same report

  • The HLS live ingest (HLSLiveIngestReader, also the AE#363 reroute target) does not honour LoadOptions.maxConcurrentSourceRequests: setHostLimit only runs for non-custom sources, the reader has its own session and a fixed maxConcurrentSegmentFetches = 4. A single-connection provider sees up to four parallel requests.
  • The grace has no early exit when the missing depth cannot arrive within it.
  • DisplayCriteriaController skips reason=unchanged against its own lastApplied only, so a host that wrote preferredDisplayCriteria = nil itself gets no criteria on the next same-format load.
  • [Demuxer] Opened carries no connect / open_input / find_stream_info split.
  • PlayerState.swift documents an over-tight probe budget as failing open; avformat_find_stream_info returns -1 when no stream resolves.

Activity

  1. superuser404notfound commented on Sep 30, 2026

    @superuser404notfound
    OwnerAuthor

    Fixed in #679 (merged), measured on aetherctl against 10 s upstream segments: first picture t+2.27 s -> t+0.21 s on loopback, t+4.1 s -> t+2.8 s behind a 40 Mbit/s proxy; against a proxy that refuses a second concurrent request with 403 and --max-concurrent-requests 1, main fails 3 of 3 zaps with the reported stream info failed (Operation not permitted (-1)) and the branch plays 3 of 3 at peak inflight 1. Ships in the next release. The display-criteria read-back is tvOS-only and still gets a device look.

  2. superuser404notfound commented on Sep 30, 2026

    @superuser404notfound
    OwnerAuthor

    Released in 7.24.0 (9bd0096).

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