

However FFmpeg supports AES encryption for HLS packaging, which you can encrypt your content, it is not a full DRM solution.

You can also use a session(or cookie) on your website to restrict access to the key(s)( It is highly recommended). For example, you can use a token(using a Get or Post HTTP method) to check if the user is eligible to access the key or not. IMPORTANT: It is very important to protect your key(s) on your website. This can improve security and allows for more flexibility. If you set this value to 1, each segment file will be encrypted with a new encryption key. For example, if 10 segment files have been generated then it will generate a new key. encryption($save_to, $url, 10)) to use a different key for each set of segments, rotating to a new key after this many segments. You will need both FFmpeg and FFProbe binaries to use it.Īn integer as a "key rotation period" can also be passed to the encryption method (i.e. To use this package, you need to install the FFmpeg.

This version of the package is only compatible with PHP 7.2 or higher. For using encryption and DRM, I recommend trying Shaka PHP, which is a great tool for this use case.Full Documentation is available describing all features and components.There are several options to open a file from a cloud and save files to clouds as well. This library is a wrapper around PHP-FFMpeg and packages media content for online streaming such as DASH and HLS.
