Skip to content

HDR10 4K HEVC 50fps live HLS via nativeRemoteHLS: AVPlayer exposes no video track (audio-only, black); no HDR display-criteria negotiation. VLC + Android decode it fine #168

Closed

Description

@kskchaitanya1993

What happened?

An HDR10 (PQ) 4K HEVC Main10 50 fps live stream reaches readyToPlay and playing on the
nativeRemoteHLS (AVPlayer) path, plays audio, and shows black video. The Apple TV can present
this stream — VLC (TVVLCKit, direct VTDecompressionSession + its own HDR handling) plays it, and
the same channel plays as HDR on Android. On the nativeRemoteHLS path Aether hands the URL straight
to AVPlayer without demuxing, so it never reads the transfer characteristics — it logs fmt=sdr and
performs no HDR AVDisplayCriteria negotiation for this item (the loopback/ingest path does).

The stream (ffprobe of the actual variant)

codec_name=hevc   profile=Main 10   width=3840 height=2160   pix_fmt=yuv420p10le
color_space=bt2020nc   color_transfer=smpte2084 (PQ)   color_primaries=bt2020   → HDR10

Single-variant master:

#EXT-X-STREAM-INF:RESOLUTION=3840x2160,FRAME-RATE=50.000,CODECS="hvc1.2.2.L153.B0,mp4a.40.2",BANDWIDTH=15630000
<variant> (fMP4 segments; hvc1 Main10/PQ video + mp4a audio muxed)

Symptom (engine log, redacted — captured live while black)

ladder: rung 1 → Aether (live)
[NativeAVPlayerHost] #16 load url=http://<provider>/…/index.m3u8 … startPos=nil headers=1
[NativeAVPlayerHost] #16 asset.load(isPlayable) ok … value=true
[NativeAVPlayerHost] #16 asset.load(tracks) ok … count=0
[NativeAVPlayerHost] #16 item.status=readyToPlay
[NativeAVPlayerHost] #16 timeControlStatus=playing reason=- t+0.64s
[NativeAVPlayerHost] #16 item.audioTrack codec='aac ' enabled=true sr=48000 ch=2 … (readyToPlay)
AETHER PLAYING first-frame backend=native avPlayer=true fmt=sdr
[NativeAVPlayerHost] #16 accessLog uri=http://<cdn>/…/tracks-v1a1/mono.m3u8 … bytes=7634304 reqs=1

AVPlayer reaches readyToPlay and timeControlStatus=playing, decodes audio, and the clock
advances — but it exposes NO video track and presents no video (note there is an
item.audioTrack line but no item.videoTrack line for this item; asset.load(tracks) returns
count=0; other channels on the same path DO log a videoTrack). The variant being consumed is the
muxed tracks-v1a1/mono.m3u8 (hvc1 4K50 + aac). So on this single-variant 4K HEVC Main10/L5.1/50fps
master, AVPlayer takes the audio and drops the video entirely, with no error surfaced.

What I ruled out

  • Not a hardware limit — VLC's direct VTDecompressionSession (+ HDR) decodes the identical stream on this exact device; the channel plays as HDR on Android too.
  • Not the channel/source — the master advertises a valid HDR10 4K HEVC variant that VLC/Android render; 1080p HEVC on the same AVPlayer path renders fine.
  • The fmt=sdr Aether logs for this item is a default, not a read: nativeRemoteHLS never demuxes the stream, so it doesn't see the PQ/BT2020 transfer.

Steps to reproduce

Unfortunately i'm not sure how to share the link, the media i'm using is a Stalker Portal IPTV channel

AetherEngine version or commit SHA

5.15.5

Host app

Custom / my own integration

Platform

tvOS

OS version

tvOS 26.0

Device / chip

Apple TV 4K

Playback path

Native AVPlayer

Source media (for playback bugs)

No response

Error codes / log lines

