Repository navigation
Description
What happened?
I called player.load(url:) with LoadOptions(isLive: true, suppressDisplayCriteria: true) on a
Jellyfin live-TV master.m3u8 URL (header-based auth).
I know this is not the documented HLS-live entry point — the README documents
HLSLiveIngestReader(playlistURL:) (with a typed HLSIngestError fallback) and
LoadOptions.nativeRemoteHLS (which even names "a Jellyfin live channel"). This report is about
what the GENERIC path does when an m3u8 is misrouted onto it, which is an easy mistake given the
URL shape.
Expected: either safe auto-routing to an HLS entry point, or a typed, actionable rejection like
HLSIngestError.
Instead: the engine consumed the playlist body as a raw byte stream and reconnected continuously
for the entire bounded observation — 262 reconnect cycles over 5.75 minutes, no error surfaced,
no watchdog escalation, and no terminal state reached. Each cycle re-read the same ~500-byte
playlist body at HTTP 200; zero producer segments, zero decoded output. Nothing is left to
render (I did not watch a screen during this cell, but the loop produces no frames).
Steps to reproduce
- Take a Jellyfin live-TV session's master.m3u8 (a variant playlist served over HTTP).
- player.load(url: m3u8URL, options: LoadOptions(isLive: true, suppressDisplayCriteria: true)),
auth supplied via HTTP headers. - Watch the @published state and the [AVIOReader] logs: the connection ends at the playlist
body length and reconnects, and this repeats without ever reaching a terminal state.
AetherEngine version or commit SHA
- Take a Jellyfin live-TV session's master.m3u8 (a variant playlist served over HTTP). 2. player.load(url: m3u8URL, options: LoadOptions(isLive: true, suppressDisplayCriteria: true)), auth supplied via HTTP headers. 3. Watch the @published state and the [AVIOReader] logs: the connection ends at the playlist body length and reconnects, and this repeats without ever reaching a terminal state.
Host app
Custom / my own integration
Platform
tvOS
OS version
tvOS 26.5
Device / chip
Apple TV 4K (3rd gen, 2022) / AppleTV14,1
Playback path
Native AVPlayer
Source media (for playback bugs)
Jellyfin live-TV HLS transcode: master.m3u8 variant playlist over HTTP, live (unbounded).
Playlist body ~497 bytes on device (748 bytes on the sim run). (The engine never decoded a
segment on this misroute, so the segment container/codec were not observed.)
Error codes / log lines
[AVIOReader] Persistent conn ended at offset 497 status=200, reconnecting
Live source: connection ended … reconnect will fire when buffer drains
262 cycles (gen 1→262), ~1.3 s median cadence, retryAfter 0.0; cumulative offset
497 → 129,717 = 261 × 497 (plus one stall/cancel variant at gen 111, offset 54,670 = 110 × 497).
No CoreMedia / AVPlayer / VideoToolbox error code was emitted — that absence is the defect.
Anything else
Contrast (scoped, one simulator sample, same channel): HLSLiveIngestReader(playlistURL:) reached
actual playback (~106 s of playing with an advancing clock) — so the misroute is the defect, not
a missing capability. The raw-TS isLive path fails CLOSED correctly (openFailed(-5) on a dead
source; a clean 5.6-minute hold on a healthy one).
Related issues: #71 (bounded the unproductive reconnect streak — structurally blind here, since
our cycles are productive: a full body delivered at HTTP 200); #126 (the VOD-side sibling of the
same silent-zero-packet family, but it at least reaches a ~25 s timeout — this path reached no
terminal state within either bounded observation); #8 (streaming-mode-fallback lineage).
What we'd hope for: detect a playlist body (#EXTM3U) on the generic isLive path and surface a
typed terminal error (the pattern HLSIngestError already uses), or auto-route to the HLS entry
point. Anything terminal is fine; the silent loop is the damaging half. (Minor, separate: a
headers option on HLSLiveIngestReader would help header-auth origins — we currently front it with
a local auth proxy.)
On nativeRemoteHLS we can offer only a confounded observation, not a claim: under our sim rig with
a minimal forced-transcode profile, the player sat in waitingToPlay (clock 0.00) for 120 s in two
runs with no error, while asset-metadata loads succeeded. A test-profile confound (and an auth
variable in our rig) contaminate it; a hardware run with our real profile is needed first.
Version note: measured at 5.5.1; no release 5.6.0–5.8.6 touches playlist-input detection, the HLS
entry-point routing, or reconnect give-up (5.8.6's AVIO change is documented "no behaviour
change"), so we expect this reproduces at HEAD — happy to re-test. Sanitized logs available on
request.
Activity
Merge fix/ae140-hls-playlist-raw-live-misroute: fail closed on HLS pl…
superuser404notfound commentedon Jul 19, 2026
Fixed in 5.9.0 (merged
5262771).Your diagnosis was exactly right, and thanks for the unusually precise write-up (the 262-cycle count, the "productive reconnect" framing, and the raw-TS-vs-m3u8 contrast made the root cause obvious). What happens:
load(url: m3u8, isLive: true)withoutnativeRemoteHLSroutes the playlist URL onto the raw-byte live reader. The origin serves the finite#EXTM3Ubody at HTTP 200 and closes; the endless-feed reader reads that as a dropped live stream and reconnects, re-fetching the same body forever. Everyfind_stream_infoprobe seek resets the unproductive-reconnect streak, so the #71 give-up counters are structurally blind to it (a full body at 200 is indistinguishable from a healthy live source),avformat_open_inputnever returns, andload()never reaches a terminal state.The give-up counters were the wrong layer, so the fix sits at the byte source instead: the raw-byte reader now inspects the first bytes of a live source and fails closed when they begin with the HLS playlist tag (
#EXTM3U, tolerating a BOM and leading whitespace), before the reconnect loop is entered. A raw container never opens with#(TS syncs on0x47), so the prefix is an unambiguous misroute.load()surfaces it as a new typed, catchableAetherEngineError.hlsPlaylistOnRawLivePathwith an actionable message pointing atLoadOptions.nativeRemoteHLS/HLSLiveIngestReader. End-to-end on a local static-playlist fixture: the same.url+isLivecall now terminates in ~0.03s with that error instead of hanging.On the two side notes:
HLSLiveIngestReaderfor header-auth origins is a reasonable ask and a separate change from this one; open a dedicated issue for it if the local auth proxy is a real friction point and it can be scoped on its own.nativeRemoteHLSsitting inwaitingToPlayfor 120s stays a confounded observation for now (your words), given the test-profile and auth variables in the sim rig. A hardware run with the real profile would be the thing that turns it into an actionable report; happy to dig in once it reproduces off the rig.cmcpherson274 commentedon Jul 20, 2026
fix(io): fail closed when an HLS playlist is misrouted onto the raw l…
superuser404notfound commentedon Jul 20, 2026
Appreciate the confirmation, and the 5.5.1-vs-5.9.7 A/B with the 8 ms terminal throw is exactly the datapoint that closes this out. Glad the error's entry-point pointer landed where a host needs it, that was the whole intent of surfacing it as a typed, catchable case rather than a log line. Thanks again for the precise original write-up; the 262-cycle count and the raw-TS-vs-m3u8 contrast are what made the byte-source root cause obvious in the first place.