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

Play Opus audio #4527

Closed
stolen opened this issue Jan 26, 2022 · 2 comments
Closed

Play Opus audio #4527

stolen opened this issue Jan 26, 2022 · 2 comments
Labels
Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Bug
Milestone

Comments

@stolen
Copy link
Contributor

stolen commented Jan 26, 2022

Is your feature request related to a problem? Please describe.

I want to play a video (fMP4 paylist) which has audio track encoded with Opus codec.
I need to specify that in CODECS parameter, but there is no way to make it work:

  • opus is rejected by hls.js because sampleEntryCodesISO has key Opus but not opus
  • Opus is rejected by Chrome and Firefox because these browsers violate specs

Lowercase opus works with some players (bitmovin, castr.io) while Opus does not.

Describe the solution you'd like

It seems to be less evil to accept lowercase opus codec as de-facto standard.

Additional context

Sample playlists + segments https://gist.github.com/stolen/c7f9ced139fb38b5759ff3a73d7a6717
PR with proposed solution #4526

@stolen stolen added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jan 26, 2022
@robwalch robwalch added Bug Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Feature proposal labels Jul 14, 2022
@robwalch robwalch added this to the 1.2.5 milestone Oct 6, 2022
@robwalch robwalch added the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Oct 25, 2022
@BlakeB415
Copy link

BlakeB415 commented Nov 3, 2022

Note: Firefox now supports both "opus" and "Opus"
https://bugzilla.mozilla.org/show_bug.cgi?id=1778333

Here's the open issue for chromium.
https://bugs.chromium.org/p/chromium/issues/detail?id=1342217

In the meantime, wouldn't it be better to check for both "opus" and "Opus" when checking for support? Removing the spec accurate codec ID entirely is not a good idea.

Another thing to note is that bento4 outputs "Opus" as the codec.

@robwalch
Copy link
Collaborator

robwalch commented Nov 4, 2022

Thanks @BlakeB415,

Added back "Opus" to the list of audio codecs so that HLS.js recognizes it as an audio codec: b8d8e09

Browsers will still need to fix case sensitivity issues with SourceBuffer.isTypeSupported() (and canPlayType, and MediaCapabilities where needed). HLS.js will check for support using the codec string provided in the playlist.

@robwalch robwalch removed the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Nov 5, 2022
@robwalch robwalch closed this as completed Nov 5, 2022
littlespex pushed a commit to cbsinteractive/hls.js that referenced this issue Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Bug
Projects
None yet
Development

No branches or pull requests

3 participants