A streamlink plugin that extends the standard streamlink hls plugin to support DRM streams using SAMPLE-AES and clearkeys.
This is a reimplementation of hlsdrm by Jordan Dalley which in turn was originally based on streamlink-plugin-dashdrm.
An implementation of this plugin for dash MPD DRM streams can be found at https://github.com/titus-au/streamlink-plugin-dashdrm.
To use this plugin, you need to utilise streamlink's plugin sideload capability. Download the plugin source by cloning the repository, or just downloading the plugin file (hlsdrm.py) and either place it in your streamlink plugins sideload directory, or put in a new directory and specify the path when executing streamlink with --plugin-dir <path_of_hlsdrm.py>.
Install using git by typing:
git clone https://github.com/titus-au/streamlink-plugin-hlsdrm.gitTo update the plugin using git, change into the directory where you had cloned the plugin, then type:
git pullTo make use of the plugin, add hlsdrm:// in front of the url.
streamlink --plugin-dir /path/to/hlsdrm/plugin --default-stream best --url hlsdrm://http://abc.def/xyz.m3u8The plugin accepts a number of optional parameters:
| Option | Description |
|---|---|
| --hlsdrm-decryption-key <key in hex or base64> | This is a comma-separated list of decryption keys to be passed to ffmpeg. Keys may be supplied either as key or kid:key. If one or more KIDs are supplied, dashdrm will automatically match keys to representations using their KIDs, allowing keys to be supplied in any order. If KID matching cannot be completed, or no KIDs are supplied, keys are assigned to streams by position:
|