Subject: [Hls-interest] Determining which EXT-X-SESSION-KEY is correct

From: "May, Bill" <[email-masked]>
Date: Tue, 19 May 2020 18:14:44 +0000

Hi, 

In our Disney+ service, we can encode content with multiple different codecs (avc, HEVC SDR, HEVC HDR-10 and DolbyVision for video, etc).

Each of these has its own DRM requirements (hardware/software, HDCP, etc).  Each codec has its own requirement, and some require more than one key within that codec.

Some DRMs require or allow all keys to be fetched at a single time; the EXT-X-SESSION-KEY needs to reflect that (ie: for a CODEC that has more than 1, we need a SESSION-KEY entry for all combinations).

We also have a necessity to only fetch the keys that are required.

Given these requirements, we can create a number of master playlists or create them dynamically; however, these approaches really do not scale.

We’d like to be able to create a single master playlist with all CODECS and SESSION-KEYS that are available.

So, we would like a mechanism to associate a EXT-X-STREAMINF with an EXT-X-SESSION-KEY.  

Thanks,
Bill May
Disney Streaming Services

---

From: Roger Pantos <[email-masked]>
Date: Thu, 21 May 2020 08:54:51 -0700

Hi Bill,

> On May 19, 2020, at 11:14 AM, May, Bill <Bill.May=[email-masked]> wrote:
> 
> Hi, 
> 

I think that we could address this by allowing the EXT-X-STREAM-INF tag and the EXT-X-SESSION-KEY tag to carry the CHARACTERISTICS attribute that is already defined for the EXT-X-MEDIA tag. Something like:

4.4.6.2.  EXT-X-STREAM-INF
...
      CHARACTERISTICS

      The value is a quoted-string containing one or more Uniform Type
      Identifiers [UTI] separated by comma (,) characters.  This
      attribute is OPTIONAL.  Each UTI indicates an individual
      characteristic of the Variant Stream or of the Media Playlist
      specified by the EXT-X-STREAM-INF tag . When a Variant Stream
      has a Rendition Group for a particular media type, the CHARACTERISTICS
      of the EXT-X-MEDIA tag take precedence over the CHARACTERISTICS
      of the Variant Stream for that media type.

4.4.6.5.  EXT-X-SESSION-KEY
...
      CHARACTERISTICS

      The EXT-X-SESSION-KEY tag MAY contain a CHARACTERISTICS 
      attribute. Its value is a quoted-string containing one or more Uniform Type
      Identifiers [UTI] separated by comma (,) characters.  This
      attribute is OPTIONAL.  Each UTI indicates an individual
      characteristic of the key or keys described by the tag.

As an example of usage, say that a content vendor offers three tiers, two decodable via software-only DRM and one requiring hardware DRM support. It could have the following tags in its Master Playlist:

#EXT-X-STREAM-INF:BANDWIDTH=1000000,CODECS="avc1.640028”,RESOLUTION=640x480,CHARACTERISTICS=“com.example.sw1"
1M.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2000000,CODECS="avc1.640028”,RESOLUTION=1280x720,CHARACTERISTICS=“com.example.sw2"
1M.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=4000000,CODECS="avc1.640028”,RESOLUTION=1920x1080,CHARACTERISTICS=“com.example.hw1"
4M.m3u8

#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“sw1.bin",CHARACTERISTICS=“com.example.sw1"
#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“sw2.bin",CHARACTERISTICS=“com.example.sw2"
#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“hw1.bin",CHARACTERISTICS=“com.example.hw1"

Or, for DRMs that support bundling multiple keys in a single request:

#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“sw1.bin",CHARACTERISTICS=“com.example.sw1"
#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“sw1-and-sw2.bin",CHARACTERISTICS=“ com.example.sw1,com.example.sw2"
#EXT-X-SESSION-KEY: METHOD=SAMPLE-AES,URI=“sw1-and-sw2-and-hw1.bin",CHARACTERISTICS=“ com.example.sw1,com.example.sw2,com.example.hw1"

There's some question about how far the spec would need to go in defining those semantics. In order to support a certain degree of interoperability, I could see adding a recommendation for SESSION-KEY, something like “A Client SHOULD expect a key specified by an EXT-X-SESSION-KEY tag to be required by a Media Playlist defined by an EXT-X-STREAM-INF tag or EXT-X-MEDIA tag with at least one matching characteristic in its CHARACTERISTICS attribute.”

Roger Pantos
Apple Inc.

> -- 
> Hls-interest mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hls-interest

---

From: "May, Bill" <[email-masked]>
Date: Wed, 27 May 2020 19:33:25 +0000

Hi, 

I think this use of CHARACTERISTICS would fit our needs.

Bill

> On May 21, 2020, at 8:54 AM, Roger Pantos <rpantos=[email-masked]> wrote:
> 
> [RPANTOS=[email-masked] appears similar to someone who previously sent you email, but may not be that person. Learn why this could be a risk at http://aka.ms/LearnAboutSenderIdentification.]
> 
> Hi Bill,
> 
>> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&amp;data=02%7C01%7Cbill.may%40disneystreaming.com%7C8adaad3159c54703487108d7fd9f5538%7C65f03ca86d0a493e9e4ac85ac9526a03%7C1%7C0%7C637256733085358163&amp;sdata=fjB5JN2rqyUIrXqob1Pv7zPYpZ%2FWRhcovv66SxHawnE%3D&amp;reserved=0
> 
> --
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&amp;data=02%7C01%7Cbill.may%40disneystreaming.com%7C8adaad3159c54703487108d7fd9f5538%7C65f03ca86d0a493e9e4ac85ac9526a03%7C1%7C0%7C637256733085358163&amp;sdata=fjB5JN2rqyUIrXqob1Pv7zPYpZ%2FWRhcovv66SxHawnE%3D&amp;reserved=0