ladder: rung 1 → Aether (live)
[NativeAVPlayerHost] #16 load url=http://<provider>/…/index.m3u8 … startPos=nil headers=1
[NativeAVPlayerHost] #16 asset.load(isPlayable) ok … value=true
[NativeAVPlayerHost] #16 asset.load(tracks) ok … count=0
[NativeAVPlayerHost] #16 item.status=readyToPlay
[NativeAVPlayerHost] #16 timeControlStatus=playing reason=- t+0.64s
[NativeAVPlayerHost] #16 item.audioTrack codec='aac ' enabled=true sr=48000 ch=2 … (readyToPlay)
AETHER PLAYING first-frame backend=native avPlayer=true fmt=sdr
[NativeAVPlayerHost] #16 accessLog uri=http://<cdn>/…/tracks-v1a1/mono.m3u8 … bytes=7634304 reqs=1

Anything else

Observation on routing / HDR (from reading 5.15.x)

Two things compound:

  1. No HDR negotiation on the remote-HLS path. nativeRemoteHLS returns before the probe/dispatch, so Aether never detects this item is HDR10 (PQ) and never sets AVDisplayCriteria for it (the loopback/ingest path logs [DisplayCriteria] and negotiates; this path does not). Handing an HDR10 4K50 item to AVPlayer with no display-mode negotiation is a plausible cause of the no-video/black state.
  2. The own-decode path is never reachable for live HLS HEVC. Even via HLSLiveIngestReader, a live HEVC source lands on loadNative (loopback → AVPlayer) because forcesSoftwareForUndecodableFormat is gated !options.isLive. So SoftwarePlaybackHost + HardwareVideoDecoder — the direct-VT + HDR-aware path (re-applies PQ/HLG color metadata, flips the display to HDR) that mirrors what VLC does — is never selected here.

Question / ask

Is there a supported way to have Aether decode a remote-HLS HEVC stream through its own HardwareVideoDecoder (direct VTDecompressionSession → AVSampleBufferDisplayLayer) instead of AVPlayer, for cases where AVPlayer accepts the item but presents no video? A host-facing knob (e.g. a LoadOption to prefer own-decode), or engine-side detection of the "readyToPlay + audio advancing + zero presented video frames" state with an automatic reroute, would resolve this class of black-screen. Happy to test a patch, capture a full verbose log, VTDecompressionSessionCreate status, or provide a sample stream.

