perf(dl): parallelise mux, licensing, and vault lookups; size the shared pool

Grow the service session pool to downloads * workers before track downloads, run mkvmerge jobs concurrently (muxing.concurrency, default 4), lock DRM preparation per key set instead of globally, and query local vaults first then remote vaults together.
This commit is contained in:
imSp4rky
2026-08-20 11:24:12 -06:00
parent 8b10b793e2
commit 537a1dc973
10 changed files with 199 additions and 41 deletions
+2
View File
@@ -232,10 +232,12 @@ Matroska (MKV) muxing options.
| `default_language` | dict | `{}` | Force which language is flagged *default* per track type, e.g. `{audio: en, subtitle: en}`. |
| `merge_audio` | bool | `true` | Merge all audio into one file. `--split-audio` on the CLI flips this off. |
| `merge_video` | bool | `false` | Merge video tracks that share height, range, and codec into one file, so only language varies inside a file. `--merge-video` on the CLI flips this on. |
| `concurrency` | int | `4` | How many mkvmerge processes run at the same time when a title muxes more than one output file (one per video variant or audio codec). Each process uses one CPU core, so this shortens the mux step on an SSD. Set it to `1` on a hard disk, where parallel writes are slower. |
```yaml
muxing:
set_title: true
concurrency: 4
default_language:
audio: en
subtitle: en