mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-13 12:35:05 +00:00
feat(drm): add blowfish stripe cipher and mp3 audio codec
BlowfishStripe decrypts on the client after download, so a --remote client gets clear audio.
This commit is contained in:
@@ -298,7 +298,7 @@ closed-caption descriptors. The relevant enums:
|
||||
|
||||
`Audio` adds `bitrate`, `channels`, `joc` (Joint Object Coding, the Atmos indicator),
|
||||
and `descriptive`. `Audio.Codec` covers `AAC`, `AC3` (`DD`), `EC3` (`DD+`), `AC4`,
|
||||
`OPUS`, `OGG` (Vorbis), `DTS`, `DTSX`, `DTSHD`, `MPEGH`, `ALAC`, and `FLAC`. The `atmos` property is `True` when
|
||||
`OPUS`, `OGG` (Vorbis), `DTS`, `DTSX`, `DTSHD`, `MPEGH`, `ALAC`, `FLAC`, and `MP3`. The `atmos` property is `True` when
|
||||
`joc` is set (or when `extra` flags it).
|
||||
|
||||
### `Subtitle`
|
||||
@@ -388,7 +388,7 @@ A typical `get_tracks` therefore looks like fetching the manifest text with
|
||||
## DRM hooks
|
||||
|
||||
If a track carries DRM, the framework licenses and decrypts it, but it needs your
|
||||
service to talk to the platform's license server. unshackle recognizes five DRM systems:
|
||||
service to talk to the platform's license server. unshackle recognizes six DRM systems:
|
||||
|
||||
| DRM class | System | License flow |
|
||||
|---|---|---|
|
||||
@@ -397,6 +397,7 @@ service to talk to the platform's license server. unshackle recognizes five DRM
|
||||
| `ClearKeyCENC` | W3C `org.w3.clearkey` over CENC | JSON KID request → JWK set; no CDM |
|
||||
| `ClearKey` | HLS AES-128 | content key fetched directly from a URI; no CDM, no challenge |
|
||||
| `MonaLisa` | Proprietary WASM DRM | keys extracted locally; no license server |
|
||||
| `BlowfishStripe` | Blowfish CBC stripe cipher | the service gives the per-track key; no CDM, no license server |
|
||||
|
||||
!!! warning "`ClearKey` vs `ClearKeyCENC`"
|
||||
Despite the shared prefix these are entirely different systems. `ClearKey` is HLS
|
||||
|
||||
@@ -74,7 +74,7 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
||||
| `-p`, `--profile` | - | Profile for credentials and cookies. |
|
||||
| `-q`, `--quality` | best | Resolution(s), comma-separated, e.g. `1080,720`. `-q 1080` also matches anamorphic tracks by 16:9 canvas. |
|
||||
| `-v`, `--vcodec` | any | Video codec(s). Accepts names or values: `AVC`/`H.264`/`H264`, `HEVC`/`H.265`/`H265`, `VC1`/`VC-1`, `VP8`, `VP9`, `AV1`. |
|
||||
| `-a`, `--acodec` | any | Audio codec(s), comma-separated. Accepts `AAC`, `AC3`/`DD`, `EC3`/`DD+`/`eac3`/`ddp`, `AC4`/`AC-4`, `OPUS`, `OGG`/`VORB`/`vorbis`, `DTS`, `DTSX`/`DTS-X`, `ALAC`, `FLAC`. |
|
||||
| `-a`, `--acodec` | any | Audio codec(s), comma-separated. Accepts `AAC`, `AC3`/`DD`, `EC3`/`DD+`/`eac3`/`ddp`, `AC4`/`AC-4`, `OPUS`, `OGG`/`VORB`/`vorbis`, `DTS`, `DTSX`/`DTS-X`, `ALAC`, `FLAC`, `MP3`. |
|
||||
| `-vb`, `--vbitrate` | highest | Exact video bitrate in kbps. |
|
||||
| `-ab`, `--abitrate` | highest | Exact audio bitrate in kbps. |
|
||||
| `-vb-range`, `--vbitrate-range` | - | Video bitrate range in kbps, e.g. `6000-7000`; picks highest within. Mutually exclusive with `--vbitrate`. |
|
||||
|
||||
@@ -288,6 +288,7 @@ bitrate for the top renditions, overriding the manifest value:
|
||||
| `MPEGH` | `MPEG-H` | MPEG-H 3D Audio |
|
||||
| `ALAC` | `ALAC` | Apple Lossless |
|
||||
| `FLAC` | `FLAC` | FLAC |
|
||||
| `MP3` | `MP3` | MPEG-1 Audio Layer III |
|
||||
|
||||
unshackle accepts names, values, and a few aliases: `eac3` and `ddp` both give `EC3`,
|
||||
and `vorbis` gives `OGG`.
|
||||
|
||||
@@ -41,7 +41,7 @@ then decrypts the file with those keys.
|
||||
|
||||
## Supported DRM systems
|
||||
|
||||
unshackle implements five DRM systems. Only the first two need a device file and a
|
||||
unshackle implements six DRM systems. Only the first two need a device file and a
|
||||
license-server handshake. The rest are special cases.
|
||||
|
||||
| System | Device file | License flow | Decryption |
|
||||
@@ -51,6 +51,7 @@ license-server handshake. The rest are special cases.
|
||||
| **ClearKey (CENC)**, W3C EME `org.w3.clearkey` | none | JSON `{"kids":[...],"type":"temporary"}` → license server returns a JWK Set. No CDM. | shaka-packager / mp4decrypt |
|
||||
| **ClearKey (HLS)**, AES-128 `EXT-X-KEY` | none | Key fetched directly from a URI or `data:` URL. No CDM, no challenge. | in-process AES-CBC |
|
||||
| **MonaLisa** (proprietary, WASM) | `.mld` | Ticket from the service API; keys extracted locally via WASM. No license server. | ML-Worker binary + AES-ECB, per segment |
|
||||
| **Blowfish stripe** | none | The service gives the per-track key. No CDM, no license server. | in-process Blowfish-CBC on every third 2048-byte chunk |
|
||||
|
||||
!!! warning "Two different ClearKeys"
|
||||
"ClearKey (HLS)" and "ClearKey (CENC)" are entirely different systems that happen
|
||||
|
||||
@@ -236,6 +236,7 @@ final path.
|
||||
| FLAC | `.flac` |
|
||||
| Opus | `.opus` |
|
||||
| Vorbis | `.ogg` |
|
||||
| MP3 | `.mp3` |
|
||||
| AAC, ALAC, and all other codecs | `.m4a` |
|
||||
|
||||
unshackle re-encodes FLAC in this step. The audio does not change, but the new file states its
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ at a title and it will:
|
||||
| Manifests | DASH, HLS, and Smooth Streaming (ISM) |
|
||||
| DRM | Widevine and PlayReady, with ClearKey support |
|
||||
| Video | AVC, HEVC, VC-1, VP8, VP9, AV1; SDR, HLG, HDR10, HDR10+, Dolby Vision, and Dolby Vision **hybrid** merging |
|
||||
| Audio | AAC, AC-3, E-AC-3, AC-4, Opus, Vorbis, DTS, DTS-X, ALAC, FLAC; Dolby Atmos handling; per-channel-layout selection |
|
||||
| Audio | AAC, AC-3, E-AC-3, AC-4, Opus, Vorbis, DTS, DTS-X, ALAC, FLAC, MP3; Dolby Atmos handling; per-channel-layout selection |
|
||||
| Subtitles | SRT, WebVTT, ASS/SSA, TTML and more, with optional SDH stripping and format conversion |
|
||||
| Key vaults | SQLite, MySQL, and HTTP/API vaults to store and share content keys |
|
||||
| Proxies | Basic proxies plus Control D, NordVPN, ProtonVPN, Surfshark, Windscribe, ExpressVPN, Gluetun, and Hola providers |
|
||||
|
||||
Reference in New Issue
Block a user