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

PlayReady CBCS not playing back #542

Open
qchroman opened this issue Aug 13, 2020 · 9 comments
Open

PlayReady CBCS not playing back #542

qchroman opened this issue Aug 13, 2020 · 9 comments

Comments

@qchroman
Copy link

Good day, all!

I wonder if anyone tried playing back DASH + PR CBCS in Edge/IE? I tried a test content from MS Test Server (https://testweb.playready.microsoft.com/Content/Content4X - APPLESET-DASH-CBCS-bbb) in the dash.js (3.0.3) and it plays fine after getting a license in Edge Chromium and IE11. I have tried packaging my own content with the same keys and the playback fails.

python ./1.6.0.637/utils/mp4-dash.py -f ^
--playready-header=LA_URL:https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(persist:false,ck:W31bfVt9W31bfVt9W31bfQ==,ckt:aescbc) ^
--playready-version=4.3 ^
--playready ^
--encryption-key=10000000100010001000100000000001:7d5b7d5b7d5b7d5b7d5b5b7d5b7d5b7d ^
--no-split --profiles on-demand ^
--output-dir=./output/dash-ms-cbcs ^
./input/sintel-480.frag.mp4 ./input/sintel-720.frag.mp4

The command that I have used is above. First four groups of data in the Content Key were reversed to be correctly represented in hex format. But, neither "7d5b7d5b7d5b7d5b7d5b5b7d5b7d5b7d", nor "5b7d5b7d5b7d5b7d5b7d5b7d5b7d5b7d" make the playback work, so it may be something different.

https://s3.us-east-1.amazonaws.com/test.vectors/roman/dash-ms/dash-ms-cbcs/index.html - 5b7d5b7d5b7d5b7d5b7d5b7d5b7d5b7d
https://s3.us-east-1.amazonaws.com/test.vectors/roman/dash-ms/dash-ms-cbcs-rev/index.html - 7d5b7d5b7d5b7d5b7d5b5b7d5b7d5b7d
https://s3.us-east-1.amazonaws.com/test.vectors/roman/dash-ms/index.html - link to the MS content.

Not sure if it's me using a wrong command or something else. Any advice is highly appreciated.

BR

@barbibulle
Copy link
Contributor

I haven't tried this specific example, but one thing that seems wrong here is that the LA_URL value you use here seems to point to a PlayReady test server with parameters instructing the server to return a license for AES CBCS (ckt:aescbc).
Also, the encryption key, W31bfVt9W31bfVt9W31bfQ== in base64 corresponds to 5b7d5b7d5b7d5b7d5b7d5b7d5b7d5b7d in hex.

For CBCS encryption, use the --encryption-cenc-scheme=cbcs command line option.

@qchroman
Copy link
Author

You are correct, @barbibulle , I do use their server to test this. I did forget the cbcs setting, thank you for pointing that out. I re-packaged the content and still have the same issue - the player fails w/o making a license request whereas when I use the content from MS with the same player set up, it works ok.

What's strange is that MS's manifest contains value="cenc" instead of the cbcs. The init chunk points to a cbcs though. I've tried changing the value inside my manifest as well, but the player still fails. If there is something I can help with, please, let me know. If I should bring the same with dash.js team to hear their input, please, let me know and I will open an issue there.

Thank you.

@qchroman
Copy link
Author

Just in case, I have created two more assets with the same, random key:

https://s3.us-east-1.amazonaws.com/test.vectors/roman/dash-ms/dash-ms-cbcs-shaka-keys/index.html - Bento4
https://s3.us-east-1.amazonaws.com/test.vectors/roman/dash-ms/shaka/index.html - Shaka Packager

One was created using Shaka Packager, another one using Bento4. Commands are below:

python ./1.6.0.637/utils/mp4-dash.py -f ^
--playready-header=LA_URL:https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(persist:false,ck:W31bfVt9W31bfVt9W31bfQ==,ckt:aescbc) ^
--playready-version=4.3 ^
--playready ^
--encryption-cenc-scheme=cbcs ^
--encryption-key=f3c5e0361e6654b28f8049c778b23946:a4631a153a443df9eed0593043db7519 ^
--no-split --profiles on-demand ^
--output-dir=./output/dash-ms-cbcs-shaka-keys ^
./input/meridian-240p.frag.mp4 ./input/meridian-360p.frag.mp4
packager-win.exe ^
in=sintel_trailer-480p.mp4,stream=audio,output=./output/sintel_trailer-480p-audio.mp4,drm_label=AUDIO ^
in=sintel_trailer-480p.mp4,stream=video,output=./output/sintel_trailer-480p.mp4,drm_label=SD ^
in=sintel_trailer-720p.mp4,stream=video,output=./output/sintel_trailer-720p.mp4,drm_label=SD ^
--enable_raw_key_encryption ^
--protection_scheme cbcs ^
--protection_systems PlayReady ^
--keys label=:key_id=f3c5e0361e6654b28f8049c778b23946:key=a4631a153a443df9eed0593043db7519 ^
--mpd_output ./output/stream.mpd

The content created with Shaka Packager plays fine.

@abdevnet
Copy link

Has anyone found a solution to this? I'm also trying to play cbcs packaged content and the browser never even attempts a license request. Does Windows 10 support PlayReady 4.3?

@barbibulle
Copy link
Contributor

Sorry for not having taken the time to look at the issue earlier. I'll try to get to it over the week-end.

@barbibulle
Copy link
Contributor

In theory this should work fine. Would it be possible for you to share some test content, both the input and the output as processed by the commands above (including the Shaka packager) so that I can take a look and see if I can spot the difference? Also, what player are you using to test the playback?

@krisvenu
Copy link

krisvenu commented Jan 22, 2025

Do we have a solution to this issue? I tried cbcs encryption using bento using the below command:
mp4dash --no-split --use-segment-timeline --playready-version=4.3 --playready --encryption-cenc-scheme=cbcs --encryption-key={kid}:{Ck} --playready-header==LA_URL: http://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(persist: false,ck:3H7ES1S7d3WmEuA9M4GQHQ==,ckt:aescbc) {fragmented clip path}

But I am not able to play in playready mediaelement player. The same method for CENC is playing fine on the same player.

@barbibulle
Copy link
Contributor

Maybe the client is too old to play this mode? See this page for compatibility details: https://learn.microsoft.com/en-us/playready/packaging/content-encryption-modes

@krisvenu
Copy link

krisvenu commented Feb 3, 2025

@barbibulle ,
Thanks for the response.
The client is using PlayReady Version 4.0. So, it should support CBCS encrypted clip playback as per https://learn.microsoft.com/en-us/playready/packaging/content-encryption-modes.
But I did the encryption using --playready-version=4.3, and the client is not supporting 4.3 version, that could be the reason for playback error.
But if I try --playready-version=4.0 with the mp4dash command for encryption, it's throwing the error "ERROR: AESCBC requires PlayReady 4.3 or higher".
Can you please help why it's not working with PR version 4.0 which ideally it should support for CBCS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants