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

Bug in HLS SUPPLEMENTAL-CODECS support #6586

Closed
mgny opened this issue May 11, 2024 · 1 comment · Fixed by #6597 · May be fixed by #6498
Closed

Bug in HLS SUPPLEMENTAL-CODECS support #6586

mgny opened this issue May 11, 2024 · 1 comment · Fixed by #6597 · May be fixed by #6498
Assignees
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Milestone

Comments

@mgny
Copy link
Contributor

mgny commented May 11, 2024

Have you read the FAQ and checked for duplicate open issues?
Yes

If the problem is related to FairPlay, have you read the tutorial?

Not related

What version of Shaka Player are you using?

4.8.3

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Both, demo app and custom app.

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
LG WebOS 23, Web Engine is Chromium 94.

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
LG C2 TV

What are the manifest and license server URIs?

Using a basic clear HLS manifest with SUPPLEMENTAL-CODECS attribute.

What configuration are you using? What is the output of player.getConfiguration()?

Default config

What did you do?

Tried playing a HLS stream which includes SUPPLEMENTAL-CODECS attribute (DolbyVision Profile8.1 video) on a LG TV. Even though this LG-TV supports Dolby Vision Profile8.1, shaka player playback fails with the following error: MEDIA.VIDEO_ERROR (4,,CHUNK_DEMUXER_ERROR_APPEND_FAILED:Video stream codec dolbyvision doesn't match SourceBuffer codecs.)

What did you expect to happen?
I expect Dolby Vision codec is prioritised for playback and the video is played as Dolby Vision on the TV. This feature was added recently (#6155), but it did not work on my end.

What actually happened?

Playback fails with the following error: MEDIA.VIDEO_ERROR (4,,CHUNK_DEMUXER_ERROR_APPEND_FAILED:Video stream codec dolbyvision doesn't match SourceBuffer codecs.)

I did some debugging and found that chooseBetterCodecs_ (/lib/media/segment_utils.js) never prioritizes DolbyVision codec-id even that is supported by the device. This is because an incorrect "const type" value is sent to mediacapability query in "chooseBetterCodecs_". That causes mediacapability query to return always false and chooseBetterCodecs_ to prioritize incorrect codec-id.

Are you planning send a PR to fix it?
I believe there is a typo in setting the value of "const type" that is used for mediacapability query. I tried with below fix and it worked. I can send a PR. Please let me know if this is needed.

Original Code (/main/lib/media/segment_utils.js, line473):
const type = video/mp4; codecs="${dolbyVision}"';

Fixed Code (/main/lib/media/segment_utils.js, line473):
const type = video/mp4; codecs="${dolbyVision}";

@mgny mgny added the type: bug Something isn't working correctly label May 11, 2024
@mgny mgny changed the title Bug in HLS SUPPLEMENTAL-CODECS support (#6155) Bug in HLS SUPPLEMENTAL-CODECS support May 11, 2024
@shaka-bot shaka-bot added this to the v4.9 milestone May 11, 2024
@joeyparrish
Copy link
Member

Makes sense. Please send a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Projects
None yet
4 participants