shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.94k stars 499 forks source link

HLS fmp4 using CENC(CTR) with Playready DRM #283

Open kamalonly opened 6 years ago

kamalonly commented 6 years ago

Does Shaka packager support packaging hls fmp4 using CENC(CTR) with Playready DRM?

kqyang commented 6 years ago

Not right now. I don't think there will be a lot of work to add support for it in Shaka packager, but we'll need to have a defined format first.

I am not aware of any public specification on carriage and signaling of Playready DRM in HLS playlist. Let us know if there is one.

tinskip commented 6 years ago

Pretty certain MS is defining their own HLS extensions, or at least planning to. Would make sense to coordinate.

On Wed, Nov 1, 2017 at 11:36 AM, Kongqun Yang notifications@github.com wrote:

Not right now. I don't think there will be a lot of work to add support for it in Shaka packager, but we'll need to have a defined format first.

I am not aware of any public specification on carriage and signaling of Playready DRM in HLS manifest. Let us know if there is one.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/shaka-packager/issues/283#issuecomment-341199107, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7evdqGPNIg3udqWBborP0Clk5r2Tltks5syLo5gaJpZM4QOAQp .

-- Thomás Inskip | Software Engineer | tinskip@google.com | +1 650 241 9697

universalarchi commented 6 years ago

I don't know detail about DRM's specification. So I have a question. I just wonder is this follow the standard of hls? same as supporting SAMPLE-AES-CENC widevine in m3u8+fmp4. I think we don't need to follow hls standard. right? It is just for Apple's device. right? ps. I don't want to make argument. I just wonder about drms in fmp4+m3u8.

kqyang commented 6 years ago

No, HLS standard does not define anything on non-Apple DRM systems. A custom tag needs to be defined, similar to Widevine's SAMPLE-AES-CENC, possibly extend from SAMPLE-AES-CENC. The specification should be made public and implemented in various players as well.

kqyang commented 6 years ago

Calls for contributions if you knows about Playready DRM signaling in HLS or if you have a copy of the specification. PR is always welcomed!

modernletter commented 5 years ago

According to current Microsoft documentation com.microsoft.playready is recommended KEYFORMAT used to signal PlayReady in HLS (fMP4) using standard #EXT-X-KEY tag. URI contains base-64 encoded PlayreadyObject, and METHOD is SAMPLE-AES (cbcs) / SAMPLE-AES-CRT (cenc) like in Widevine. PlayReady should also be signalled at master playlist.

There is also test content using this KEYFORMTAT: https://testweb.playready.microsoft.com/Content/Content4X

According to doc, this should work with CENC-CTR for Windows 10 and Xboxes and with CENC-CBCS for Xboses only.

kqyang commented 5 years ago

@modernletter Nice! Thanks for the information.

Able1991 commented 9 months ago

Any news? I want to try to encrypt playready with cbcs(playready+widevine+fairplay with my custom pssh from key servers), now the packer adds the necessary data to the dash manifest, but there is nothing in the hls playlist

xusuona commented 7 months ago

shaka-packager does not generate "ext-x-key" tag when encrypting hls with PlayReady, which obviously does not comply with Microsoft DRM standard, is there a way to solve this problem?

Able1991 commented 7 months ago

shaka-packager does not generate "ext-x-key" tag when encrypting hls with PlayReady, which obviously does not comply with Microsoft DRM standard, is there a way to solve this problem?

I have a temporary solution, I add the desired tag to the playlist, taking the data from the mpd manifest. I take the mspr:pro value and add the line to the playlist myself.

#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,${msProFromMpd}",KEYFORMAT="com.microsoft.playready",KEYFORMATVERSIONS="1"

Just for now I don’t have the opportunity to check the correctness of this encryption, since my Windows laptop does not support cbcs playready, need to find an Xbox for tests =( If you have the opportunity to check, tell me if it works in the player