mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
feat(tracks): add Audio bit_depth and sample_rate from manifests and carry them over remote
This commit is contained in:
@@ -351,7 +351,7 @@ When you give both `season` and `episode`, the server combines them into a `"{se
|
||||
"id": "a-1", "codec": "EC3", "codec_display": "DDP",
|
||||
"bitrate": 640, "bitrate_bps": 640000, "channels": "5.1", "language": "en",
|
||||
"is_original": true, "is_original_lang": true, "atmos": false, "joc": 0,
|
||||
"descriptive": false, "name": null, "track_name": "English", "needs_repack": false, "edition": [],
|
||||
"descriptive": false, "bit_depth": null, "sample_rate": 48000, "name": null, "track_name": "English", "needs_repack": false, "edition": [],
|
||||
"note": null, "data": null, "drm": [], "descriptor": "DASH"
|
||||
}
|
||||
],
|
||||
@@ -386,7 +386,7 @@ The server sorts tracks by bitrate, descending. Episodes the server cannot get g
|
||||
|
||||
The `drm` array on a track is a list of `{type, pssh?, kids?, content_keys?, license_url?}` objects.
|
||||
|
||||
Every track carries the same fields as a local track: `is_original_lang`, `name`, `needs_repack`, `edition`, `note`, and `data`. `name` is the name the service set, or null. `note` is display text the service set, such as an encoding profile, or null: `--list` shows it, but the filename and the mux do not use it. `track_name` is the name `--list` shows and the mux writes to an audio or subtitle track: `name` when the service set one, else the name of the language (English, or in the language itself when the server sets `muxing.track_names: native`, or no name when it sets `none`), then the server's `muxing.original_label` on an original-language track, then the SDH, CC, Forced or Descriptive label. `bitrate` is in kb/s, and `bitrate_bps` gives the exact bits/s. `data` holds the part of the service-set `track.data` that fits in JSON, without the `hls`, `dash`, and `ism` parser keys. Audio keeps `is_original` and `atmos` for clients that read them, and adds the exact `joc` object count.
|
||||
Every track carries the same fields as a local track: `is_original_lang`, `name`, `needs_repack`, `edition`, `note`, and `data`. `name` is the name the service set, or null. `note` is display text the service set, such as an encoding profile, or null: `--list` shows it, but the filename and the mux do not use it. `track_name` is the name `--list` shows and the mux writes to an audio or subtitle track: `name` when the service set one, else the name of the language (English, or in the language itself when the server sets `muxing.track_names: native`, or no name when it sets `none`), then the server's `muxing.original_label` on an original-language track, then the SDH, CC, Forced or Descriptive label. `bitrate` is in kb/s, and `bitrate_bps` gives the exact bits/s. `data` holds the part of the service-set `track.data` that fits in JSON, without the `hls`, `dash`, and `ism` parser keys. Audio keeps `is_original` and `atmos` for clients that read them, and adds the exact `joc` object count. Audio `bit_depth` and `sample_rate` (Hz) are integers, or null when the manifest and the service do not give them.
|
||||
|
||||
| Status | Error code | Meaning |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -228,8 +228,10 @@ Each subclass adds its own required fields on top of `id_` and `service`:
|
||||
bitrate it offers for a `Song`**. The framework then selects one with its usual audio
|
||||
options, `-a`/`--acodec` and `--abitrate`, and its usual audio sorting. A movie or an
|
||||
episode uses the same options. `-q`/`--quality` sets the video height only and does not
|
||||
apply to music. `Audio` has no `bit_depth` or `sample_rate` field. Therefore `bitrate`
|
||||
separates a hi-res FLAC from a CD FLAC, and the audio sort already ranks it.
|
||||
apply to music. The audio sort ranks a hi-res FLAC above a CD FLAC by `bitrate`. Set
|
||||
`bit_depth` and `sample_rate` (Hz) on each `Audio` track, and `--list` shows them as
|
||||
"24-bit / 96 kHz", so do not write that text into `name`. The same two keys in
|
||||
`Song.data` give the Hi-Res badge in the release listing.
|
||||
|
||||
A `Song` is an ordinary `Title` on the one generic download path. unshackle has no
|
||||
music-specific service API and no separate music download loop. The
|
||||
@@ -326,7 +328,9 @@ The value also goes to a `--remote` client. A track without it muxes everything
|
||||
### `Audio`
|
||||
|
||||
`Audio` adds `bitrate`, `channels`, `joc` (Joint Object Coding, the Atmos indicator),
|
||||
and `descriptive`. `Audio.Codec` covers `AAC`, `AC3` (`DD`), `EC3` (`DD+`), `AC4`,
|
||||
`descriptive`, `bit_depth` and `sample_rate` (Hz). DASH sets `sample_rate` from
|
||||
`audioSamplingRate`, ISM from `SamplingRate`, and HLS sets both from the `BIT-DEPTH` and
|
||||
`SAMPLE-RATE` attributes when the playlist has them. A service sets `bit_depth` itself. `Audio.Codec` covers `AAC`, `AC3` (`DD`), `EC3` (`DD+`), `AC4`,
|
||||
`OPUS`, `OGG` (Vorbis), `DTS`, `DTSX`, `DTSHD`, `MPEGH`, `AV3A` (Audio Vivid), `ALAC`, `FLAC`, and `MP3`. The `atmos` property is `True` when
|
||||
`joc` is set (or when `extra` flags it).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user