mirror of
https://github.com/NohamR/dashdrm-mp4ff.git
synced 2026-07-11 22:42:01 +00:00
Initial commit: dashdrm-mp4ff plugin
Add a Streamlink plugin (plugin/dashdrm_mp4ff.py) to support DRM-protected MPEG-DASH streams with optional mp4ff-decrypt integration. Include README with usage and installation notes, an interactive helper (gen.py) that reads vault.json and prints Streamlink commands, a vault.json example, pyproject.toml (declares inquirerpy dependency), .python-version, and .gitignore. This provides the plugin, packaging metadata, and tooling needed to run and test DASH-DRM streams locally.
This commit is contained in:
75
README.md
Normal file
75
README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# dashdrm-mp4ff
|
||||
|
||||
Custom Streamlink plugin for DRM-protected MPEG-DASH streams.
|
||||
|
||||
This project is based on [titus-au/streamlink-plugin-dashdrm](https://github.com/titus-au/streamlink-plugin-dashdrm), which itself is based on Streamlink's [`dash.py`](https://github.com/streamlink/streamlink/blob/master/src/streamlink/stream/dash/dash.py).
|
||||
|
||||
## Install `mp4ff-decrypt`
|
||||
|
||||
```bash
|
||||
go install github.com/Eyevinn/mp4ff/cmd/mp4ff-decrypt@latest
|
||||
```
|
||||
|
||||
Make sure the Go bin directory is in your `PATH`, then verify:
|
||||
```bash
|
||||
mp4ff-decrypt -h
|
||||
```
|
||||
|
||||
If you do not want to use `mp4ff-decrypt`, you can still use the plugin without `--dashdrm-mp4ff-use-mp4ff`.
|
||||
|
||||
## Usage
|
||||
|
||||
Run Streamlink with the local plugin directory:
|
||||
```bash
|
||||
streamlink --plugin-dirs "plugin" "dashdrm://https://example.com/live.mpd" best
|
||||
```
|
||||
|
||||
With `mp4ff-decrypt` and `kid:key` pairs:
|
||||
|
||||
```bash
|
||||
streamlink \
|
||||
--plugin-dirs "plugin" \
|
||||
--dashdrm-mp4ff-use-mp4ff \
|
||||
--dashdrm-mp4ff-decryption-key "kid1:key1,kid2:key2,kid3:key3" \
|
||||
"dashdrm://https://example.com/live.mpd" \
|
||||
best
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- Keys can be provided as raw keys or as `kid:key`.
|
||||
- When `kid:key` pairs are provided, the plugin parses the manifest and matches each track with the correct key.
|
||||
- The plugin file is [`plugin/dashdrm_mp4ff.py`](./plugin/dashdrm_mp4ff.py).
|
||||
|
||||
## `gen.py`
|
||||
|
||||
[`gen.py`](./gen.py) is a small helper that reads channels from `vault.json`, lets you pick one interactively, and prints the full Streamlink command.
|
||||
|
||||
Install the helper dependency:
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
```
|
||||
|
||||
Create your own `vault.json` from [`vault.json.example`](./vault.json.example), then run:
|
||||
```bash
|
||||
python gen.py
|
||||
```
|
||||
|
||||
The expected structure is:
|
||||
```json
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
"id": "channel-id",
|
||||
"number": "1",
|
||||
"name": "Channel name",
|
||||
"mpd_url": "https://example.com/live.mpd",
|
||||
"keys": [
|
||||
"kid1:key1",
|
||||
"kid2:key2"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user