Wowza Community

Wowza Server HLS playlist manipulation

Hello,

I began by reasearching the API and documentation in order to figure out a way to do the following two things:

  1. Add a custom header to an HLS chunklist that will contain all the information needed by the player to decrypt the content (#EXT-X-KEY:METHOD=AES-128…).

  2. Make this work with an origin-edge scenario, encryption and chunklist manipulation being done on edge.

The documentation found that address the topic and the issues are below.

A. https://www.wowza.com/docs/how-to-add-custom-playlist-headers-to-apple-hls-manifests

This scenario refers to changing the chunklist for each entry or working with the key in a way I wanted to. This is the way to do it if the key changes during playout, so there will be a discontinuity and a new key delivered, I assume.

B. http://www.wowza.com/resources/serverapi/?com/wowza/wms/module/IModuleOnHTTPCupertinoEncryption.html

http://www.wowza.com/resources/serverapi/4.7.0/?com/wowza/wms/httpstreamer/cupertinostreaming/livestreampacketizer/IHTTPStreamerCupertinoLivePacketizerDataHandler2.html

The module needs to implement the IModuleOnHTTPCupertinoEncryption interface. And - additionally - IHTTPStreamerCupertinoLivePacketizerDataHandler2 (if needed). Said and done.

C. https://www.wowza.com/docs/how-to-secure-apple-hls-streaming-using-drm-encryption

https://www.wowza.com/docs/how-to-secure-apple-http-live-streaming-aes-128-external-method

https://www.wowza.com/community/questions/7414/hls-live-streaming-secured-with-hlschange-key-on-t.html

These may be categorized as other reading.

The problems encountered and the questions are:

  1. With the origin-edge scenario, there is no call to the onHTTPCupertinoEncryptionKeyLiveChunk() method (or any other methods of IModuleOnHTTPCupertinoEncryption). Does the HLS encryption works on the edge with an origin-edge scenario?

  2. How often will the encryption be done? Can I assume that it will be done once per stream and not for each HTTP session?

  3. The chunklist seems to be generated for each session. So the calls to the methods of the class that implements the IHTTPStreamerCupertinoLivePacketizerDataHandler2 interface (ie onFillChunkStart(), onFillChunkEnd()) will be done for each session, for each chunklist request. Is this correct?

  4. Is there a way to track TS files and corresponding key in order to signal properly the key change in the chunklist?

  5. Should I stick with an origin-edge scenario with encryption done on edge servers or this cannot work?

Thank you,

Iulian