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

Shaka player playback for certain Widevine CMAF MPD content broken on windows chrome #7692

Closed
sanchi21 opened this issue Nov 29, 2024 · 4 comments
Labels
component: Widevine The issue involves the Widevine DRM type: bug Something isn't working correctly
Milestone

Comments

@sanchi21
Copy link

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 to FairPlay.

What version of Shaka Player are you using?

v4.12.1

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?
Custom app.

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

What browser and OS are you using?
Chrome(131.0.6778.86) on Windows 11

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

What are the manifest and license server URIs?

Manifest URL:
https://media.axprod.net/TestVectors/Cmaf/protected_1080p_h264_cbcs/manifest.mpd

License Server URL: https://drm-widevine-licensing.axprod.net/AcquireLicense?AxDrmMessage=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJ2ZXJzaW9uIjogMSwKICAiY29tX2tleV9pZCI6ICI2OWU1NDA4OC1lOWUwLTQ1MzAtOGMxYS0xZWI2ZGNkMGQxNGUiLAogICJtZXNzYWdlIjogewogICAgInR5cGUiOiAiZW50aXRsZW1lbnRfbWVzc2FnZSIsCiAgICAidmVyc2lvbiI6IDIsCiAgICAibGljZW5zZSI6IHsKICAgICAgImFsbG93X3BlcnNpc3RlbmNlIjogdHJ1ZQogICAgfSwKICAgICJjb250ZW50X2tleXNfc291cmNlIjogewogICAgICAiaW5saW5lIjogWwogICAgICAgIHsKICAgICAgICAgICJpZCI6ICIzMDJmODBkZC00MTFlLTQ4ODYtYmNhNS1iYjFmODAxOGEwMjQiLAogICAgICAgICAgImVuY3J5cHRlZF9rZXkiOiAicm9LQWcwdDdKaTFpNDNmd3YremZ0UT09IiwKICAgICAgICAgICJ1c2FnZV9wb2xpY3kiOiAiUG9saWN5IEEiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjogWwogICAgICB7CiAgICAgICAgIm5hbWUiOiAiUG9saWN5IEEiLAogICAgICAgICJwbGF5cmVhZHkiOiB7CiAgICAgICAgICAibWluX2RldmljZV9zZWN1cml0eV9sZXZlbCI6IDE1MCwKICAgICAgICAgICJwbGF5X2VuYWJsZXJzIjogWwogICAgICAgICAgICAiNzg2NjI3RDgtQzJBNi00NEJFLThGODgtMDhBRTI1NUIwMUE3IgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQ._NfhLVY7S6k8TJDWPeMPhUawhympnrk6WAZHOVjER6M

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

{
"drm": {
"servers": {
"com.widevine.alpha": "https://drm-widevine-licensing.axprod.net/AcquireLicense?AxDrmMessage=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJ2ZXJzaW9uIjogMSwKICAiY29tX2tleV9pZCI6ICI2OWU1NDA4OC1lOWUwLTQ1MzAtOGMxYS0xZWI2ZGNkMGQxNGUiLAogICJtZXNzYWdlIjogewogICAgInR5cGUiOiAiZW50aXRsZW1lbnRfbWVzc2FnZSIsCiAgICAidmVyc2lvbiI6IDIsCiAgICAibGljZW5zZSI6IHsKICAgICAgImFsbG93X3BlcnNpc3RlbmNlIjogdHJ1ZQogICAgfSwKICAgICJjb250ZW50X2tleXNfc291cmNlIjogewogICAgICAiaW5saW5lIjogWwogICAgICAgIHsKICAgICAgICAgICJpZCI6ICIzMDJmODBkZC00MTFlLTQ4ODYtYmNhNS1iYjFmODAxOGEwMjQiLAogICAgICAgICAgImVuY3J5cHRlZF9rZXkiOiAicm9LQWcwdDdKaTFpNDNmd3YremZ0UT09IiwKICAgICAgICAgICJ1c2FnZV9wb2xpY3kiOiAiUG9saWN5IEEiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjogWwogICAgICB7CiAgICAgICAgIm5hbWUiOiAiUG9saWN5IEEiLAogICAgICAgICJwbGF5cmVhZHkiOiB7CiAgICAgICAgICAibWluX2RldmljZV9zZWN1cml0eV9sZXZlbCI6IDE1MCwKICAgICAgICAgICJwbGF5X2VuYWJsZXJzIjogWwogICAgICAgICAgICAiNzg2NjI3RDgtQzJBNi00NEJFLThGODgtMDhBRTI1NUIwMUE3IgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQ._NfhLVY7S6k8TJDWPeMPhUawhympnrk6WAZHOVjER6M"
}
}
}

