- [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/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

Hey Guys,
I'm trying to make DRM (Fairplay) to a UDP stream produced by gstreamer (command bellow), to make ll-hls, with TS segments. Based on this answer https://github.com/gpac/gpac/issues/2230#issuecomment-1189306231 I try to create the xml file based on it (cbcs that I use for mp4), but is not working, I don't know if maybe I'm missing something or maybe is a bug.........

```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="cbcs">
        <DRMInfo type="pssh" version="1" >
                <!-- System ID (Fairplay)  -->
                <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        </DRMInfo>
        <CrypTrack isEncrypted="1" constant_IV_size="16" constant_IV="0xDA.........................................69" saiSavedBox="senc">
                <!-- Add the URI and KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"-->
                <key KID="0xDA.........................................69" value="0x9AXXXXXXXXXXXXXXXXXXXXXX89" hlsInfo='URI="skd://fps.ezdrm.com/;daXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX69",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
        </CrypTrack>
</GPACDRM>
```

```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="HLS SAES">
        <DRMInfo type="pssh" version="1" >
                <!-- System ID (Fairplay)  -->
                <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        </DRMInfo>
        <CrypTrack isEncrypted="1" constant_IV_size="16" constant_IV="0xDA.........................................69" saiSavedBox="senc">
                <!-- Add the URI and KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"-->
                <key KID="0xDA.........................................69" value="0x9AXXXXXXXXXXXXXXXXXXXXXX89" hlsInfo='URI="skd://fps.ezdrm.com/;daXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX69",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
        </CrypTrack>
</GPACDRM>
```

Gstreamer command: 

```bash
gst-launch-1.0 -v videotestsrc ! video/x-raw, height=1080, width=1920 ! timeoverlay halignment=left \
! clockoverlay halignment=right ! videoconvert ! x264enc tune=zerolatency ! video/x-h264, profile=high \
! mpegtsmux name=mux ! udpsink host=239.0.0.1 port=1234 audiotestsrc wave=sine ! audioconvert ! faac ! mux.
```

Gpac command:

```bash
gpac -i udp://239.0.0.1:1234 cecrypt:cfile=/etc/drm/drm.xml @ -o /stream/prog_index.m3u8:gpac:segdur=3:cdur=0.5:asto=2.5:profile=live:dmode=dynamic:llhls=sf:hlsc=1:ll_preload_hint=1:ll_rend_rep=0:ll_part_hb=-1:template=fileSequence:fintra=0.5:muxtype=ts
```

I also try to add this to the input, but I don't know if that also works for UDP. 

```
::#HLSKey=urn:gpac:keys:value:5544694d47473326622665665a396b36::#Representation=1
```

And also I'm getting the following error.
```
gpac-hls     | [avc-h264] Unknown aspect_ratio_idc: your video may have a wrong aspect ratio. Contact the GPAC team!
gpac-hls     | [CENC] Invalid NALU size 4185261116 remaining bytes 904
gpac-hls     | [CENC] Error encrypting packet 53 in PID video1: BitStream Not Compliant
```

I tested this with gpac 2.2 and the latest Master changes.
LL-HLS DRM with fairplay and TS mux
This is a GitHub Issue
repo:gpac
owner:gpac
Title : LL-HLS DRM with fairplay and TS mux
Issue date:

--- start body ---
- [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/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

Hey Guys,
I'm trying to make DRM (Fairplay) to a UDP stream produced by gstreamer (command bellow), to make ll-hls, with TS segments. Based on this answer https://github.com/gpac/gpac/issues/2230#issuecomment-1189306231 I try to create the xml file based on it (cbcs that I use for mp4), but is not working, I don't know if maybe I'm missing something or maybe is a bug.........

```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="cbcs">
        <DRMInfo type="pssh" version="1" >
                <!-- System ID (Fairplay)  -->
                <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        </DRMInfo>
        <CrypTrack isEncrypted="1" constant_IV_size="16" constant_IV="0xDA.........................................69" saiSavedBox="senc">
                <!-- Add the URI and KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"-->
                <key KID="0xDA.........................................69" value="0x9AXXXXXXXXXXXXXXXXXXXXXX89" hlsInfo='URI="skd://fps.ezdrm.com/;daXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX69",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
        </CrypTrack>
</GPACDRM>
```

```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="HLS SAES">
        <DRMInfo type="pssh" version="1" >
                <!-- System ID (Fairplay)  -->
                <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        </DRMInfo>
        <CrypTrack isEncrypted="1" constant_IV_size="16" constant_IV="0xDA.........................................69" saiSavedBox="senc">
                <!-- Add the URI and KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"-->
                <key KID="0xDA.........................................69" value="0x9AXXXXXXXXXXXXXXXXXXXXXX89" hlsInfo='URI="skd://fps.ezdrm.com/;daXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX69",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
        </CrypTrack>
</GPACDRM>
```

Gstreamer command: 

```bash
gst-launch-1.0 -v videotestsrc ! video/x-raw, height=1080, width=1920 ! timeoverlay halignment=left \
! clockoverlay halignment=right ! videoconvert ! x264enc tune=zerolatency ! video/x-h264, profile=high \
! mpegtsmux name=mux ! udpsink host=239.0.0.1 port=1234 audiotestsrc wave=sine ! audioconvert ! faac ! mux.
```

Gpac command:

```bash
gpac -i udp://239.0.0.1:1234 cecrypt:cfile=/etc/drm/drm.xml @ -o /stream/prog_index.m3u8:gpac:segdur=3:cdur=0.5:asto=2.5:profile=live:dmode=dynamic:llhls=sf:hlsc=1:ll_preload_hint=1:ll_rend_rep=0:ll_part_hb=-1:template=fileSequence:fintra=0.5:muxtype=ts
```

I also try to add this to the input, but I don't know if that also works for UDP. 

```
::#HLSKey=urn:gpac:keys:value:5544694d47473326622665665a396b36::#Representation=1
```

And also I'm getting the following error.
```
gpac-hls     | [avc-h264] Unknown aspect_ratio_idc: your video may have a wrong aspect ratio. Contact the GPAC team!
gpac-hls     | [CENC] Invalid NALU size 4185261116 remaining bytes 904
gpac-hls     | [CENC] Error encrypting packet 53 in PID video1: BitStream Not Compliant
```

I tested this with gpac 2.2 and the latest Master changes.
--- end body ---
