Skip to content

VideoHLS Plugin

Daniel Neto edited this page Jul 6, 2024 · 24 revisions

The VideoHLS Plugin is designed specifically for VOD (Video-On-Demand) videos, offering a range of benefits to enhance your video streaming experience. With this plugin enabled, your VOD content will be delivered in HLS format, providing various advantages to both content creators and viewers.

HLS Encoding and Adaptive Bitrate

  • The plugin unlocks the HLS (HTTP Live Streaming) option on the encoder, enabling adaptive bitrate streaming for your videos. HLS automatically adjusts the resolution based on the viewer's internet connection, ensuring smooth playback without buffering or lag.

  • Your VOD files will be encrypted, making it more challenging for external downloaders to access and download your videos. This enhances the security of your content and protects your encryption key from unauthorized use.

  • Enabling HLS format means that the conventional download button will no longer be available for viewers to download the video directly. This adds an extra layer of protection to your content.

  • As a content creator, you can whitelist the encoder's IP address in the plugin's parameters to allow the encoder to download the video for thumbnail extraction, even with download protection enabled.

Download Protection

The Download Protection feature in the VideoHLS Plugin is specifically designed to ensure that your video content remains secure and accessible only through the designated player. This feature aims to protect the HLS .key file, which contains the decryption key necessary to access your videos. Without this .key file, the associated .m3u8 playlist and .ts segments are rendered useless, preventing unauthorized playback.

How Download Protection Works

  1. Exclusive Player Access:

    • Download Protection ensures that only the designated player can play the HLS videos. This guarantees that even if someone gains access to the .m3u8 and .ts files, they won't be able to decrypt and play the video without the .key file.
  2. Tokenized Key Access:

    • Our player adds a token to the .key file within the .m3u8 playlist. This token is essential for decrypting the key, ensuring that only your AVideo platform can access it.
    • The token includes:
      • Client IP Information: Ensures the request is coming from the authorized user.
      • Token Time: Provides a timeout for the token, typically set to 30 seconds. This short validity period minimizes the risk of unauthorized access.
  3. Performance Considerations:

    • Each request for the .key file requires some CPU processing by the AVideo platform, as it involves database checks to validate the token. While this adds a small overhead, it is necessary to maintain the security of your content.
    • During HLS video playback, the .key file is requested multiple times, but the impact on CPU usage remains minimal due to the efficient handling of these requests.

By implementing Download Protection, you fortify your video content against unauthorized downloads and access, ensuring that your videos remain exclusive to your platform and are viewed only through the designated player. This adds a robust layer of security, making it significantly more challenging for unauthorized users to capture or distribute your content.

Authorize other players

If you wish for the HLS videos to play in another player, you must disable the Download Protection. To do this, simply uncheck the option 'downloadProtection' in the VideoHLS plugin. However, please be aware that by doing so, your video will become unprotected and more susceptible to unauthorized downloads.

Of course, while our download protection is a powerful deterrent, it's worth noting that no technology can fully prevent every method of video capture, such as screen recordings. However, these methods are more cumbersome and don't detract from the efficacy of our download protection.

Harnessing the VideoHLS Plugin with download protection fortifies your content's security, enabling you to deliver high-quality VOD content with minimal risks.

Benefits of Adaptive Bitrate

The adaptive bitrate feature ensures that each viewer receives the best video quality possible based on their internet speed. This means that your video quality will adjust dynamically, providing a seamless viewing experience regardless of the viewer's internet connection.

Automatic HLS Resolutions

With the automatic HLS encoding activated, your videos will be automatically converted to various resolutions to accommodate different devices and internet speeds. The following resolutions are supported:

  • 2160p (4K)
  • 1440p (2K)
  • 1080p (Full HD)
  • 720p (HD)
  • 480p (SD)
  • 360p
  • 240p

Nevertheless, to maximize disk space and bandwidth efficiency, the plugin thoroughly analyzes the video's original resolution before proceeding with encoding. When you upload a video, say at 720p, the plugin selectively converts it to suitable lower resolutions like 480p, 360p, and 240p. This provides an uninterrupted viewing experience for those on slower internet connections by giving them access to lower-resolution options.

Why not Upscale

Importantly, the plugin does not upscale videos. Upscaling artificially increases the resolution of a video, which can lead to a loss in clarity and detail, resulting in a poor viewing experience. By avoiding this, we ensure only the best quality for your viewers.

Storage Options

While the HLS format does not support AWS_S3, BlackBlaze_B2, or FTP_Storage plugins, you have other storage options available. You can use the YPTStorage plugin or the CDN Storage to store your HLS-encoded videos and expand your storage capabilities.

The VideoHLS Plugin is a valuable addition to your video platform, enhancing video quality, protection, and adaptive streaming capabilities for VOD content. By using HLS encoding, you can deliver an optimized and secure viewing experience for your audience while minimizing buffering and maximizing video performance.

Clone this wiki locally