What did you do?

I referenced 'https://shaka-player-demo.appspot.com/docs/api/tutorial-basic-usage.html' guide and added Widevine DRM configuration to it. (Player code attached.).
Playback works fine for CMAF h264 .m3u8 manifest file. The player breaks for the same content .mpd manifest file.

What did you expect to happen?
CMAF h264 .mpd to successfully play.

What actually happened?

  • We are using shaka player custom own app to play/test DRM protected content. I use Axinom public test vectors to test DRM playback.

  • I was able to play 'https://media.axprod.net/TestVectors/Cmaf/protected_1080p_h264_cbcs/manifest.mpd' manifest using shaka player all the time on Windows Chrome. This was working fine upto Shaka Player v4.8.20.

  • Recently I upgraded the shaka player to v4.11.4 where player not being able to play CMAF MPD content.

  • I tried playing with shaka player v4.12.3 aswell. Still this is not working.

  • Conversely I find this test vector is working fine on Shaka Demo Player.

  • Digging a bit deeper I see removing 'shaka.polyfill.installAll()' from the code makes things work again. Out of interest I tried installing all the polyfills explicitly and found out removing 'shaka.polyfill.EncryptionScheme.install()' from the list make things work.

  • I feel like something is changed in shaka.polyfill.EncryptionScheme.install() after shaka player v4.8.20 or something else is causing this changed behavior. But Shaka Demo player seems to work for the same test vector.

Would like to know if I'm missing some configuration with the new version of shaka player or something is broken on the player side?

Below is the code snippet I used:

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <video id="video" width="640" poster="//shaka-player-demo.appspot.com/assets/poster.jpg" controls autoplay></video>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/shaka-player/4.12.1/shaka-player.compiled.debug.js"></script>
    <script type="text/javascript">
        
        const manifestUri = 'https://media.axprod.net/TestVectors/Cmaf/protected_1080p_h264_cbcs/manifest.mpd';

        function initApp() {
          shaka.polyfill.installAll();
          initPlayer();
        }

        async function initPlayer() {
          const video = document.getElementById('video');
          const player = new shaka.Player();
          await player.attach(video);
          window.player = player;

          player.configure({
            drm: {
            servers: { 'com.widevine.alpha': 'https://drm-widevine-licensing.axprod.net/AcquireLicense?AxDrmMessage=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJ2ZXJzaW9uIjogMSwKICAiY29tX2tleV9pZCI6ICI2OWU1NDA4OC1lOWUwLTQ1MzAtOGMxYS0xZWI2ZGNkMGQxNGUiLAogICJtZXNzYWdlIjogewogICAgInR5cGUiOiAiZW50aXRsZW1lbnRfbWVzc2FnZSIsCiAgICAidmVyc2lvbiI6IDIsCiAgICAibGljZW5zZSI6IHsKICAgICAgImFsbG93X3BlcnNpc3RlbmNlIjogdHJ1ZQogICAgfSwKICAgICJjb250ZW50X2tleXNfc291cmNlIjogewogICAgICAiaW5saW5lIjogWwogICAgICAgIHsKICAgICAgICAgICJpZCI6ICIzMDJmODBkZC00MTFlLTQ4ODYtYmNhNS1iYjFmODAxOGEwMjQiLAogICAgICAgICAgImVuY3J5cHRlZF9rZXkiOiAicm9LQWcwdDdKaTFpNDNmd3YremZ0UT09IiwKICAgICAgICAgICJ1c2FnZV9wb2xpY3kiOiAiUG9saWN5IEEiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjogWwogICAgICB7CiAgICAgICAgIm5hbWUiOiAiUG9saWN5IEEiLAogICAgICAgICJwbGF5cmVhZHkiOiB7CiAgICAgICAgICAibWluX2RldmljZV9zZWN1cml0eV9sZXZlbCI6IDE1MCwKICAgICAgICAgICJwbGF5X2VuYWJsZXJzIjogWwogICAgICAgICAgICAiNzg2NjI3RDgtQzJBNi00NEJFLThGODgtMDhBRTI1NUIwMUE3IgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQ._NfhLVY7S6k8TJDWPeMPhUawhympnrk6WAZHOVjER6M'}
            }
          });
          console.log(player.getNonDefaultConfiguration());

          await player.load(manifestUri);
        }
        document.addEventListener('DOMContentLoaded', initApp);        
    </script>
  </body>
</html>

Thanks,
Sanchayan

Are you planning send a PR to fix it?
No

@sanchi21 sanchi21 added the type: bug Something isn't working correctly label Nov 29, 2024
@shaka-bot shaka-bot added this to the v4.13 milestone Nov 29, 2024
@avelad
Copy link
Member

