# MPEG-DASH streaming using CENC but it not work.

**URL:** <https://community.wowza.com/t/mpeg-dash-streaming-using-cenc-but-it-not-work/47611>\
**Category:** Wowza Developer Dojo\
**Created:** [November 25, 2016, 5:23pm UTC](https://community.wowza.com/t/mpeg-dash-streaming-using-cenc-but-it-not-work/47611 "2016-11-25T17:23:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Montree\_Kasa](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Montree\_Kasa](https://community.wowza.com/u/Montree_Kasa)\
**Post date:** [November 25, 2016, 5:23pm UTC](https://community.wowza.com/t/mpeg-dash-streaming-using-cenc-but-it-not-work/47611/1 "2016-11-25T17:23:38Z")

</div>

Hi.

I follow the guide for live streaming cenc-widevine+playready protection, but it not work with Playready.

[https://www.wowza.com/docs/how-to-secure-mpeg-dash-streaming-using-common-encryption-cenc](https://www.wowza.com/docs/how-to-secure-mpeg-dash-streaming-using-common-encryption-cenc)

This is where I do with wowza mudule.

_public void onHTTPMPEGDashEncryptionKeyLiveChunk(ILiveStreamPacketizer liveStreamPacketizer, String streamName, CencInfo cencInfo, long chunkId)_

_{_

_// set CENC key info_

_cencInfo.setAlgorithm(CencInfo.ALGORITHMID\_CTR);_

_cencInfo.setKID(Base64.decode(“ApS5WZ11XeK78P3KP6Xqtw==”));_

_cencInfo.setEncKeyBytes(Base64.decode(“O9ovQDRMfe9hQie5wPA+Jg==”));_

_// add DRM info for first DRM system (Widevine in this case)_

_CencDRMInfoWidevine drmInfo = new CencDRMInfoWidevine();_

_drmInfo.setSystemId(“edef8ba9-79d6-4ace-a3c8-27dcd51d21ed”);_

_drmInfo.setPsshData(Base64.decode(“CAESEAKUuVmddV3iu/D9yj+l6rcaDXdpZGV2aW5lX3Rlc3QiEGZrajNsamFTZGZhbGtyM2oqAlNEMgA=”));_

_cencInfo.addDRM(“myWidevineDRM:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed”, drmInfo);_

_// add DRM info for second DRM system (PlayReady in this case)_

_PlayReadyKeyInfo playReadyKeyInfo = new PlayReadyKeyInfo();_

_playReadyKeyInfo.setLicenseURL(“[http://myplayreadyserver.com/authenticate.aspx](http://myplayreadyserver.com/authenticate.aspx)”); \<\<\<\<\<\<_

_playReadyKeyInfo.setChecksum(Base64.decode(“vbxgstjfSQY=”)); \<\<\<\<\<\<_

_playReadyKeyInfo.setKeyId(BufferUtils.decodeHexString(“F6005DCF-7F93-4B8E-85C7-F977740DA059”.replace("-", “”)));_

_playReadyKeyInfo.setContentKey(Base64.decode(“Tc2cQBPC/paTkftvaITCSQ==”));_

_CencDRMInfoPlayready prInfo = new CencDRMInfoPlayready();_

_prInfo.setPlayReadyKeyInfo(playReadyKeyInfo);_

_cencInfo.addDRM(“myPlayReadyDRM:9a04f079-9840-4286-ab92-e65be0885f95”, prInfo);_

_}_

What is the playReadyKeyInfo.setChecksum and playReadyKeyInfo.setLicenseURL ?

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [December 30, 2016, 4:24pm UTC](https://community.wowza.com/t/mpeg-dash-streaming-using-cenc-but-it-not-work/47611/2 "2016-12-30T16:24:42Z")

</div>

Hi,

This information should be provided to you by your DRM provider, along with the key info.

Michelle

---

<div class="post-metadata">

**Author:** ![Robinsh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@Robinsh\_Kumar](https://community.wowza.com/u/Robinsh_Kumar)\
**Post date:** [May 30, 2017, 12:00pm UTC](https://community.wowza.com/t/mpeg-dash-streaming-using-cenc-but-it-not-work/47611/3 "2017-05-30T12:00:41Z")

</div>

Hi Michelle ,

can u post one example code for how to provide information along with key info??

And how to Map a stream name to a private encryption key and public key identifier(along with code)