Activity

  1. added
    bug
    on Jul 21, 2026
  2. superuser404notfound commented on Jul 21, 2026

    @superuser404notfound
    Owner

    Thanks for the exceptionally detailed report, including the ffprobe and the read through the 5.15.x source. That made this fast to pin down.

    You were right that this path does no HDR negotiation, and that turned out to be the whole story. Two clarifications on the diagnosis:

    1. The display-criteria gap is the root cause. nativeRemoteHLS hands the m3u8 to AVPlayer and never programs AVDisplayManager.preferredDisplayCriteria. On a bare AVPlayerLayer, an HDR item with the panel in an SDR mode reaches readyToPlay and plays audio but presents no video, which is exactly the symptom you captured. The loopback path works because it programs the criteria manually from its probe. (Side note on your observation: appliesPreferredDisplayCriteriaAutomatically is an AVPlayerViewController property, so it does not exist on the bare AVPlayer this path uses, and there was no automatic path to fall back on either.)

    2. The own-decode path is not the fix here. The stream is hardware-decodable (VLC proves it decodes via VideoToolbox on that exact box), so routing it to the software decoder would neither be necessary nor address the display negotiation. The problem was negotiation, not decode capability, so the engine stays on AVPlayer for this.

    Fixed in 5.16.1. The engine now reads the dynamic range back from AVPlayer's already-parsed video-track CMFormatDescription (transfer function, plus dvh1 / dvhe for Dolby Vision) at readyToPlay and again at the first presented frame, reports it (so fmt= is no longer a hard-coded sdr), and for an HDR range programs preferredDisplayCriteria (Match Dynamic Range and Match Frame Rate, since the item is 50 fps) the same way the loopback path does. No second connection to the origin.

    Could you retest on the reproducing channel? Expected result: the panel switches to HDR shortly after tune and the picture appears, with the format now reported as HDR10.

    If it is still black, one data point would settle the remaining question: a few seconds in (not just at readyToPlay), does item.tracks list a video track at all? If a video track is present but not shown, that is the display path and I will dig further there. If no video track is ever built, AVPlayer is rejecting the single-variant master outright, which is a different problem from the negotiation gap and worth a separate look. A full verbose log around the first few seconds would be welcome either way.

  3. kskchaitanya1993 commented on Jul 21, 2026

    @kskchaitanya1993
    Author

    Retested on 5.16.1 on the reproducing channel — still black, and the log settles the open question: it's the "no video track ever built" branch, not the display path.

    Direct nativeRemoteHLS:
    asset.load(tracks) → count=0
    item.status=readyToPlay ; timeControlStatus=playing
    item.audioTrack aac (readyToPlay) ← present
    (no item.videoTrack line, at readyToPlay or ~2s+ later)
    AETHER PLAYING backend=native fmt=sdr
    accessLog uri=…/tracks-v1a1/mono.m3u8 (the muxed HEVC+aac variant)
    No video track is built at any point, so fmt= reports sdr — there's no video-track CMFormatDescription for the 5.16.1 range-read to see, and nothing to program criteria for. So the display-criteria gap wasn't the operative cause for this stream; AVPlayer is rejecting the master's video at the track-build stage.

    The tell: the identical stream on the loopback path (your HLSVideoEngine, which re-muxes to fMP4) builds the track fine —
    item.videoTrack hvc1 3840x2160 primaries=ITU_R_2020 transfer=SMPTE_ST_2084_PQ (readyToPlay)
    So AVFoundation's HLS demuxer accepts HEVC-in-fMP4 but not HEVC-in-MPEG-TS. The single-variant master advertises CODECS="hvc1.2.2.L153.B0,mp4a.40.2" but delivers MPEG-TS segments (.ts, no EXT-X-MAP) — and per the HLS Authoring Spec, HEVC is only sanctioned in fMP4; MPEG-TS carriage of HEVC isn't supported, so no video track is ever created.

    (One aside for completeness: this box happens to have Match Content disabled, so [DisplayCriteria] skipped — but that's moot here since there's no track to negotiate for. Track-build precedes presentation, and the loopback path builds it with Match Content equally disabled.)

    What works for us / suggestion: we detect exactly this — readyToPlay + zero video tracks on the nativeRemoteHLS path — and reroute the source onto the loopback/ingest path (HLSLiveIngestReader → HLSVideoEngine), which re-muxes TS→fMP4 and builds the track. An engine-side version of that reroute, keyed on the "readyToPlay with zero video tracks" signal you mentioned, would let nativeRemoteHLS transparently handle HEVC-in-MPEG-TS masters. Happy to send the full verbose log if useful.

  4. superuser404notfound commented on Jul 21, 2026

    @superuser404notfound
    Owner

    That log settled it exactly as you framed it: no video track is ever built, so 5.16.1's criteria fix had nothing to act on. The track-build rejection is the operative cause on this stream, and your carriage analysis is correct. AVFoundation builds HEVC video tracks only from fMP4 segments; a master advertising hvc1 over MPEG-TS carriage gets its audio track and nothing else, per the HLS Authoring Spec's fMP4-only sanction for HEVC.

    Shipped in 5.17.0, and it is essentially an engine-side version of the reroute you described, with one refinement over keying on "readyToPlay + zero video tracks" alone: zero video tracks is also the legitimate steady state of an audio-only channel (radio), and blindly rerouting those onto the TS ingest would break streams that work today. So the engine takes advertisement evidence from AVURLAsset.variants, AVFoundation's own already-parsed master playlist, meaning no second connection to the origin. The watchdog arms at readyToPlay on live nativeRemoteHLS sessions, polls item.tracks at a 0.5 s cadence for 4 s, and when the master advertises a video rendition that never builds an item track, the session transparently reroutes onto the loopback ingest path (HLSLiveIngestReader, TS remuxed to fMP4). The rerouted session runs the full probe and display-criteria handshake, so the HDR panel switch from 5.16.1 applies there too, on the path that can actually present the video.

    Two details that may matter for your setup:

    1. LoadOptions.httpHeaders now ride onto every ingest fetch (playlist, segments, AES keys; the companion audio reader inherits them), so header-enforcing origins keep working across the reroute. There is also a new public HLSLiveIngestReader(playlistURL:httpHeaders:) initializer if you construct the reader yourself.
    2. If you want to keep your host-side reroute instead, LoadOptions.nativeRemoteHLSIngestFallback = false opts out of the engine-side one. With it left on (the default) your host-side detection should simply become dead code, since the engine reroutes first.

    Could you retest on the reproducing channel with 5.17.0? Expected log signals:

    [NativeAVPlayerHost] #N master advertises video (1 variant(s)) but AVPlayer built no video track after grace; HEVC-in-MPEG-TS carriage suspected (#168)
    [AetherEngine] #168: nativeRemoteHLS built no video track for a master that advertises video; rerouting onto the live-ingest loopback path (TS -> fMP4 remux)
    

    followed by the normal loopback startup, a video track (hvc1 3840x2160 ... SMPTE_ST_2084_PQ) like your loopback control run, and picture roughly 4 to 5 seconds after tune (the grace window plus ingest spin-up). One caveat worth confirming on your box: since Match Content is disabled there, the panel will stay in its current mode and AVPlayer tone-maps, which is the same behavior as your working loopback run. Release notes: https://github.com/superuser404notfound/AetherEngine/releases/tag/5.17.0

    Thanks for the exceptional legwork on this one, the retest log plus the working host-side reroute made both the diagnosis and the fix design straightforward.

  5. kskchaitanya1993 commented on Jul 21, 2026

    @kskchaitanya1993
    Author

    Retested on 5.17.0 — it works. The engine-side reroute triggers and the channel plays. Log from two tunes of the reproducing channel:

    Tune 1 (Match Content off on this box):
    #1 nativeRemoteHLS → readyToPlay, item.audioTrack aac, fmt=sdr (black, as before)
    #1 master advertises video (1 variant(s)) but AVPlayer built no video track after grace; HEVC-in-MPEG-TS carriage suspected (#168)
    #168: nativeRemoteHLS built no video track for a master that advertises video; rerouting onto the live-ingest loopback path (TS -> fMP4 remux)
    [HLSVideoEngine] serving on http://127.0.0.1/…/media.m3u8 (sourceIsHDR=true videoRange=pq)
    [DisplayCriteria] skipped: Match Content disabled
    #2 item.videoTrack hvc1 3840x2160 primaries=ITU_R_2020 transfer=SMPTE_ST_2084_PQ (readyToPlay) ← picture

    Tune 2 (Match Content on) — the handshake also lands on the rerouted path:
    #168 reroute →
    [DisplayCriteria] SET: format=hdr10 codec=hvc1 rate=50.000 extensions=HDR
    [DisplayCriteria] switch settled via EDR (~1350ms, headroom 1.20)
    [HLSVideoEngine] serving … panelIsHDR=true useMaster=true
    #4 item.videoTrack hvc1 3840x2160 … SMPTE_ST_2084_PQ (readyToPlay)

    So both branches confirmed: #168 detection fires on the advertise-but-no-track signal, the loopback reroute builds the HEVC/PQ video track, and with Match Content enabled the panel switches to HDR (EDR headroom 1.00→1.20); with it disabled it tone-maps. Exactly as you described.

    The AVURLAsset.variants refinement over bare "zero video tracks" is the right call — glad you caught the audio-only/radio case; keying on advertised-video-that-never-builds is precisely the correct signal.

    Two notes:

    We've left nativeRemoteHLSIngestFallback on and retired our host-side detection to dead-code fallback, as you suggested — the engine reroutes first, so it never runs. Thanks again for turning this around so fast and so cleanly.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions