mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-01 21:45:10 +00:00
feat(core): add HDR Vivid hybrids and a MonaLisa command builder
This commit is contained in:
@@ -89,7 +89,7 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
||||
| `-rab`, `--real-audio-bitrate` | off | Same for audio (slower). |
|
||||
|
||||
!!! note "`HYBRID` range"
|
||||
`-r HYBRID` fetches both HDR10/HDR10+ and Dolby Vision and merges them with `dovi_tool`. It requires the `dovi_tool` binary on your `PATH`.
|
||||
`-r HYBRID` fetches both an HDR10/HDR10+/HDR Vivid base and Dolby Vision and merges them with `dovi_tool`. It requires the `dovi_tool` binary on your `PATH`.
|
||||
|
||||
### Language & subtitles
|
||||
|
||||
|
||||
+13
-11
@@ -105,7 +105,7 @@ By default a missing requested resolution is an error. Two flags change that:
|
||||
|
||||
A `quality` in the config counts as a requested resolution. When `--best-available` finds none of the
|
||||
requested resolutions, `--worst` also picks from the lowest resolution. In hybrid mode, that is the
|
||||
lowest resolution that has an HDR10 or HDR10+ base.
|
||||
lowest resolution that has an HDR10, HDR10+ or HDR Vivid base.
|
||||
|
||||
```shell title="Never fail on a missing resolution"
|
||||
unshackle dl -q 2160 --best-available EXAMPLE 0ABC123
|
||||
@@ -152,7 +152,7 @@ unshackle dl -v hevc,avc EXAMPLE 81234567
|
||||
| `HDR10P` | HDR10+ (`-r HDR10+` also works) |
|
||||
| `VIVID` | HDR Vivid (`-r "HDR Vivid"` also works) |
|
||||
| `DV` | Dolby Vision |
|
||||
| `HYBRID` | Fetch both an HDR10/HDR10+ base and a DV track, then merge them |
|
||||
| `HYBRID` | Fetch both an HDR10/HDR10+/HDR Vivid base and a DV track, then merge them |
|
||||
|
||||
```shell title="Grab HDR10 and Dolby Vision in one run"
|
||||
unshackle dl -q 2160 -r HDR10,DV EXAMPLE '...'
|
||||
@@ -179,18 +179,20 @@ MP4, see [3D output](output-and-naming.md#3d-output).
|
||||
|
||||
!!! warning "HYBRID requires dovi_tool"
|
||||
`-r HYBRID` makes a single hybrid track by injecting the Dolby Vision RPU
|
||||
metadata onto an HDR10/HDR10+ base layer with **dovi_tool**.
|
||||
metadata onto an HDR10/HDR10+/HDR Vivid base layer with **dovi_tool**.
|
||||
It requires the `dovi_tool` binary, resolved from unshackle's `binaries/` folder,
|
||||
the `binaries` folder of your user data directory, or your `PATH`. A hybrid needs a DV track plus an HDR10 or
|
||||
HDR10+ base. With no DV track, the title fails, unless you add `--generate-dv` (see below).
|
||||
When HDR10+ is present, unshackle prefers it over HDR10 as the base layer. The base must be
|
||||
HEVC; a title whose HDR10/HDR10+ tracks are all in another codec fails before it downloads.
|
||||
the `binaries` folder of your user data directory, or your `PATH`. A hybrid needs a DV track plus an HDR10,
|
||||
HDR10+ or HDR Vivid base. With no DV track, the title fails, unless you add `--generate-dv` (see below).
|
||||
unshackle prefers HDR10+ as the base layer, then HDR10. It uses an HDR Vivid track only when the title has
|
||||
no HEVC HDR10 or HDR10+ track, and only a track with a PQ base. The base and the DV track must have the
|
||||
same frame rate, and the DV track must not be profile 8.4 (HLG). The base must be
|
||||
HEVC; a title whose HDR10/HDR10+/HDR Vivid tracks are all in another codec fails before it downloads.
|
||||
If the hybrid step fails for one resolution, unshackle logs an error, skips that resolution
|
||||
and goes on with the other resolutions of the title. When no hybrid file at all was made,
|
||||
the title fails.
|
||||
|
||||
A track that is `DV+HDR10P`, `HDR10+DV` or `HDR10P+DV` in `--list` already carries Dolby Vision and an HDR10
|
||||
or HDR10+ base, so it is already a hybrid. At a resolution that has one, `-r HYBRID` selects it
|
||||
A track that is `DV+HDR10P`, `HDR10+DV`, `HDR10P+DV` or `VIVID+DV` in `--list` already carries Dolby Vision and
|
||||
an HDR10, HDR10+ or PQ HDR Vivid base, so it is already a hybrid. At a resolution that has one, `-r HYBRID` selects it
|
||||
and muxes it as it is, with no base track and no dovi_tool step. A track that carries HDR10+
|
||||
comes first, then the highest bitrate (the lowest with `--worst`). The other resolutions get a
|
||||
hybrid that unshackle makes.
|
||||
@@ -201,13 +203,13 @@ MP4, see [3D output](output-and-naming.md#3d-output).
|
||||
#### Dolby Vision without a DV track
|
||||
|
||||
When a title has no DV track, `-r HYBRID --generate-dv` makes a Dolby Vision Profile 8.1 track
|
||||
for its HDR10 or HDR10+ base. When a title has a DV track, unshackle uses that track and ignores
|
||||
for its HDR10, HDR10+ or HDR Vivid base. When a title has a DV track, unshackle uses that track and ignores
|
||||
the flag. When it has none, the flag also makes unshackle ask the service for its HDR10+ tracks.
|
||||
|
||||
| Base | Source of the Dolby Vision brightness values |
|
||||
| --- | --- |
|
||||
| HDR10+, with `hdr10plus_tool` installed | The HDR10+ metadata |
|
||||
| HDR10, or HDR10+ without `hdr10plus_tool`, or an HDR10+ label with no metadata in the track | The decoded video |
|
||||
| HDR10, HDR Vivid, or HDR10+ without `hdr10plus_tool`, or an HDR10+ label with no metadata in the track | The decoded video |
|
||||
|
||||
A track that the service labels HDR10 but that carries HDR10+ metadata counts as HDR10+
|
||||
(see [`hdr10plus_probe`](../reference/configuration/download.md#hdr10plus_probe)).
|
||||
|
||||
@@ -50,7 +50,7 @@ license-server handshake. The rest are special cases.
|
||||
| **PlayReady** (Microsoft) | `.prd` | CDM challenge (WRM header) → license server → CDM parses → keys | shaka-packager / mp4decrypt |
|
||||
| **ClearKey (CENC)**, W3C EME `org.w3.clearkey` or the W3C common PSSH | 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 |
|
||||
| **MonaLisa** (proprietary, WASM) | `.mld` | Ticket from the service API; keys extracted locally via WASM. No license server. | External tool that the service names, per segment or on the whole track |
|
||||
| **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 |
|
||||
| **ClearKey (CTR)**, AES-128-CTR | none | The service gives the per-track key and IV. No CDM, no license server. | in-process AES-CTR over the whole file |
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Every variable below is valid in both output and folder templates. unshackle tak
|
||||
| `quality` | Standard resolution with scan suffix | `1080p`, `2160p`, `576i` |
|
||||
| `resolution` | Standard resolution number only | `1080` |
|
||||
| `video` | Video codec | `H.264`, `H.265` |
|
||||
| `hdr` | Dynamic-range label | `HDR`, `HDR10P`, `DV`, `DV.HDR`, `DV.HDR10P`, `HDRVivid`, `HLG` |
|
||||
| `hdr` | Dynamic-range label | `HDR`, `HDR10P`, `DV`, `DV.HDR`, `DV.HDR10P`, `DV.HDRVivid`, `HDRVivid`, `HLG` |
|
||||
| `hfr` | High frame rate marker (frame rate > 30) | `HFR` |
|
||||
| `3d` | Stereoscopic 3D marker (MV-HEVC video) | `3D` |
|
||||
| `edition` | Edition label from the track, if any | `Directors Cut` |
|
||||
|
||||
@@ -46,7 +46,7 @@ When the decode fails, unshackle:
|
||||
|
||||
The download stops with an error instead of writing noise when no ciphertext is left to retry with, or when every vault and the CDM are used up. Without a local SQLite vault nothing remembers a flag, so the same vault serves the same pair again and the download stops there.
|
||||
|
||||
Per-segment decryption gives up the retry. With `decrypt_segments` on, and always with MonaLisa, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.
|
||||
Per-segment decryption gives up the retry. With `decrypt_segments` on, and always with a MonaLisa tool that decrypts segments, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.
|
||||
|
||||
unshackle copies a content key from one vault to the others only after this check passes, so a content key that fails the check does not spread. Without FFmpeg, a content key from a vault is not copied at all. To see or clear the flags, open the SQLite file and read or delete rows in `bad_keys`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user