Skip to content

fix(video): emit ec-3 for JOC on iOS#16

Merged
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
Delarkz:fix-video-joc-codec-ios
May 24, 2026
Merged

fix(video): emit ec-3 for JOC on iOS#16
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
Delarkz:fix-video-joc-codec-ios

Conversation

@Delarkz
Copy link
Copy Markdown
Contributor

@Delarkz Delarkz commented May 24, 2026

Summary

Gate the audio codec advertisement so iOS emits ec-3 for EAC-3 with JOC (Atmos) tracks; macOS and tvOS keep emitting ec+3.

Why

iOS AVPlayer strictly enforces RFC 6381 codec strings in HLS variant attributes. The engine advertises ec+3 for JOC tracks to match Apple's HLS Authoring Spec recommendation, and macOS / tvOS tolerate that fine. iOS does not: it treats ec+3 as an unknown codec and silently drops the variant during selection, so asset.load(tracks) returns 0 and the item fails to open with:

  • AVFoundationErrorDomain -11848 "Cannot Open"
  • underlying CoreMediaErrorDomain -15517

Switching iOS to plain ec-3 lets AVPlayer accept the variant. JOC is unaffected — the dec3 box in the segment fMP4 still carries the JOC marker, which is what receivers use to detect Atmos. Only the playlist codec string changes.

Effect

  • iOS: DV + Atmos titles play instead of failing at variant selection.
  • macOS / tvOS: unchanged; still advertises ec+3.
  • Atmos passthrough: intact on all platforms (the marker lives in the segment, not the playlist).

iOS AVPlayer strictly enforces RFC 6381 codec strings in HLS variant
attributes. The engine emits `ec+3` for EAC-3 with JOC (Atmos) tracks
to match Apple's HLS Authoring Spec recommendation, but iOS treats
`ec+3` as an unknown codec and silently drops the variant:
`asset.load(tracks)` returns 0 and the item fails to open with
`AVFoundationErrorDomain -11848 "Cannot Open"` (underlying
`CoreMediaErrorDomain -15517`). macOS / tvOS tolerate `ec+3` and play
the same variant.

Gate the JOC marker so iOS emits the standard `ec-3` instead. JOC is
unaffected because the `dec3` box in the segment fMP4 still carries
the JOC marker — downstream receivers detect Atmos from that, not
from the playlist codec string. macOS and tvOS keep emitting `ec+3`.

Effect: DV + Atmos titles now play on iOS instead of failing at
variant selection.
@superuser404notfound superuser404notfound merged commit df37ef3 into superuser404notfound:main May 24, 2026
@superuser404notfound
Copy link
Copy Markdown
Owner

Thanks! Clean, surgical fix, and the note about JOC surviving via the dec3 box is the part that matters; the iOS gate doesn't cost macOS / tvOS anything. Merged and Sodalite's pin is bumped.

@Delarkz Delarkz deleted the fix-video-joc-codec-ios branch May 24, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants