Video Protection

Boomstream offers several options of video protection.

The protection is set up for the project and, therefore, applies to all the media files of the project.

DRM video protection

We are using HLS AES-128 encryption, thus downloaders simply can't catch video file for downloading. Even if downloader got your video file, it can't be played without encrypted key, which we deliver by secured method.

If you want to test our protection system try to get video from this page: DRM video protection

Using direct links to video

If you don't use direct links to video files, but only player code, you can disable them. To do this you should activate option "Disable direct links" in the project objectives. This method complicates downloading and restreaming your video.

Attention! After you activate this option all direct links will stop working. Make sure you do not use them on your site.

Protection from restreaming

Protection from restreaming allows you to restrict the playback of media files on resources, that are not under your control, which in turn saves you money.

The system provides three types of protection:

  • Protection by domain name.
  • Protection by IP.
  • Protection by time.

Protection by domain name

You specify the domain names, where the playback of media files is allowed. A name of a domain should be entered without prefix https://. Please specify only your top-level domains. Subdomains works automatically. Examples of valid domain names

yandex.ru
google.com
video.mail.ru

Protection by IP

Attention! The implementation of this type of protection requires changes on your site, you will not be able to simply copy a player code and insert it to the site. After enabling this type of protection, links to media files and player codes will be changed. Previously published videos will stop working.

Attention! The video will no work if you use Opera Turbo or other technologies that dynamically change the IP address.

The basis of this protection is the generator of unique links for different users for media files and for player codes. It means, that the user can watch the video, but if he copies the player code or the direct link for the video on his website, this video will not be available for other users.

Parameter hash is added to URL of each player and link for video. For example:

<iframe width="640" height="356" src="https://boomstream.com/player.html?code=CODE
&hash={{hash}}&width=640&height=356" frameborder="0" scrolling="no"></iframe>
https://bs.boomstream.com/balancer/hash:{{hash}}/CODE-CODE.mp4
https://bs.boomstream.com/balancer/hash:{{hash}}/CODE-CODE.flv
https://bs.boomstream.com/balancer/hash:{{hash}}/CODE-CODE/manifest.f4m
https://bs.boomstream.com/balancer/hash:{{hash}}/CODE-CODE/playlist.m3u8
https://bs.boomstream.com/balancer/hash:{{hash}}/CODE-CODE/Manifest

To make video available for other users you should replace the parameter hash by the value, which is generated by the following rule:

md5(API-key + "|" + user-IP + "|" + media code)

Below is the code to get player code on PHP. You are left to insert your code of media file and API-key.

$mediaCode = 'CODE';
$apiKey = '618db9c3934872221497e0a4f3c6290a';
$hash = md5($apiKey . '|' . getenv('REMOTE_ADDR') . '|' . $mediaCode);
$playerCode = '<iframe width="640" height="356" src="https://play.boomstream.com/player.html?code='
 . $mediaCode . '&hash=' . $hash
 . '" frameborder="0" scrolling="no"></iframe>';
echo $playerCode;

Protection by time

Attention! The implementation of this type of protection requires changes on your site, you will not be able to simply copy a player code and insert it to the site. After enabling this type of protection, links to media files and player codes will be changed. Previously published videos will stop working.

The basis of this protection is the generator of temporary links for media files and for player codes. These links have a limited lifetime and cease to work after a period of time specified in the project settings. It means, that the user can watch the video, but if he copies the player code or the direct link for the video on his website, this video will not be available after a few hours.

Parameters hash and time is added to URL of each player and link for video. For example:

<iframe width="640" height="356" src="https://boomstream.com/player.html?code=CODE
&hash={{hash}}&time={{time}}&width=640&height=356" frameborder="0" scrolling="no"></iframe>
https://bs.boomstream.com/balancer/hash:{{hash}}/time:{{time}}/CODE-CODE.mp4
https://bs.boomstream.com/balancer/hash:{{hash}}/time:{{time}}/CODE-CODE.flv
https://bs.boomstream.com/balancer/hash:{{hash}}/time:{{time}}/CODE-CODE/manifest.f4m
https://bs.boomstream.com/balancer/hash:{{hash}}/time:{{time}}/CODE-CODE/playlist.m3u8
https://bs.boomstream.com/balancer/hash:{{hash}}/time:{{time}}/CODE-CODE/Manifest

To make video available for other users you should replace the parameter time by current time (in UNIX-TIMESTAMP) and hash by the value, which is generated by the following rule:

md5(API-key + "|" + UNIX-TIMESTAMP + "|" + media code)

Below is the code to get player code on PHP. You are left to insert your code of media file and API-key.

$mediaCode = 'CODE';
$apiKey = '618db9c3934872221497e0a4f3c6290a';
$time = time();
$hash = md5($apiKey . '|' . $time . '|' . $mediaCode);
$playerCode = '<iframe width="640" height="356" src="https://play.boomstream.com/player.html?code='
 . $mediaCode . '&hash=' . $hash
 . '&time=' . $time
 . '" frameborder="0" scrolling="no"></iframe>';
echo $playerCode;