Deployed 3b6bd02e with MkDocs version: 1.6.1

This commit is contained in:
2026-12-02 22:25:59 +00:00
parent e09254fdaf
commit db7b0bba39
14 changed files with 656 additions and 276 deletions
+26 -6
View File
@@ -2982,8 +2982,10 @@ for example <code>artists</code> (a list) and <code>replaygain_track_gain</code>
bitrate it offers for a <code>Song</code></strong>. The framework then selects one with its usual audio
options, <code>-a</code>/<code>--acodec</code> and <code>--abitrate</code>, and its usual audio sorting. A movie or an
episode uses the same options. <code>-q</code>/<code>--quality</code> sets the video height only and does not
apply to music. <code>Audio</code> has no <code>bit_depth</code> or <code>sample_rate</code> field. Therefore <code>bitrate</code>
separates a hi-res FLAC from a CD FLAC, and the audio sort already ranks it.</p>
apply to music. The audio sort ranks a hi-res FLAC above a CD FLAC by <code>bitrate</code>. Set
<code>bit_depth</code> and <code>sample_rate</code> (Hz) on each <code>Audio</code> track, and <code>--list</code> shows them as
"24-bit / 96 kHz", so do not write that text into <code>name</code>. The same two keys in
<code>Song.data</code> give the Hi-Res badge in the release listing.</p>
<p>A <code>Song</code> is an ordinary <code>Title</code> on the one generic download path. unshackle has no
music-specific service API and no separate music download loop. The
<code>GROUP_AUDIO_DOWNLOADS</code> flag, <code>get_music_track_options</code> and <code>get_music_collection_label</code>
@@ -3059,6 +3061,12 @@ do not give a <code>name</code>, unshackle derives a human-readable name from th
track that it downloads. Over <code>--remote</code>, the client asks the server for the URL of
each track it downloads, and the server calls the callable then. A track whose callable
fails gets no URL, and its download fails.</p>
<p>When the service has the media playlist of an HLS track as text and no playlist URL, set
<code>track.data["hls"]["playlist_text"]</code> to the text, and set <code>url</code> to a URL that its segment URIs
resolve against. unshackle downloads from the text and does not fetch a playlist. A <code>from_file</code>
playlist works the same way. Over <code>--remote</code> and in an export, the text goes with the track,
but a <code>file:</code> URL does not. The client accepts the text only as a media playlist whose segment
URIs are absolute <code>http</code> or <code>https</code> URLs, and drops the track otherwise.</p>
<h3 id="video"><code>Video</code><a class="headerlink" href="#video" title="Permanent link">&para;</a></h3>
<p><code>Video</code> adds <code>codec</code>, <code>range</code>, <code>bitrate</code>, <code>width</code>, <code>height</code>, <code>fps</code>, <code>scan_type</code>, and
closed-caption descriptors. The relevant enums:</p>
@@ -3074,9 +3082,16 @@ closed-caption descriptors. The relevant enums:</p>
<p>Both <code>Video</code> and <code>Audio</code> store <code>bitrate</code> in <strong>bits per second</strong> (rounded up). The
string form displays kb/s, and <code>--vbitrate</code> and <code>--abitrate</code> compare in kb/s.</p>
</div>
<p>When the file of a track also holds a track of another kind, set <code>track.data["own_stream_only"] = True</code>
on the track. The mux then takes from that file only the track of the same kind: the video of a video
track, or the audio of an audio track. Use it for a video file with in-band audio that the
service also gives as audio tracks, or for an audio version that comes as a whole video file.
The value also goes to a <code>--remote</code> client. A track without it muxes everything in its file.</p>
<h3 id="audio"><code>Audio</code><a class="headerlink" href="#audio" title="Permanent link">&para;</a></h3>
<p><code>Audio</code> adds <code>bitrate</code>, <code>channels</code>, <code>joc</code> (Joint Object Coding, the Atmos indicator),
and <code>descriptive</code>. <code>Audio.Codec</code> covers <code>AAC</code>, <code>AC3</code> (<code>DD</code>), <code>EC3</code> (<code>DD+</code>), <code>AC4</code>,
<code>descriptive</code>, <code>bit_depth</code> and <code>sample_rate</code> (Hz). DASH sets <code>sample_rate</code> from
<code>audioSamplingRate</code>, ISM from <code>SamplingRate</code>, and HLS sets both from the <code>BIT-DEPTH</code> and
<code>SAMPLE-RATE</code> attributes when the playlist has them. A service sets <code>bit_depth</code> itself. <code>Audio.Codec</code> covers <code>AAC</code>, <code>AC3</code> (<code>DD</code>), <code>EC3</code> (<code>DD+</code>), <code>AC4</code>,
<code>OPUS</code>, <code>OGG</code> (Vorbis), <code>DTS</code>, <code>DTSX</code>, <code>DTSHD</code>, <code>MPEGH</code>, <code>AV3A</code> (Audio Vivid), <code>ALAC</code>, <code>FLAC</code>, and <code>MP3</code>. The <code>atmos</code> property is <code>True</code> when
<code>joc</code> is set (or when <code>extra</code> flags it).</p>
<h3 id="subtitle"><code>Subtitle</code><a class="headerlink" href="#subtitle" title="Permanent link">&para;</a></h3>
@@ -3188,6 +3203,9 @@ least one and no track is left.</p>
<li><strong>HLS</strong> re-fetches the media playlist at download time, recovers <code>SUPPLEMENTAL-CODECS</code>
from raw text (python-m3u8 drops it) to detect Dolby Vision composite streams, and uses
the media-sequence-number IV for AES-128 keys that have no explicit IV.</li>
<li><strong>Segments</strong> of each format: unshackle inflates a segment body that is one whole gzip member
before the merge, up to a size limit. A CDN can send such a body with no <code>Content-Encoding</code>
header. Any other body stays as it is, such as AES-128 ciphertext that starts with the gzip magic.</li>
<li><strong>ISM</strong> has no list of segments and no init segments: the parser synthesizes segment URLs
from the <code>&lt;c&gt;</code> fragment timeline, and rebuilds a <code>moov</code>/<code>ftyp</code> init box from <code>CodecPrivateData</code>
(supported for AVC, HEVC, DV-over-HEVC, AAC, EC-3, and TTML). A track id covers the manifest
@@ -3229,7 +3247,7 @@ service to talk to the platform's license server. unshackle recognizes seven DRM
<tr>
<td><code>MonaLisa</code></td>
<td>Proprietary WASM DRM</td>
<td>keys extracted locally; no license server. <code>command_builder</code> sets the command of the decryption backend, and <code>segment_decrypt=False</code> runs it once on the merged file</td>
<td>keys extracted locally; no license server. Without <code>tool_path</code>, core uses <code>bbtsdecrypt</code> per segment, else its built-in decrypter (<code>core/drm/bbts.py</code>) per segment. <code>command_builder</code> sets the command of the decryption backend, and <code>segment_decrypt=False</code> runs it once on the merged file. Over <code>--remote</code> only the KID goes to the client, and the server sends the content key under the server CDM. An export also holds only the KID as its DRM, never the tool or the command. One process extracts the keys of one ticket at a time, because the wasmtime bindings are not thread-safe</td>
</tr>
<tr>
<td><code>BlowfishStripe</code></td>
@@ -3449,14 +3467,16 @@ prepared, all derived from the Click context (<code>ctx</code>) that <code>dl</c
everywhere. (unshackle also ships an rnet-based TLS-fingerprinting HTTP session that the
newer <code>session()</code> factory uses and that the <code>network</code> config key configures.)</li>
<li><strong><code>self.credential</code></strong>: the active <code>Credential</code> (<code>username:password[:extra]</code>), populated
by <code>authenticate</code>. unshackle uses its <code>sha1</code> as the account hash for cache keys.</li>
by <code>authenticate</code>. unshackle uses its <code>sha1</code> as the account hash for cache keys. A login
with cookies only uses a hash of the path of its cookie file.</li>
<li><strong><code>self.cache</code></strong>: a generic <code>Cacher</code>: JSON key/value storage under the service's cache
dir, with CRC32 integrity checks, versioning, and optional expiry (auto-derived from a
JWT <code>exp</code> claim when present). Good for auth tokens and API responses.</li>
<li><strong><code>self.title_cache</code></strong>: a <code>TitleCacher</code> that wraps <code>get_titles</code> results, keyed by title
ID, region, and account hash. It serves fresh data within <code>title_cache_time</code>, falls back
to stale data within <code>title_cache_max_retention</code> when an API call fails, and <code>--no-cache</code>
bypasses it.</li>
bypasses it. If you put the cookies of a different account into the same cookie file, use
<code>--reset-cache</code> once.</li>
<li><strong><code>self.track_request</code></strong>: the <code>TrackRequest</code> describing what the user asked for
(codecs, ranges, best-available), for use inside <code>get_tracks</code>.</li>
</ul>