youtube / js_mse_eme

js_mse_eme is an externally-published tool that is aimed to test the validity of a browser's HTML5 Media Source Extension and Encrypted Media Extension implementations
Apache License 2.0
91 stars 58 forks source link

ClearKeyAudio and Video EME non-WebM tests are broken because of missing encryption inside the files #12

Closed calvaris closed 8 years ago

calvaris commented 8 years ago

The files used by the non-WebM versions of the ClearKeyAudio and Video tests are not properly encrypted with ClearKey, hence it is impossible to pass the tests.

VideoStreamYTCenc: ['media/oops_cenc-20121114-145-no-clear-start.mp4', yields system ids edef8ba9-79d6-4ace-a3c8-27dcd51d21ed Widevine in pssh box 9a04f079-9840-4286-ab92-e65be0885f95 PlayReady in pssh box 58147ec8-0423-4659-92e6-f52c5ce8c3cc ClearKey in pssh box

Of course this works because the file is encrypted with ClearKey, we have the key and we can play. This works for test 1 and test 4.

In the case of test 3 that uses VideoNormalClearKey: ['media/car_cenc-20120827-86.mp4' we are getting: 9a04f079-9840-4286-ab92-e65be0885f95 PlayReady in pssh box edef8ba9-79d6-4ace-a3c8-27dcd51d21ed Widevine in pssh box 9a04f079-9840-4286-ab92-e65be0885f95 PlayReady in piff box but no uuid of ClearKey so file cannot be decrypted.

Same happens for test 2 with AudioNormalClearKey: ['media/car_cenc-20120827-8c.mp4'

So there are some mp4 files at streamDef.js that are defined there and are wrongly encrypted which makes them impossible to decrypt.

I think what would be interesting is that you people have a look at streamDef.js and check how the files are encrypted there.

Besides this, I think the uuid for ClearKey changed at the spec and it's different from 58147ec8-0423-4659-92e6-f52c5ce8c3cc.

tdedecko commented 8 years ago

In the case of test 3 the PSSH box is directly inserted into the initialization data during onNeedKey event. The file was initially created to have PSSH boxes passed in the manifest file. So, it is outdated at this point. Be that as it may, for 2017 we are probably not going to have any ClearKey tests since the JWK format seems unnecessary to support.

tdedecko commented 8 years ago

Moving forward we won't be supporting clearkey for future versions of the tests. This is working as intended for now.