Hi, I'm using GPAC in order to do DRM encryption with m4s chunks (from preiously generated dash), like in #924 and #1607
So I use commands:
MP4Box -stats -crypt gpac_drm_widevine.xml init_a.m4s -out init_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml init_v.m4s -out init_v_drm.m4s

MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg1_a.m4s -out seg1_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg2_a.m4s -out seg2_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg1_v.m4s -out seg1_v_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg2_v.m4s -out seg2_v_drm.m4s
...

The problem is that I'm not sure how to use the values given by my content provider in the conf.xml file. It gives me this info:
"key_id_hex":"652B...4DB", (32 chars)
"content_key_hex":"E49F...907", (32 chars)
"iv_hex":"34323...3562", (32 chars)
"playready_pssh_data":"iAMA......", (very long pssh data)
"playready_system_id":"9a04f079-9840-4286-ab92-e65be0885f95",
"widevine_drm_specific_data":"Igtnb2...bBg==", (base64, but if i convert to HEX, 34 chars)
"widevine_drm_specific_data_with_key_id":"EhB...tTbIgtnb2...bBg==", (contains the widevine_drm_specific_data). Base64, 70 chars in hex (36 + 34)
"widevine_system_id":"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",

Here I have two keyIDs, the main one, and a widevine specific data one. How should i use this information. I've tried all combinations, here is one of them:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CTR">

  <!-- Widevine -->
  <DRMInfo type="pssh" version="0">
		<BS ID128="EDEF8BA979D64ACEA3C827DCD51D21ED"/>
		<BS data="0x08011210"/>
		<BS ID128="0x652B...4DB"/>
		<BS data64="Igtnb2...bBg=="/>
	</DRMInfo>

  <CrypTrack trackID="1" IsEncrypted="1" first_IV="0x34323...3562" saiSavedBox="senc">
    <key KID="0x652B...4DB" value="0xE49F...907"/>
  </CrypTrack>
</GPACDRM>
```
The process works ok, but then I can't see the content in my provider player.
So I supose there is a problem with the encryption, because if I use other encription process (from unified streaming), the video plays fine.
Please, can you help me to know how should I use my encryption provided info in the conf.xml?

Thank you very much

The manifest.mpd I use is:
```xml
<?xml version="1.0"?>

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" xmlns:cenc="urn:mpeg:cenc:2013">
 <ProgramInformation moreInformationURL="http://gpac.io">
 </ProgramInformation>

 <Period duration="PT15S">
  <AdaptationSet segmentAlignment="true" contentType="video" maxWidth="1920" maxHeight="1080" par="16:9" lang="und" startWithSAP="1">
    <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
    <ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
   <Representation bandwidth="4096000" codecs="avc1.640029" frameRate="25/1" height="1080" id="0" mimeType="video/mp4" scanType="progresive" width="1920">
     <SegmentTemplate media="seg$Number$_v_drm.m4s" initialization="init_v_drm.m4s" timescale="12800"  presentationTimeOffset="1013056000" startNumber="1">
      <SegmentTimeline>
          <S d="64000" r="2" t="1013056000"/>
      </SegmentTimeline>
     </SegmentTemplate>
    </Representation>
  </AdaptationSet>

  <AdaptationSet segmentAlignment="true" lang="und" startWithSAP="1">
    <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
    <ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
   <Representation audioSamplingRate="48000" bandwidth="196608" codecs="mp4a.40.2" id="3" mimeType="audio/mp4">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
      <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
      <SegmentTemplate initialization="init_a_drm.m4s" media="seg$Number$_a_drm.m4s" presentationTimeOffset="3798960128" startNumber="1" timescale="48000">
        <SegmentTimeline>
          <S d="240000" r="2" t="3798960128"/>
        </SegmentTimeline>
      </SegmentTemplate>
    </Representation>

  </AdaptationSet>

 </Period>
