fix(video): emit ec-3 for JOC on iOS#16
Merged
superuser404notfound merged 1 commit intoMay 24, 2026
Merged
Conversation
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.
Owner
|
Thanks! Clean, surgical fix, and the note about JOC surviving via the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gate the audio codec advertisement so iOS emits
ec-3for EAC-3 with JOC (Atmos) tracks; macOS and tvOS keep emittingec+3.Why
iOS AVPlayer strictly enforces RFC 6381 codec strings in HLS variant attributes. The engine advertises
ec+3for JOC tracks to match Apple's HLS Authoring Spec recommendation, and macOS / tvOS tolerate that fine. iOS does not: it treatsec+3as an unknown codec and silently drops the variant during selection, soasset.load(tracks)returns 0 and the item fails to open with:AVFoundationErrorDomain -11848 "Cannot Open"CoreMediaErrorDomain -15517Switching iOS to plain
ec-3lets AVPlayer accept the variant. JOC is unaffected — thedec3box in the segment fMP4 still carries the JOC marker, which is what receivers use to detect Atmos. Only the playlist codec string changes.Effect
ec+3.