Updated on 2022-10-24 GMT+08:00

HLS Encryption Settings

Hotlink protection prevents unauthorized users from downloading and playing videos, but cannot prevent malicious paid users from downloading videos to their local PCs for secondary distribution. For this purpose, VOD provides HLS encryption. Encrypted videos cannot be distributed to others even if they are downloaded by malicious users.

For details about HLS encryption, see Protecting Videos with HLS Encryption.

Notes

  • HLS encryption must be performed through transcoding, so transcoding fees are generated for HLS encryption.
  • VOD does not perform HLS on inputs, but encrypts HLS outputs except for those in MP4 and DASH formats.
  • Encryption and decryption comply with HLS specifications. Only players that support HLS streams can play the content.
  • If the URL for obtaining the key is changed, you need to re-encrypt the video. Otherwise, the new encryption key does not take effect.
  • If the playback URL used after encryption is HTTPS, the KMS URL must also be HTTPS. Otherwise, the playback cannot be previewed on the VOD console.

Prerequisites

The Key Management Service (KMS) and token generation service have been deployed. For details, see Protecting Videos with HLS Encryption.

Procedure

  1. Log in to the VOD console.
  2. In the navigation pane, choose Global Settings > Security.
  3. Click HLS Encryption Settings. On the displayed page, enter the URL for obtaining the key. See Figure 1.

    Figure 1 Encryption settings dialog box

    Key URL: Enter the KMS address obtained in Prerequisites.

    Example: https://domain-sample/get-key

  4. Click OK.
  5. After the configuration is complete, you need to use the transcoding function to encrypt video files. HLS encryption must be enabled for the transcoding template.