Repository navigation
Description
What happened?
Live HLS playback via the HLSLiveIngestReader ingest path (the engine-provided LiveIngestSourceInfo-conforming reader intended for exactly this use case) periodically stalls with CoreMediaErrorDomain -15410 "Invalid server blocking reload behavior for low latency", followed by the engine's own stall-recovery nudge-seek, then resumes playing -- looping through this cycle repeatedly rather than staying stable.
Root cause, as far as I can trace it: HLSLiveIngestReader.upstreamTargetDuration (IO/HLSIngest/HLSLiveIngestReader.swift:49-50,175-176) is set from media.targetDuration -- the upstream origin's self-declared #EXT-X-TARGETDURATION playlist tag -- not from the actually-observed segment-arrival cadence. HLSVideoEngine's init (Video/HLSVideoEngine.swift:543-547) only disables LL-HLS blocking-reload (liveBlockingReloadEnabled) when this hint exceeds 1.5x the internal cut target:
// Bursty ingest sources whose upstream cadence exceeds 1.5x our cut target can't honor
// LL-HLS blocking reload (-15410, device repro 2026-06-11). For those, disable blocking
// reload and raise TARGETDURATION to cadence so plain 1.5x-TD patience covers the gap.
self.liveBlockingReloadEnabled = liveSourceCadenceHint
.map { $0 <= Self.targetSegmentDuration * 1.5 } ?? trueIf an origin advertises a normal TARGETDURATION but doesn't actually deliver segments on that schedule (common for relay/budget IPTV origins that push segments in irregular batches rather than encoding in disciplined real time), that mismatch is invisible to this check: the advertised value looks fine, blocking-reload stays enabled, and the held ?_HLS_msn= reload eventually resolves in a way AVPlayer treats as a spec violation.
Separately: for any live source that isn't routed through a LiveIngestSourceInfo-conforming custom reader (i.e. loaded via a plain url:, which HLSSegmentProvider's default liveBlockingReloadEnabled { true } and HLSVideoEngine's ?? true fallback both confirm), there's no cadence signal at all and blocking-reload is enabled unconditionally -- the public LoadOptions struct has no field to influence this either way.
Steps to reproduce
- Load a live source through the
.custom(HLSLiveIngestReader(playlistURL:), formatHint: "mpegts")path. - Use an origin whose playlist advertises a normal
#EXT-X-TARGETDURATIONbut whose real segment delivery is bursty/irregular (does not actually land on that schedule). - Play for roughly a minute; observe periodic stalls,
-15410in the AVPlayer error log, and the engine's own "re-engaging stalled AVPlayer... nudge seek" recovery firing repeatedly.
AetherEngine version or commit SHA
5.14.0 / 396d138
Host app
Custom / my own integration
Platform
iOS
OS version
iOS 27 (iPhone 16 Pro Max) / iPadOS 26.5.1 (iPad 10th generation) -- reproduced on both.
Device / chip
iPhone 16 Pro Max; iPad (10th generation)
Playback path
Native AVPlayer (loopback HLSLocalServer / HLSVideoEngine, via the .aetherHLSIngest-style custom-reader route -- not the nativeRemoteHLS bypass, which has no loopback).
Source media (for playback bugs)
Live HLS ingest (fMP4 segments muxed by the engine), video hvc1 3840x2160 (HDR10/PQ, ITU-R 2020), audio ec-3 5.1 48kHz. Master/media playlists served locally by HLSLocalServer.
Error codes / log lines
[NativeAVPlayerHost] #17 playbackStalled
[NativeAVPlayerHost] #17 timeControlStatus=waitingToPlay reason=AVPlayerWaitingToMinimizeStallsReason t+11.04s
[AetherEngine] #65 re-engaging stalled AVPlayer (stall + 6s without fetches): nudge seek to 70.87s
[HLSLocalServer] GET /media.m3u8?_HLS_msn=17 HTTP/1.1
[NativeAVPlayerHost] #17 errorLog code=-15410 domain=CoreMediaErrorDomain uri=- 'Invalid server blocking reload behavior for low latency'
Full surrounding sequence (master/media playlist fetches, segment fetches, LagDiag telemetry) available if useful.
Anything else
Two possible fixes, either of which would close this:
- Derive
liveSourceCadenceHint(or an equivalent internal signal) from the observed inter-segment arrival interval rather than trusting the origin's self-reportedTARGETDURATION-- the whole point of the hint is to detect origins that don't behave as advertised, so trusting their own advertisement undermines it. - Default
liveBlockingReloadEnabledtofalse(safer) rather thantruefor any live source where no cadence signal is available at all, rather than only disabling it when a hint positively proves burstiness.
Happy to test a build with either change against the reproducing origin.
Activity
superuser404notfound commentedon Jul 21, 2026
Fixed in 5.16.0.
Your trace was exactly right: both the blocking-reload gate and the TARGETDURATION floor derived from
HLSLiveIngestReader.upstreamTargetDuration(the origin's self-declared#EXT-X-TARGETDURATION), and that value was read once at load and frozen into an immutable decision. An origin that advertises a normal target but delivers in bursts keptCAN-BLOCK-RELOAD=YES, so the held?_HLS_msn=reload tripped-15410.Both decisions now derive from the OBSERVED inter-arrival cadence instead, measured in the ingest reader and re-evaluated on every manifest render:
-15410cannot arise. The transition is deliberately monotonic OFF -> ON -> OFF(terminal): ON/OFF flapping would straddle an in-flight blocking reload and trip-15410on its own.-12888).On your second point: plain-
url:live with no cadence signal (for example a disciplined real-time transcode) keeps blocking-reload on by default, so that path is not regressed, but there is now aLoadOptions.liveBlockingReload: Bool?to force it either way when a host knows a source is bursty.Since you offered to test: could you retest 5.16.0 against the reproducing origin? Expected result is no
-15410, no periodic nudge-seek recovery, and a#EXT-X-TARGETDURATIONin the localmedia.m3u8that reflects the real batch cadence rather than the advertised one.Thanks for the precise root-cause writeup, it made this a targeted fix.
fix(live): derive LL-HLS blocking-reload from observed cadence, not s…
G00380316 commentedon Jul 21, 2026
Retested on 5.17.1 (includes 5.16.0). The original bug is fixed: 30+ seconds of steady playback on the same bursty origin with no
-15410and no nudge-seek recovery at all — clean throughout.However, a different trigger reproduces the same
-15410error on the same session, and I don't think it's the cadence mechanism this fix addressed:Reading the sequence: blocking-reload had already latched ON during the steady period (
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,TARGETDURATION:6, segments landing consistently at ~5.76s). Then the segment producer itself stalls -- your own log already suspects an SSAI ad pod disrupting cut-point detection, not a network/cadence issue. While the producer is wedged, the held?_HLS_msn=12reload keeps waiting for a segment that the stalled producer will never cut, and-15410fires. It fires a second time shortly after the automatic retune/reload too, before the new item (#9) settles.So this looks like a different mechanism from the one 5.16.0 fixed: blocking-reload stays latched ON through a genuine local producer stall (unrelated to origin network cadence), rather than dropping when the producer itself wedges. Still digging into this on our end before writing it up properly -- wanted to get the positive retest result to you first, since the original fix clearly holds for its intended case.
fix(live): halt blocking-reload when the segment producer exits for h…
Merge pull request #181 from superuser404notfound/fix/167-producer-st…
superuser404notfound commentedon Jul 21, 2026
Thanks for the retest, and for the second trace. No need for a separate writeup, the log you posted was enough to pin it.
Your read is exactly right: this is a different mechanism from the 5.16.0 fix, and the cadence policy structurally cannot see it. It observes ingest arrivals, and during a cutter wedge those keep flowing (your trace: 40 pkt/s read rate while nothing finalizes), so blocking-reload stayed latched ON while the producer could no longer cut the segment the held
?_HLS_msn=12reload was waiting for. Two defects then converted the wedge into-15410:segmentStallexit only requested the host retune. It neither released the parked waiter (which slept out its full hold against a dead producer) nor dropped theCAN-BLOCK-RELOADadvert, so the stall watchdog's item reload (#9) against the same server immediately armed a second hold and a second-15410.Fixed in 5.17.4:
segmentStall,sourceReplay, custom-reader pump deaths) latches the provider production-halted: parked waiters release immediately (so the in-flight hold resolves as a 503 within the ~10s stall-detection window instead of a bad 200 at 18s), andCAN-BLOCK-RELOADstops being advertised for the rest of the session, including any item reload against it. The latch also beats theLoadOptions.liveBlockingReloadoverride, since no override can conjure segments from a dead pump.The wedge itself still exits to host retune, that part of your log is the designed recovery for an SSAI pod the cutter cannot cut through. What changes is the window before the retune lands: no
-15410, and no error-driven fighting between the nudge/reload watchdog and the retune.Could you retest on 5.17.4 against the same SSAI trigger? Expected: the
no-cut stalllog line and the host retune still appear, but no-15410before or after the item reload, and the retuned session comes up clean.fix(producer): hold the no-cut watchdog while video PTS advances (sup…
feat(live): fastZap live-join profile for realtime raw-TS sources (#195…
superuser404notfound commentedon Aug 8, 2026
Closing this one, with the state written down so it can be picked up again if it recurs.
Both halves shipped and the first one was verified on device by the reporter:
b2f1206, released in 5.16.0. Verified here against a bursty origin running 30+ seconds clean.f915e1b, released in 5.17.4. The server now answers 503 to an unsatisfiable hold instead of a spec-invalid 200 with an unchanged playlist, and a halted live production latches terminally and cancels waiters immediately.Nothing has been reported against either since, so the remaining item was never a defect, only an unverified transition: the mid-session OFF to ON flip, where a source proves 12 seconds of disciplined cadence and the local playlist then starts advertising
CAN-BLOCK-RELOADwhile AVPlayer is already attached. There is no source at hand here that exercises it.Worth stating plainly for anyone who lands on this later: that transition currently has no log line.
LiveCadencePolicyemits nothing andliveBlockingReloadEnabledis a computed property read per manifest render, so a clean run cannot be distinguished from a source that never latched at all. If -15410 shows up again on an ingest source with regular cadence, the first step is to add that witness rather than to reason from a quiet log.Reopen any time, or open a fresh issue with the playlist and the error, whichever fits better.
fix(live): serve a stalled live window as the finite asset it is
fix(live): seal the served TARGETDURATION from what the source did
fix(live): stop holding a poll a dead source can never answer