Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When specifying several EXT-X-KEY one after another(multi drm playlist), only the last EXT-X-KEY is assigned to the segments #141

Open
Able1991 opened this issue Dec 21, 2023 · 4 comments

Comments

@Able1991
Copy link

Sample:

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:4
#EXT-X-MAP:URI="init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://SOME_SKD",KEYFORMATVERSIONS="1",KEYFORMAT="com.apple.streamingkeydelivery"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="XXXXX"
#EXTINF:2.000,
127920.m4s

After parsing I see one key in the segment

@kuu
Copy link
Owner

kuu commented Dec 22, 2023

Can you elaborate the multi-key use case?
Maybe you refer to the following sentence in the spec:

Two or more EXT-X-KEY tags with different KEYFORMAT attributes MAY apply to the same Media Segment if they ultimately produce the same decryption key.

But I still don't understand what's the point of having different keys for the same segment.

@Able1991
Copy link
Author

Can you elaborate the multi-key use case? Maybe you refer to the following sentence in the spec:

Two or more EXT-X-KEY tags with different KEYFORMAT attributes MAY apply to the same Media Segment if they ultimately produce the same decryption key.

But I still don't understand what's the point of having different keys for the same segment.

I'm doing Widevine + Fairplay in HLS using shaka-packager with cbcs protection scheme

@kuu
Copy link
Owner

kuu commented Dec 23, 2023

Can you attach the actual manifest?
I just wanted to see all attributes.
You can obscure the URLs.

@Able1991
Copy link
Author

#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version v2.6.1-634af65-release
#EXT-X-TARGETDURATION:3
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,mgIAAAEAAQCQAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AUgB1AGYAVwBJAHEAQgA2ADIAMwB6AHUAdQA1AHEAWAAzAGsARgB6AGwAZwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgAwAGsAUQAxAGIAbwB0AEkAVwBkAGcAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwBkAHIAbQAyADUANQA0ADIALgBtAC4AZAByAG0AbgBvAHcALgByAHUALwBwAGwAYQB5AHIAZQBhAGQAeQAvAHIAaQBnAGgAdABzAG0AYQBuAGEAZwBlAHIALgBhAHMAbQB4ADwALwBMAEEAXwBVAFIATAA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A",KEYFORMAT="com.microsoft.playready",KEYFORMATVERSIONS="1"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://22d6e7467aa07cdbeebb9a97de417396",KEYFORMATVERSIONS="1",KEYFORMAT="com.apple.streamingkeydelivery"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,AAAAa3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEsIARIgMjJkNmU3NDY3YWEwN2NkYmVlYmI5YTk3ZGU0MTczOTYaA2NkbiIgMjJkNmU3NDY3YWEwN2NkYmVlYmI5YTk3ZGU0MTczOTY=",KEYID=0x22D6E7467AA07CDBEEBB9A97DE417396,IV=0x0217FDB7ADADAB21D0D3539648AFA866,KEYFORMATVERSIONS="1",KEYFORMAT="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
#EXTINF:3.000,
1.m4s
#EXTINF:3.000,
2.m4s
#EXTINF:3.000,
3.m4s
#EXTINF:1.000,
4.m4s
#EXT-X-ENDLIST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants