• How to test AES encryption for Apple HLS streams

    This article describes how to test AES-128 encryption for streams delivered over the Apple HTTP Live Streaming (Apple HLS) protocol to iOS-based devices. You can test AES encryption by playing a chunk (a .ts file) from the encrypted stream in VLC media player. If AES encryption is working correctly, the chunk can't be played in VLC.

    Note: Wowza Media Server™ 3.6.0 or later is required.


    Testing AES encryption

    Note: This article shows you how to test AES encryption for video-on-demand (VOD) streaming using the vod application and the sample video file [install-dir]/content/sample.mp4. Be sure to substitute your application name and stream name appropriately.

    To test AES encryption, do the following:

    1. In a web browser, enter the URL of an Apple streaming playlist (.m3u8) file. For example:
      http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/playlist.m3u8
      Save the playlist file to your computer. The file contents will be similar to the following:
      #EXTM3U
      #EXT-X-VERSION:3
      #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=572079,CODECS="avc1.66.30, mp4a.40.2",RESOLUTION=424x240
      chunklist_w1776170579.m3u8
    2. Open the playlist file in a text editor and copy the chunklist file information. For example:
      chunklist_w1776170579.m3u8
    3. In a web browser, append the copied chunklist file information to the base stream name URL. For example:
      http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/chunklist_w1776170579.m3u8
      Save the chunklist file to your computer.

    4. Open the chunklist file in a text editor and copy one of the .ts file URLs. For example:
      media_w1776170579_13821.ts
    5. In a web browser, append the copied .ts file URL to the base stream name URL. For example:
      http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/media_w1776170579_13821.ts
      Save the .ts file to your computer.

    6. Open the saved .ts file in VLC media player. If the file is encrypted correctly, VLS won't be able to play the file and the following error message will be displayed:
      "No suitable decoder module:
      VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this."
    7. You can review the contents of the playlist file to validate what encryption method information is present. For AES-128 bit encryption, the information will be similar to the following:
      #EXTM3U
      #EXT-X-VERSION:3
      #EXT-X-TARGETDURATIO
      #EXT-X-MEDIA-SEQUENCE:1
      #EXT-X-KEY:METHOD=AES-128,URI="http://[wowza-ip-address]/vod/_definst_/mp4:sample.mp4/key_w1776170579.m3u8key"



    Originally Published: 03-23-2011.
    Updated: For Wowza Media Server 3.6.0 on 06-14-2013.