A Python library and command-line interface which pipes streams from various services into a video player.
Avoid resource-heavy and unoptimized websites, and still enjoy streamed content.
Streamlink was forked in 2016 from the abandoned Livestreamer project.
This is a modified fork of Streamlink 7.6.0 with DRM ClearKey decryption support.
This fork adds support for DASH streams protected with ClearKey DRM encryption:
- β ClearKey DRM decryption for DASH streams
- β New CLI options for specifying decryption keys
- β FFmpeg integration for transparent decryption
- β Based on latest Streamlink 7.6.0 (January 2025)
Install directly from GitHub without cloning:
pip install git+https://github.com/premiumsmart/streamlink-drm.gitAfter installation, verify the version:
streamlink --version
# Should show: streamlink 7.6.0+drmIf you want to modify the code:
# Clone this repository
git clone https://github.com/premiumsmart/streamlink-drm.git
cd streamlink-drm
# Install in editable mode
pip install -e .Basic usage with single decryption key:
streamlink --decryption-key "YOUR_KEY_HERE" "https://example.com/stream.mpd" bestMultiple keys for video and audio:
streamlink \
--decryption-key "VIDEO_KEY" \
--decryption-key-2 "AUDIO_KEY" \
"https://example.com/stream.mpd" bestPipe to FFmpeg for re-streaming:
streamlink \
--decryption-key "YOUR_KEY" \
"https://example.com/stream.mpd" best -O | \
ffmpeg -re -i pipe:0 -c:v libx264 -preset veryfast \
-c:a aac -f flv "rtmp://your-server/stream"Save decrypted stream to file:
streamlink \
--decryption-key "YOUR_KEY" \
"https://example.com/stream.mpd" best -o output.ts| Option | Description |
|---|---|
--decryption-key KEY |
Primary decryption key (usually for video) |
--decryption-key-2 KEY |
Secondary decryption key (for audio or alternative track) |
-
Modified files:
src/streamlink/session/options.py- Added DRM key optionssrc/streamlink_cli/argparser.py- Added CLI argumentssrc/streamlink/stream/ffmpegmux.py- DRM decryption logicsrc/streamlink/stream/dash/dash.py- Disabled DRM blockingsrc/streamlink/_version.py- Static version7.6.0+drm
-
Version:
7.6.0+drm -
Base version: Streamlink 7.6.0 (January 2025)
π Detailed documentation: See README-DRM.md for complete technical documentation.
Please take a look at the documentation for different ways of installing Streamlink:
Streamlink is built on top of a plugin system which allows support for new services to be added easily.
Most of the popular streaming services are supported, such as Twitch, YouTube, and many more.
A list of all plugins currently included can be found on the plugins page.
After installing, simply run:
streamlink "STREAMURL" bestThe default behavior of Streamlink is to play back streams in the VLC player, but a lot of other options and output methods are available, such as writing the stream to the filesystem, reading stream metadata, etc.
For more in-depth usage, please refer to the CLI documentation.
An API guide and API reference is available for Python implementors of Streamlink.
All contributions are welcome. Feel free to open a new thread on the issue tracker or submit a new pull request. Please read CONTRIBUTING.md first. Thanks!
If you think that Streamlink is useful and if you want to keep the project alive, then please consider supporting its maintainers by sending a small and optionally recurring tip via the available options.
Your support is very much appreciated, thank you!