January 17, 2024

Widevine DRM support for HLS

 Nimble Streamer has extensive DRM support for live and VOD streams. It covers all DRM systems - Widevine, Playready and FairPlay - and multiple DRM management platforms.

Traditionally, HLS streams could only be protected using Apple FairPlay and could only be played on Apple devices.

With recent updates, HLS can now be protected using Google Widevine in addition to FairPlay.

This means that you may have just a single multi-key multi-DRM HLS stream and play it on the devices that support either FairPlay or Widevine. This practically means that this single multi-key HLS stream is protected on any modern streaming device like PC, Mac, Android, iPhone/iPad and more.

This also applies to Low Latency HLS DRM protection, no special setup is needed for that.

You don't need to have a separate MPEG-DASH stream specifically for Widevine protection now.

Multi-key HLS can be protected with Widevine DRM

Widevine HLS encryption setup

The DRM setup is specific to your DRM provider and described on Nimble Streamer DRM setup page.

In addition, you need to add this parameter to your app setting section in drm.conf file:

widevine_hls_enabled = true

Like this:

drm {
  application = live_ezdrm
  type = ezdrm
  widevine_hls_enabled = true
  user = user@yourcompany.com
  password = 12yourpassword34&*@#

We have EZDRM here enabled for all streams within "live_ezdrm" application. This can be any other DRM management solution.

Once you save the config file and re-start Nimble, the stream will be protected right away. You may also apply drm.conf changes by using native API call without Nimble re-start.

Widevine multi-key HLS playlist example

We have a sample DRM-protected HLS stream


Here's an example of an HLS playlist that has both encryptions.


This element is for FairPlay:


And this one is for Widevine:

#EXT-X-KEY:METHOD=SAMPLE-AES,KEYID=0x5a0XXXX4-8XX2-11ea-9XX8-040XXXXXXXXX,URI="data:text/plain;base64,AAAAP3Bz XXXXXXXXX nWSs6jyCfc1R0h7QAAAB8XXXXXXXSFIhHql1gEAZmSkAXXXXXXXXJtSOPclZsG",KEYFORMAT="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",KEYFORMATVERSIONS="1",IV=0x5a08XXX485XX11XXXXX401999XXXX

Widevine HLS Players

You may use Shaka Player to play this stream, it fully supports this kind of Widevine-encrypted HLS. Other commercial players have that support, please refer to their documentation.

You may try playing our sample stream above using our players page. Here's an example of Widevine playback:


Notice the License Server URL field that you'll need to use for your stream.

The FairPlay is played the same way, with its respective License Server URL and Certificate URL fields being set properly.

Related documentation

No comments:

Post a Comment

If you face any specific issue or want to ask some question to our team,

This will give much faster and precise response.
Thank you.

Note: Only a member of this blog may post a comment.