Skip to content

HLS master omits CHANNELS on the audio rendition, so E-AC-3 JOC plays as the 5.1 bed on tvOS #726

Open

Description

@kdorepos

What happened?

I served an E-AC-3 JOC (Dolby Atmos) source through the engine's loopback HLS
path and expected the master playlist to describe the audio rendition as object
audio. The EXT-X-MEDIA:TYPE=AUDIO tag carries no CHANNELS attribute at all —
grep -rn 'CHANNELS=' Sources/ returns zero hits on 7.10.0 and on main.

The engine has already decided the track is Atmos and stream-copied it. Both of
these are in the log for the same session:

[HLSVideoEngine] audio: codec=eac3 → stream-copy as `ec-3` [JOC=Atmos]
[HLSVideoEngine] EAC3+JOC Atmos: stream-copy engaged; DD+/JOC bitstream preserved

but nothing carries that up to the playlist builder. On an Apple TV the receiver
reports "Multichannel PCM 5.1" for the session.

Apple's HLS Authoring Specification for Apple Devices makes CHANNELS
REQUIRED on every EXT-X-MEDIA audio rendition, and
draft-pantos-hls-rfc8216bis §4.4.6.1 defines the value as a slash-separated
parameter list whose second parameter is a list of Audio Coding Identifiers —
JOC being the one that marks Dolby Digital Plus with Joint Object Coding, with
the first parameter then giving the object count. Dolby's DD+ Online Delivery
Kit
(hls_c_hls_signal_atmos_ddp.html) spells out the same pairing and its
canonical example is CHANNELS="16/JOC" alongside CODECS="ec-3".

Since #34 fixed CODECS at ec-3 (correctly — ec+3 is refused by tvOS 26.5
with -11848 / -15517), and ec-3 is the same string a non-JOC E-AC-3 5.1 track
gets, CHANNELS is the only place the master can state that the rendition is
object audio. With it absent, AVFoundation has nothing above the segment layer
saying "object audio" and settles on the bed.

Actual:

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",NAME="English",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES

Expected:

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud",NAME="English",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="16/JOC"

Steps to reproduce

The playlist observation needs no Apple TV:

  1. swift build --product aetherctl
  2. ./.build/debug/aetherctl serve <url-to-an-eac3-joc-source>
  3. curl -s "http://127.0.0.1:<port>/<session>/master.m3u8"
  4. Read the #EXT-X-MEDIA:TYPE=AUDIO line — no CHANNELS.

(serve prints a session-token path prefix; fetching /master.m3u8 without it
answers 404 reason=bad session token.)

For the audible half: play the same source on an Apple TV routed to an
Atmos-capable receiver and read the receiver's reported format.

AetherEngine version or commit SHA

7.10.0 (ca8512c); still present on main at 7.32.3 (4f46e689): git grep 'CHANNELS=' -- Sources returns no hits.

Host app

Custom / my own integration

Platform

tvOS

OS version

tvOS 26.6 (observed); playlist reproduced on macOS 15

Device / chip

Apple TV 4K (3rd gen, 2022) → LG G5 OLED → Sonos Arc over eARC

Playback path

Native AVPlayer

Source media (for playback bugs)

Two sources, both MKV, both reproduce:

  • "28 Years Later" — HEVC Dolby Vision Profile 8.1, 3840x1392 @ 23.976; audio is
    a Blu-ray-style DD+ track (AC-3 core syncframe, bsid 6, 640 kbps, acmod 7
    • lfeon 1, followed by an E-AC-3 dependent syncframe, bsid 16, chanmap
      0xA010). ffprobe: Dolby Digital Plus + Dolby Atmos, 5.1.2,
      1 536 000 bps. AVCodecParameters.profile == 30.
  • "Dune: Part Two" — 6-channel E-AC-3 JOC with the objects in the independent
    substream.

FFmpegBuild 3.4.0 (FFmpeg 8.1, libavformat 62.12.102).

Error codes / log lines

[HLSVideoEngine] audio: codec=eac3 → stream-copy as `ec-3` [JOC=Atmos] (fallback duration=32 in audioTb 1/1000)
[HLSVideoEngine] EAC3+JOC Atmos: stream-copy engaged; DD+/JOC bitstream preserved for the
                 downstream renderer (HDMI passthrough / AirPods spatial; ...)
[HLSVideoEngine] prepared: codec=hvc1.2.4.L153,ec-3 supplemental=dvh1.08.05/db1p
                 resolution=3840x1392 fps=23.976 range=PQ DV=profile81 segments=1645

No AVPlayer / CoreMedia / VideoToolbox error: the session plays, it just plays
the bed.

Anything else

A known-Atmos title in the Apple TV app on the same rig, immediately before,
reports Dolby Atmos on the same receiver, so the route, the tvOS Audio Format
setting and the eARC link are all known good.

There is a second, independent defect on this source — the init segment's dec3
box loses chan_loc and the JOC extension — filed separately, because it has a
different cause and a different fix. docs/formats.md's Dolby Atmos section is
also inaccurate about that box today; the other issue covers it.

Patch available: a fix with tests, CHANGELOG and docs is on a branch rebased onto
today's main; the PR follows this issue.

Activity

  1. superuser404notfound commented on Oct 8, 2026

    @superuser404notfound
    Owner

    Status: #727 is merged (230c406), and 77420a6 extends it to untagged audio.

    Measured on macOS with aetherctl serve / aetherctl play against Dolby's DD+ JOC test signal (Patterns_Of_Nature_HDR10-P8.1_..._DD+JOC-768Kbps.mp4, audio tagged und) and an eng-tagged remux of it:

    Source Before After #727 After 77420a6
    eng rendition without CHANNELS CHANNELS="16/JOC" CHANNELS="16/JOC"
    und no audio rendition no audio rendition NAME="Dolby Atmos",CHANNELS="16/JOC", no LANGUAGE

    On the untagged source AVFoundation now lists one audible option named "Unknown" (before: no audible group) and plays through. An untagged track that is not object audio keeps its current playlist and route.

    Two limits worth knowing: CHANNELS lives in the master, so a session that routes media-direct (an HDR source on a panel that is not in HDR mode yet) still carries no such statement; and the audible half is confirmed so far only on your Apple TV / Sonos setup. This stays open until the release is out and the receiver reads Dolby Atmos on it.

  2. superuser404notfound commented on Oct 9, 2026

    @superuser404notfound
    Owner

    Released in 7.33.0 (d28f89d6): CHANNELS="16/JOC" on the audio rendition (PR #727, 9227c1e4) and the follow-up for an untagged JOC track (77420a6c). Keeping this open until it has been retested on the release.

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