</MPD>
```
please, help with widevine (and also Playready) encryption
This is a GitHub Issue
repo:gpac
owner:gpac
Title : please, help with widevine (and also Playready) encryption
Issue date:

--- start body ---
Hi, I'm using GPAC in order to do DRM encryption with m4s chunks (from preiously generated dash), like in #924 and #1607
So I use commands:
MP4Box -stats -crypt gpac_drm_widevine.xml init_a.m4s -out init_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml init_v.m4s -out init_v_drm.m4s

MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg1_a.m4s -out seg1_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg2_a.m4s -out seg2_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg1_v.m4s -out seg1_v_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg2_v.m4s -out seg2_v_drm.m4s
...

The problem is that I'm not sure how to use the values given by my content provider in the conf.xml file. It gives me this info:
"key_id_hex":"652B...4DB", (32 chars)
"content_key_hex":"E49F...907", (32 chars)
"iv_hex":"34323...3562", (32 chars)
"playready_pssh_data":"iAMA......", (very long pssh data)
"playready_system_id":"9a04f079-9840-4286-ab92-e65be0885f95",
"widevine_drm_specific_data":"Igtnb2...bBg==", (base64, but if i convert to HEX, 34 chars)
"widevine_drm_specific_data_with_key_id":"EhB...tTbIgtnb2...bBg==", (contains the widevine_drm_specific_data). Base64, 70 chars in hex (36 + 34)
"widevine_system_id":"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",

Here I have two keyIDs, the main one, and a widevine specific data one. How should i use this information. I've tried all combinations, here is one of them:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CTR">

  <!-- Widevine -->
  <DRMInfo type="pssh" version="0">
		<BS ID128="EDEF8BA979D64ACEA3C827DCD51D21ED"/>
		<BS data="0x08011210"/>
		<BS ID128="0x652B...4DB"/>
		<BS data64="Igtnb2...bBg=="/>
	</DRMInfo>

  <CrypTrack trackID="1" IsEncrypted="1" first_IV="0x34323...3562" saiSavedBox="senc">
    <key KID="0x652B...4DB" value="0xE49F...907"/>
  </CrypTrack>
</GPACDRM>
```
The process works ok, but then I can't see the content in my provider player.
So I supose there is a problem with the encryption, because if I use other encription process (from unified streaming), the video plays fine.
Please, can you help me to know how should I use my encryption provided info in the conf.xml?

Thank you very much

The manifest.mpd I use is:
```xml
<?xml version="1.0"?>

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" xmlns:cenc="urn:mpeg:cenc:2013">
 <ProgramInformation moreInformationURL="http://gpac.io">
 </ProgramInformation>

 <Period duration="PT15S">
  <AdaptationSet segmentAlignment="true" contentType="video" maxWidth="1920" maxHeight="1080" par="16:9" lang="und" startWithSAP="1">
    <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
    <ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
   <Representation bandwidth="4096000" codecs="avc1.640029" frameRate="25/1" height="1080" id="0" mimeType="video/mp4" scanType="progresive" width="1920">
     <SegmentTemplate media="seg$Number$_v_drm.m4s" initialization="init_v_drm.m4s" timescale="12800"  presentationTimeOffset="1013056000" startNumber="1">
      <SegmentTimeline>
          <S d="64000" r="2" t="1013056000"/>
      </SegmentTimeline>
     </SegmentTemplate>
    </Representation>
  </AdaptationSet>

  <AdaptationSet segmentAlignment="true" lang="und" startWithSAP="1">
    <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
    <ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
   <Representation audioSamplingRate="48000" bandwidth="196608" codecs="mp4a.40.2" id="3" mimeType="audio/mp4">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
      <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
      <SegmentTemplate initialization="init_a_drm.m4s" media="seg$Number$_a_drm.m4s" presentationTimeOffset="3798960128" startNumber="1" timescale="48000">
        <SegmentTimeline>
          <S d="240000" r="2" t="3798960128"/>
        </SegmentTimeline>
      </SegmentTemplate>
    </Representation>

  </AdaptationSet>

 </Period>
</MPD>
```
--- end body ---
