New Jul 11, 2024

Introducing DRM: The latest tool in protecting your content on Mux

Company/Startup Blogs All from Mux Blog - Video technology and more View Introducing DRM: The latest tool in protecting your content on Mux on mux.com

Sometimes creating premium or exclusive content for your audience is a frustrating experience: You pour your heart and soul (and money!) into creating the content that your viewers love, upload it to your exclusive subscription video platform, but wake up the next day to find that a screen recorded copy has been uploaded to YouTube. You end up spending your time sending takedowns for that shared copy and tracking down and banning the user that posted it, rather than creating more content for your viewers, or engaging with your audience.

Mux already provides a set of tools to protect your content, including signed URLs, domain restrictions, and referrer restrictions. But even when used perfectly, those tools won't stop approaches like screen recording, or the more advanced browser plugins designed to allow people to steal your content.

DRM (Digital Rights Management) is a new tool in your toolbelt and provides an extra layer of content security for video content streamed from Mux. It's available today in beta.

Leveraging DRM blocks or limits the impact of:

  • Screen recording
  • Screen sharing
  • Downloading tools

Mux Video uses the industry’s gold standard protocols for delivering DRM-protected video content, including Google Widevine, Microsoft PlayReady, and Apple FairPlay — these are the same set of technologies that are used on platforms like Netflix, Disney+, and Prime Video.

This extra layer of security means that the segments of video that Mux delivers are encrypted using MPEG Common Encryption's CBCS mode, and an additional license request is required to deliver a decryption key to the video player to initiate playback. You can learn more about DRM, and the technologies that power it in my blog from last month "What is DRM", or just watch this amazing video from our DRM expert, Walker.

DRM also requires the use of signed URLs, and when combined with Domain and User-Agent restrictions, it can provide very strong content protection, up to and including security levels that satisfy the requirements of Hollywood studios.

Getting started with DRM

We’ll be rolling out DRM to customers individually, so the first thing you’ll need to do to get started is sign up to join the DRM beta waitlist. Once you're signed up, we'll reach out and have a chat about your use case, make sure DRM is the right solution for you, and then work with you to get you onboarded.

Join the waitlist

Before onboarding, we strongly recommend you create a new environment for testing DRM, before integrating your production environment. If it's your first time implementing DRM, you should also familiarise yourself with the process of acquiring a FairPlay certificate from the team at Apple, and start that process.

Once you're onboarded, we'll send you a DRM configuration ID, you'll need this when you're creating assets and live streams that are DRM-protected. In the future, you'll be able to create multiple DRM configurations with different security requirements, for different use cases.

Once you've got your DRM configuration ID, you can get started with the fun stuff: DRMing your videos, read on to find out how, or just watch the video below:

Creating a DRM-protected asset or live stream

Mux Video supports applying DRM to both live streams and on-demand assets. Be sure to check out the full DRM documentation for details, but here's the quick version.

To create an asset with DRM, you need to use the new advanced_playback_policies field to provide the DRM playback policy, and the DRM configuration ID for this asset as shown below:

// POST /video/v1/assets
{
  "input": "https://storage.googleapis.com/muxdemofiles/mux.mp4",
  "advanced_playback_policies": [
    {
      "policy": "drm",
      "drm_configuration_id": "${DRM_CONFIGURATION_ID}"
    }
  ],
  "encoding_tier": "smart"
}

As with creating an asset with DRM, creating a live stream with DRM is just as simple. Again, just set the DRM playback policy and the DRM configuration ID in the advanced_playback_policies of the live stream.

In the example below, we also set the new_asset_settings to use DRM, so any DVR assets and on-demand assets generated from the live stream also have DRM instantly applied.

// POST /video/v1/live-streams
{
  "advanced_playback_policies": [
    {
      "policy": "drm",
      "drm_configuration_id": "${DRM_CONFIGURATION_ID}"
    }
  ],
  "new_asset_settings": {
    "advanced_playback_policies": [
      {
        "policy": "drm",
        "drm_configuration_id": "${DRM_CONFIGURATION_ID}"
      }
    ]
  }
}

Playing DRM-protected videos

All assets ingested with DRM are required to be played back using signed URLs, so you'll need to create a Playback JWT to play back this asset. You can use any of the normal URL signing tools to generate this token.

For DRM-protected content to playback, a signed license URL is required in addition to the normal playback token.

This second token is structured in the same way as other Mux Video tokens, with the exception that the aud must be set to d (drm-license).

We've added support for signing a license to Mux Node SDK from version 8.8.0. For other languages, any of the other documented languages and libraries should work. You can find an example node script for signing DRM licenses here. We've also updated our online signing tool to help you sign licenses for testing.

Once you've generated your playback and DRM license tokens, you can integrate with the video player of your choice. Mux Video DRM is pre-integrated in Mux Player on Web, iOS, and Android, so all you need to do is pass in the extra token for the DRM license. Here's how that looks on Mux Player for Web:

<!-- How you load the player will vary depending on how you build your application -->
<script src="https://cdn.jsdelivr.net/npm/@mux/mux-player"></script>

<mux-player playback-id="Playback ID here" playback-token="Playback token here" drm-token="DRM license token here" thumbnail-token="Thumbnail token here" storyboard-token="Storyboard token here" ></mux-player>

With your new tokens all wired up correctly, you should be able to play back your freshly DRM-protected content as you'd normally expect!

For React, iOS, and Android, you can check out how to pass the DRM license token in the DRM feature documentation.

Mux's DRM is compatible with a wide range of devices, players, and platforms outside of Mux Player. You can check the documentation for more information about the supported platforms, and how to get custom integration information.

Testing that DRM is working

Checking your video is DRM-protected is pretty simple: just take a screenshot! If DRM is working correctly, you should expect to see the video replaced with either a black rectangle or a single frame from the start of the video, just like this:

A browser window of a video player with just a black rectangle showing DRM in action

Customising DRM security levels

As I talked about in my last blog post, DRM is always a tradeoff between viewability and security. Currently, Mux's DRM feature defaults to a balance of security and playability, including automatically leveraging higher security levels on devices where this is available.

At times customers may want to adjust this balance to increase security levels, for example, to meet contractual Hollywood studio security requirements. Please contact us if you need to discuss or adjust the security levels used.

Pricing

DRM is an add-on feature to Mux Video, with a starting price of $0.006 “per license”, and discounts available for high volumes. What does this mean for you? For the majority of customers, 1 video view is equivalent to 1 license. For customers who are licensing premium content in higher resolutions like 2K or 4K, a view may consume several licenses.

We'd love to chat about DRM pricing, reach out to us if you have questions about pricing or chat with your account team.

What are you waiting for?

Hopefully you're excited to take your content protection story to the next level. Add yourself to the DRM beta waitlist today, and we'll reach out to onboard you as soon as there's a spot available.

Scroll to top