avelad commented Nov 29, 2024

Can you copy and paste the result from https://shaka-player-demo.appspot.com/support.html here?

We also need the information that appears in chrome://media-internals/ in the CDMs tab

Thanks!

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 29, 2024
@sanchi21
Copy link
Author

sanchi21 commented Dec 2, 2024

[https://shaka-player-demo.appspot.com/support.htm] output:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
v4.12.3

{
"manifest": {
"application/dash+xml": true,
"video/vnd.mpeg.dash.mpd": true,
"application/x-mpegurl": true,
"application/vnd.apple.mpegurl": true,
"application/vnd.ms-sstr+xml": true,
"application/x-offline-manifest": true
},
"media": {
"video/mp4; codecs="avc1.42E01E"": true,
"video/mp4": true,
"video/mp4; codecs="avc3.42E01E"": true,
"video/mp4; codecs="hev1.1.6.L93.90"": true,
"video/mp4; codecs="hvc1.1.6.L93.90"": true,
"video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084"": true,
"video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084"": true,
"video/mp4; codecs="vp9"": false,
"video/mp4; codecs="vp09.00.10.08"": true,
"video/mp4; codecs="av01.0.01M.08"": true,
"video/mp4; codecs="dvh1.05.01"": false,
"video/mp4; codecs="dvh1.20.01"": false,
"audio/mp4; codecs="mp4a.40.2"": true,
"audio/mp4": true,
"audio/mp4; codecs="ac-3"": false,
"audio/mp4; codecs="ec-3"": false,
"audio/mp4; codecs="ac-4.02.01.01"": false,
"audio/mp4; codecs="opus"": true,
"audio/mp4; codecs="flac"": true,
"audio/mp4; codecs="dtsc"": false,
"audio/mp4; codecs="dtse"": false,
"audio/mp4; codecs="dtsx"": false,
"video/webm; codecs="vp8"": true,
"video/webm": true,
"video/webm; codecs="vp9"": true,
"video/webm; codecs="vp09.00.10.08"": true,
"audio/webm; codecs="vorbis"": true,
"audio/webm": true,
"audio/webm; codecs="opus"": true,
"video/mp2t; codecs="avc1.42E01E"": true,
"video/mp2t": true,
"video/mp2t; codecs="avc3.42E01E"": true,
"video/mp2t; codecs="hvc1.1.6.L93.90"": true,
"video/mp2t; codecs="mp4a.40.2"": true,
"video/mp2t; codecs="ac-3"": false,
"video/mp2t; codecs="ec-3"": false,
"text/vtt": true,
"application/mp4; codecs="wvtt"": true,
"application/mp4": true,
"application/ttml+xml": true,
"application/mp4; codecs="stpp"": true,
"audio/aac": true,
"audio/ac3": false,
"audio/ec3": false,
"audio/mpeg": true
},
"drm": {
"org.w3.clearkey": {
"persistentState": false,
"encryptionSchemes": [
"cenc",
"cbcs",
"cbcs-1-9"
],
"videoRobustnessLevels": [],
"audioRobustnessLevels": []
},
"com.widevine.alpha": {
"persistentState": true,
"encryptionSchemes": [
"cenc",
"cbcs",
"cbcs-1-9"
],
"videoRobustnessLevels": [
"SW_SECURE_CRYPTO",
"SW_SECURE_DECODE"
],
"audioRobustnessLevels": [
"SW_SECURE_CRYPTO"
]
},
"com.widevine.alpha.experiment": {
"persistentState": true,
"encryptionSchemes": [
"cenc",
"cbcs",
"cbcs-1-9"
],
"videoRobustnessLevels": [
"SW_SECURE_CRYPTO",
"SW_SECURE_DECODE"
],
"audioRobustnessLevels": [
"SW_SECURE_CRYPTO"
]
},
"com.microsoft.playready": null,
"com.microsoft.playready.hardware": null,
"com.microsoft.playready.recommendation": null,
"com.chromecast.playready": null,
"com.apple.fps.1_0": null,
"com.apple.fps": null
},
"hardwareResolution": {
"width": null,
"height": null
},
"offline": true
}

chrome://media-internals/: CDMs
chrome-media-internals

Thanks,
Sanchayan

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 2, 2024
@avelad avelad added the component: Widevine The issue involves the Widevine DRM label Dec 4, 2024
@avelad
Copy link
Member

avelad commented Dec 23, 2024

The content is CBCS and it seems that CBCS is not supported when using DRM via hardware, could this be the bug? Can you test if the same problem exists on macOS or Linux as well? And on Edge? Thanks!

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 23, 2024
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Widevine The issue involves the Widevine DRM type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants