Exoplayer: Does Android support 'cbcs' scheme with ClearKey?

Created on 18 Sep 2020  路  10Comments  路  Source: google/ExoPlayer

[REQUIRED] Searched documentation and issues

https://exoplayer.dev/drm.html
In the table here, it is specified that Clearkey is supported from API 21 , but no detail on specifically "cenc" and "cbcs" schemes is found

[REQUIRED] Question

I am trying to determine if it is possible to use ClearKey to play back contents encrypted with the cbcs scheme of common encryption. I have not been able to do so in my testing, and i am not sure if this is due to an exoplayer limitation or an android MediaCodec limitation (and if it were a mediacodec limitation, if there is any workaround possible from exoplayer). I can provide test content, keys and demo app code modifications if required

Exoplayer Version: 2.11.5

Steps taken so far to try to get to an understanding of the issue:

-I have created sample encrypted content using the same keys and two different schemes: CENS and CBCS . The packager used was Shaka Packager 5c91e54b8b-release compiled on an ubuntu 18 environment (can share the exact commands used privately if needed)

-In order to test on Exoplayer demo app, i have done a simple modification to support "clearkey" as a drm_scheme, and to add the clearKey locally (can share this code privately if required)

-I have confirmed exoplayer 2.11.5 can reproduce CENS Clearkey Content.

-I have not been able to get the CBCS content to reproduce on exoplayer 2.11.5. The exception i get is
com.google.android.exoplayer2.ExoPlaybackException: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
which seems to indicate it is the MediaCodec object itself that is not accepting this scheme

-I have confirmed exoplayer 2.11.5 supports CBCS when the key comes from widevine (e.g. "https://storage.googleapis.com/wvmedia/cbcs/h264/tears/tears_aes_cbcs.mpd" which is part of the widevine contents in the sample app plays fine).
This leaves me thinking: Does this mean CBCS can only be used when the keys come from widevine?

-Just to be sure that it was not an issue with the content itself, I have confirmed another player on another environment ( Shaka player on Windows 10 Chrome) can reproduce these same CENS and CBCS contents with ClearKey (can share the code to initialize this playback, it is really a one liner)

So it seems that perhaps there are restrictions to either CBCS with clearkey in general, or maybe a special consideration on the key and IVs that i have not been able to find. Your help would be appreciated to understand this further

A full bug report captured from the device

Can share privately if needed. Please let me know if this would be indeed useful here

Link to test content

Can share privately if needed. Please let meknwi if it would be indeed useful here

question

Most helpful comment

I've just pushed an update for the docs. Please let me know if I missed anything.

All 10 comments

Please provide a link to the cbcs+clearkey encrypted stream. You can send it to dev.[email protected] using the subject "Issue #7945".

@AquilesCanta done. Please let me know if more information is necessary

It would seem that Clearkey doesn't support CBC mode, according to this code. I will update the documentation to reflect this. @rrfrias, can you confirm this statement?

Thanks for looking into it and for digging into the code of MediaDRM . Do you know if there are any plans to support CBCS under Clearkey in the future?

Confirming that ClearKey does not support CBCS now. We are discussing adding support in a future release.

Closing this issue because there are no actionable items for the ExoPlayer team here. We have to wait until a new Android release adds support for cbcs in clearkey. [Internal ref: b/169464128].

It would be good to add this as a disclaimer in the documentation. I took some time to find this thread online! 馃槄

Can I open a PR somewhere to add this?

I have submitted a doc fix internally for this [Internal ref: cl/333312703]. Not sure why it's not available publicly. No need to send a PR. I'll try to figure out what's going on.

I've just pushed an update for the docs. Please let me know if I missed anything.

Hello, @AquilesCanta! Thanks for the update! Hope this helps anyone who comes across this question! ;)

Was this page helpful?
0 / 5 - 0 ratings