Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support fLaC and Opus codec strings in HLS #5454

Merged
merged 4 commits into from
Aug 15, 2023
Merged

fix: Support fLaC and Opus codec strings in HLS #5454

merged 4 commits into from
Aug 15, 2023

Conversation

lonebyte
Copy link
Contributor

@lonebyte lonebyte commented Aug 3, 2023

These are the correct codec strings according to the specification:

  1. https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2
  2. https://datatracker.ietf.org/doc/html/rfc6381#section-3.3
  3. https://mp4ra.org/#/codecs

The first commit just cleans up some code a bit.
The second commit provides a workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1422728
The third commit adds support for fLaC and Opus codec strings in HLS.

Fixes: #5453

This improves readability, I found the code very 'noisy'.
Chromium based browsers currently report fLaC and Opus as supported, but
fail when playback is initiated. This commit provides a workaround.
Older versions report them as not supported, even though the lower case
variants work.

Also, a necessary call to getCorrectAudioCodecs_ was missing.

Fixes: #5453
These are the correct codec strings according to RFC 6381 section 3.3.

Fixes: #5453
@lonebyte lonebyte changed the title Support fLaC and Opus codec strings in HLS fix: Support fLaC and Opus codec strings in HLS Aug 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Incremental code coverage: 98.25%

This doesn't really matter, but I fixed it for completeness' sake.
@avelad avelad added type: bug Something isn't working correctly component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release labels Aug 15, 2023
@avelad avelad added this to the v4.4 milestone Aug 15, 2023
@avelad avelad merged commit ccc3d2f into shaka-project:main Aug 15, 2023
17 of 18 checks passed
@lonebyte lonebyte deleted the HLS-fLaC-Opus-fix branch August 15, 2023 21:34
joeyparrish pushed a commit that referenced this pull request Aug 19, 2023
joeyparrish pushed a commit that referenced this pull request Aug 20, 2023
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Oct 14, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HLS with fLaC and Opus fail
3 participants