Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/file/g3ykan71w89nglu/47_3616555604852_01_001.aac/file

I have use this XML configuration and command to generate an encrypted HLS stream for using with FairPlay DRM. Although safari browser can play the audio, I cannot hear anything.
1. The XML configuration
```
<?xml version="1.0" encoding="UTF-8" />
<GPACDRM type="HLS SAES">
<!-- example for GPAC - keys are listed after the content and UL follows -->
<DRMInfo type="pssh" version="1" cypherOffset="9" cypherIV="0x00000000000000000000000000000001" cypherKey="0x6770616363656E6364726D746F6F6C31">
<BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
<BS value="1" bits="32"/>
<BS ID128="0x279926496a7f5d25da69f2b3b2799a7f"/>
<BS bits="8" string="CID=Toto"/>
<BS ID128="0x5544694d47473326622665665a396b36"/>
</DRMInfo>

<CrypTrack IsEncrypted="1" constant_IV_size="16" constant_IV="0x65656565656565656565656565656565">
<key KID="0x279926496a7f5d25da69f2b3b2799a7f" value="0xd5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5" hlsInfo='URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
</CrypTrack>
</GPACDRM>
```
2. Gpac command:
`gpac -i source cecrypt:cfile=DRM.xml:segdur=100:segext=aac -o res/live.m3u8
`
I found this command in the issue [#2230](https://github.com/gpac/gpac/issues/2230) to create Sample-AES encrypted stream for AAC audio file.
4. The generated HLS stream
```
#EXTM3U
#EXT-X-TARGETDURATION:100
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="47_3616555604852_01_001_dashinit.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:99.9851,
47_3616555604852_01_001_dash1.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash2.aac
#EXTINF:99.9851,
47_3616555604852_01_001_dash3.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash4.aac
#EXTINF:3.73841,
47_3616555604852_01_001_dash5.aac

#EXT-X-ENDLIST
```
I saw that the browser can play the audio, browser tab show the speaker symbol, but I cannot hear anything from it. I can ensure that my FairPlay DRM implementation works very well.
Could anyone help me to generate an SAMPLE-AES encrypted HLS stream that compatible with FairPlay DRM? Thank you very much!
Cannot decrypt stream encrypted by GPAC HLS AES when test FairPlay DRM?
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Cannot decrypt stream encrypted by GPAC HLS AES when test FairPlay DRM?
Issue date:

--- start body ---
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/file/g3ykan71w89nglu/47_3616555604852_01_001.aac/file

I have use this XML configuration and command to generate an encrypted HLS stream for using with FairPlay DRM. Although safari browser can play the audio, I cannot hear anything.
1. The XML configuration
```
<?xml version="1.0" encoding="UTF-8" />
<GPACDRM type="HLS SAES">
<!-- example for GPAC - keys are listed after the content and UL follows -->
<DRMInfo type="pssh" version="1" cypherOffset="9" cypherIV="0x00000000000000000000000000000001" cypherKey="0x6770616363656E6364726D746F6F6C31">
<BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
<BS value="1" bits="32"/>
<BS ID128="0x279926496a7f5d25da69f2b3b2799a7f"/>
<BS bits="8" string="CID=Toto"/>
<BS ID128="0x5544694d47473326622665665a396b36"/>
</DRMInfo>

<CrypTrack IsEncrypted="1" constant_IV_size="16" constant_IV="0x65656565656565656565656565656565">
<key KID="0x279926496a7f5d25da69f2b3b2799a7f" value="0xd5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5" hlsInfo='URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
</CrypTrack>
</GPACDRM>
```
2. Gpac command:
`gpac -i source cecrypt:cfile=DRM.xml:segdur=100:segext=aac -o res/live.m3u8
`
I found this command in the issue [#2230](https://github.com/gpac/gpac/issues/2230) to create Sample-AES encrypted stream for AAC audio file.
4. The generated HLS stream
```
#EXTM3U
#EXT-X-TARGETDURATION:100
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="47_3616555604852_01_001_dashinit.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:99.9851,
47_3616555604852_01_001_dash1.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash2.aac
#EXTINF:99.9851,
47_3616555604852_01_001_dash3.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash4.aac
#EXTINF:3.73841,
47_3616555604852_01_001_dash5.aac

#EXT-X-ENDLIST
```
I saw that the browser can play the audio, browser tab show the speaker symbol, but I cannot hear anything from it. I can ensure that my FairPlay DRM implementation works very well.
Could anyone help me to generate an SAMPLE-AES encrypted HLS stream that compatible with FairPlay DRM? Thank you very much!
--- end body ---

None