fix(tracks): rank video picks by quality across regional tags and in hybrid

One video language request that matches several regional tags now gives one video, the best of them; hybrid bases and the DV source use the same pick, and hybrid --worst no longer needs -q. Thanks to reel.deal for the report and the first patch.
This commit is contained in:
imSp4rky
2026-11-15 15:54:21 -07:00
parent 511db0c768
commit 270662e9b2
11 changed files with 363 additions and 143 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ Make a download job. It requires `service` and `title_id`. Every other field is
| `adaptive_workers` | boolean | `false` | Scale segment workers to measured CDN throughput, up to the `workers` cap. |
| `download_processes` | int | `1` | Split a track's segments across this many processes. Only engages for large batches. |
| `downloads` | int | `1` | Concurrent tracks. |
| `worst` | boolean | `false` | Pick the lowest-bitrate video at each resolution in `quality`, or at the lowest resolution if `quality` is empty. With `worst`, `HYBRID` in `range` requires `quality`. |
| `worst` | boolean | `false` | Pick the lowest-bitrate video at each resolution in `quality`, or at the lowest resolution if `quality` is empty. |
| `best_available` | boolean | `false` | Fall back to best available. With `all_drm`, a DRM system that does not license is a warning. |
| `generate_dv` | boolean | `false` | With `HYBRID` in `range`, make Dolby Vision from the HDR10+ metadata or the decoded video when a title has no DV track. With `HDR10` or `HDR10P` in `range` and no `HYBRID`, make it for that base and ignore a DV track. With none of the three in `range`, the field has no effect. |
| `repack` | boolean | `false` | Add REPACK tag. |
+1 -1
View File
@@ -234,7 +234,7 @@ order the service used, then renumbers the episodes into the order you asked for
| `--slow` | - | Inter-title delay. Bare `--slow` = 60-120s; `--slow 20-40` = custom range (minimum 20s). |
!!! warning "Some flags cannot be combined"
`--select-titles` and `--wanted` are mutually exclusive. With `--worst`, hybrid mode needs `--quality`. `--vbitrate` and `--vbitrate-range` (and the audio equivalents) are mutually exclusive.
`--select-titles` and `--wanted` are mutually exclusive. `--vbitrate` and `--vbitrate-range` (and the audio equivalents) are mutually exclusive.
---
+5 -3
View File
@@ -102,8 +102,8 @@ By default a missing requested resolution is an error. Two flags change that:
| `--worst` | Pick the lowest-bitrate video at each requested resolution. With no requested resolution, pick the lowest-bitrate video at the lowest resolution. |
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. With `--worst`, hybrid mode
requires `-q`, also when `--generate-dv` switches an HDR10 or HDR10+ request to hybrid mode.
requested resolutions, `--worst` also picks from the lowest resolution. In hybrid mode, that is the
lowest resolution that has an HDR10 or HDR10+ base.
```shell title="Never fail on a missing resolution"
unshackle dl -q 2160 --best-available EXAMPLE 0ABC123
@@ -266,7 +266,9 @@ measured for each pixel.
## Bitrate selection
By default unshackle keeps the highest-bitrate rendition for each selected
resolution/codec/range/language combination. You can constrain this.
resolution/codec/range/language combination. One requested video language is one
language here, also when it matches more than one regional tag (`en` can match
`en-AU` and `en-GB`). You can constrain this.
| Flag | Purpose |
| --- | --- |