w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
939 stars 132 forks source link

Content protection (EME): Looking for early adopters #483

Open chcunningham opened 2 years ago

chcunningham commented 2 years ago

Hello! I'm looking for WebCodecs apps that are interested in content protection features (similar to EME, including copy protection, key management, HDCP, ...).

We have some interest expressed in #41, but that discussion quickly gets into weeds of various technical requirements. I'd like to take a step back. Developing these features is a significant undertaking. I'm looking to partner with a handful of early adopters to ensure we build it right and can maximize the impact for users ASAP.

Please note: this issue is about WebCodecs, not WebRTC. We are aware of interest in EME features for WebRTC. These are best handled by WebRTC APIs, so please file issues against those specs. WebCodecs strives to be coherent with other web APIs but is generally designed to be a low level API that is decoupled from WebRTC.

Lets not discuss technical details here!

Instead, please file a separate issue w/ a subject like "Content Protection: example.com" with details of your use case and requirements. Please reference this issue (#483) in your report to help us aggregate the requests.

From there I hope to identify overlapping features and areas where we can invest early to make the biggest difference. Thanks!

rayvbr commented 1 year ago

We develop and market an advanced multiview player, until recently limited to native applications for iOS, Android, Windows/Mac and Unity, and have recently expanded into adding support for running inside browsers. Our solution is unique in the sense that instead of running multiple parallel decoders, we 'merge' multiple independent feeds dynamically on the client-side by rewriting the codec bitstream before passing it into the decoder. This has benefits in that it only requires a single (HW) decoder as well as making synchronization between feeds a lot simpler.

The main disclaimer is that after decoding we need to do some processing on the decoded frames before rendering them. Specifically applying a shader (WebGL in the case of browsers) to split the decoded texture and take the constituent sub-frames and show them in the different views of the multiview player. Because this mapping can change on a per-frame basis, we need careful synchronisation between the WebGL render pipeline and the video decoder output. For obvious reasons this doesn't work with MSE, which is why we've been using WebCodecs to good result.

The lack of EME/DRM support though means that so far we've been limited to using clearkey-like encryption methods inside browsers, which is obviously not ideal.

In other news, this feature is just what we're looking for