Deployed 87b58190 with MkDocs version: 1.6.1

This commit is contained in:
2026-12-05 03:00:15 +00:00
parent 56cac92f20
commit 6ed040a6dd
44 changed files with 17665 additions and 13063 deletions
+225 -295
View File
@@ -347,28 +347,6 @@
<li class="md-tabs__item">
<a href="../../reference/api/service/" class="md-tabs__link">
API Reference
</a>
</li>
</ul>
</div>
</nav>
@@ -616,6 +594,8 @@
@@ -1177,6 +1157,174 @@
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_9" >
<div class="md-nav__link md-nav__container">
<a href="../../dev/rest-api/" class="md-nav__link ">
<span class="md-ellipsis">
Server
</span>
</a>
<label class="md-nav__link " for="__nav_3_9" id="__nav_3_9_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_9">
<span class="md-nav__icon md-icon"></span>
Server
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../dev/rest-api/authentication/" class="md-nav__link">
<span class="md-ellipsis">
Authentication
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/dashboard/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../remote-sessions/" class="md-nav__link">
<span class="md-ellipsis">
Remote Sessions
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
@@ -1369,7 +1517,7 @@
<span class="md-ellipsis">
Output & Naming
Output & Naming Options
@@ -1453,7 +1601,7 @@
<span class="md-ellipsis">
Key Vaults
Key Vault Options
@@ -1573,6 +1721,8 @@
@@ -1684,14 +1834,6 @@
@@ -1717,9 +1859,8 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" >
<div class="md-nav__link md-nav__container">
<a href="../../dev/rest-api/" class="md-nav__link ">
<label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-ellipsis">
@@ -1733,14 +1874,8 @@
</a>
<label class="md-nav__link " for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_3">
@@ -1754,8 +1889,6 @@
<ul class="md-nav__list" data-md-scrollfix>
@@ -1769,35 +1902,7 @@
<span class="md-ellipsis">
Quick Start
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/authentication/" class="md-nav__link">
<span class="md-ellipsis">
Authentication
REST API Quick Start
@@ -1874,14 +1979,14 @@
<li class="md-nav__item">
<a href="../../dev/rest-api/dashboard/" class="md-nav__link">
<a href="../../dev/rest-api/errors/" class="md-nav__link">
<span class="md-ellipsis">
Dashboard
Error Responses
@@ -1909,7 +2014,7 @@
<span class="md-ellipsis">
Remote Sessions
Remote Session Protocol
@@ -1923,55 +2028,20 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../dev/rest-api/errors/" class="md-nav__link">
<span class="md-ellipsis">
Error Responses
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
@@ -1998,17 +2068,17 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_4" >
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<label class="md-nav__link" for="__nav_5_4" id="__nav_5_4_label" tabindex="0">
<span class="md-ellipsis">
API Reference
Python API
@@ -2019,12 +2089,12 @@
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_4">
<span class="md-nav__icon md-icon"></span>
API Reference
Python API
</label>
@@ -2176,6 +2246,14 @@
</li>
</ul>
</nav>
</li>
</ul>
</nav>
@@ -2467,7 +2545,7 @@
parses the subtitle tracks from the manifest alongside video and audio. It downloads
them, cleans them up, and optionally converts them to the format you want. It then muxes
them into the final Matroska file, or writes them out as sidecar files next to it. The
sections below cover the supported formats, how unshackle normalizes tracks after
sections below cover the supported formats, how unshackle normalises tracks after
download, how to select and filter subtitles, and every subtitle-related configuration
option.</p>
<p>A handful of <code>dl</code> flags and a small <code>subtitle</code> block in your
@@ -2582,11 +2660,11 @@ format-appropriate clean-up to make a single, valid file:</p>
<li><strong>Segment merging</strong>: when a WebVTT or boxed subtitle arrives as many DASH/HLS
segments, unshackle merges the segments back into one continuous document with
correct timing. A cue that a segment boundary cuts in two comes out as one cue.</li>
<li><strong>WebVTT sanitization</strong>: merged WebVTT runs through a repair pipeline that clamps
<li><strong>WebVTT sanitisation</strong>: merged WebVTT runs through a repair pipeline that clamps
negative timestamps to <code>00:00:00.000</code>, removes stray cue identifiers (like <code>Q0</code>, <code>Q1</code>)
that confuse downstream parsers, and merges multi-line cues that a service split into
separate overlapping cues. By default unshackle keeps the original styling and layout
(see <a href="#subtitle-configuration"><code>preserve_formatting</code></a>).</li>
(see <a href="../../reference/configuration/download/#subtitle"><code>preserve_formatting</code></a>).</li>
<li><strong>Cue markup normalisation</strong>: unshackle removes the WebVTT-only parts of a cue
payload, so no player draws them as dialogue. See
<a href="#cue-markup-and-html-entities">Cue markup</a>.</li>
@@ -2738,59 +2816,23 @@ CCExtractor tool on your <code>PATH</code>.</p>
<p>When a language has an SDH track but <strong>no</strong> plain (non-SDH, non-forced) track, unshackle
can make a clean non-SDH version for you by stripping the hearing-impaired cues:
sound effects, speaker labels, music notes, and similar. This is on by default and
controlled by the <a href="#subtitle-configuration"><code>strip_sdh</code></a> config key.</p>
controlled by the <a href="../../reference/configuration/download/#subtitle"><code>strip_sdh</code></a> config key.</p>
<p>The check uses the same <a href="../downloading/#exact-vs-fuzzy-matching">matching rules</a> as
<code>--s-lang</code>. A plain track covers an SDH track only when it is the same variant: <code>en</code> and
<code>en-US</code> cover each other, but a plain <code>en-GB</code> track does not stop a stripped <code>en</code> or <code>en-US</code>
copy. When unshackle creates a stripped
copy, it keeps the original SDH track as well, so you end up with both.</p>
<p>The <a href="#subtitle-configuration"><code>sdh_method</code></a> config key selects the stripping engine
itself. The default (<code>auto</code>) prefers the <code>subby</code> cleaner for SRT, falls back to
SubtitleEdit when you install it, and otherwise uses the built-in <code>filter-subs</code>
approach.</p>
<p>Every engine removes the same three things: bracketed sound effects (<code>[MUSIC PLAYING]</code>,
<code>(door creaks)</code>), speaker labels (<code>MAN:</code>), and font tags. Every engine keeps plain
dialogue and inline <code>&lt;i&gt;</code> styling. They differ on music and lyric lines:</p>
<table>
<thead>
<tr>
<th><code>sdh_method</code></th>
<th>Engine that runs</th>
<th>Lyric lines (<code>♪ ... ♪</code>)</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>auto</code></td>
<td><code>subby</code> for an SRT track. SubtitleEdit for any other format when you install it, otherwise <code>filter-subs</code>.</td>
<td>Kept, unless the fallback reaches <code>filter-subs</code>.</td>
</tr>
<tr>
<td><code>subby</code></td>
<td><code>subby</code>, but only for a track that is already SRT. Any other format falls through to <code>filter-subs</code>.</td>
<td>Kept for SRT, removed otherwise.</td>
</tr>
<tr>
<td><code>subtitleedit</code></td>
<td>SubtitleEdit when you install it, otherwise <code>filter-subs</code>.</td>
<td>Kept with SubtitleEdit, removed without it.</td>
</tr>
<tr>
<td><code>filter-subs</code></td>
<td><code>filter-subs</code> always.</td>
<td>Removed.</td>
</tr>
</tbody>
</table>
<p>The <a href="../../reference/configuration/download/#sdh-engines"><code>sdh_method</code></a> config key selects the stripping engine
itself. Every engine removes sound effects, speaker labels and font tags. The engines differ
on lyric lines and on the formats that they read.</p>
<p>Pick <code>filter-subs</code> when you want lyrics gone as well. Pick <code>subby</code> or install
SubtitleEdit when you want to read along with the songs.</p>
<div class="admonition note">
<p class="admonition-title">Why <code>convert_before_strip</code> exists</p>
<p><code>subby</code>'s SDH stripper only operates on SRT. Handed any other codec it returns
silently without stripping anything, not an error but a no-op that leaves the SDH
cues in place. This is the whole reason for <a href="#subtitle-configuration"><code>convert_before_strip</code></a>:
non-SubtitleEdit engines need the subtitle converted to SRT first, or the
hearing-impaired cues stay in the file.</p>
<p><code>subby</code> and <code>filter-subs</code> read only SRT. unshackle gives <code>subby</code> only a track that is
already SRT, and sends any other track to <code>filter-subs</code>. This is the reason for
<a href="../../reference/configuration/download/#subtitle"><code>convert_before_strip</code></a>: <code>filter-subs</code>
needs the subtitle converted to SRT first, or the hearing-impaired cues stay in the file.</p>
</div>
<h2 id="converting-subtitle-formats">Converting subtitle formats<a class="headerlink" href="#converting-subtitle-formats" title="Permanent link">&para;</a></h2>
<p>By default unshackle keeps each subtitle in its downloaded format (only auto-converting
@@ -2820,47 +2862,12 @@ unshackle skips the conversion and keeps the styled original. It does <strong>no
A <code>sidecar_format: srt</code> will still lossily flatten styled subtitles, dropping
positioning, colours, and styling, and a per-download <code>--sub-format srt</code> forces the
muxed track to convert as well. To keep raw styled sidecars, set
<a href="#subtitle-configuration"><code>sidecar_format: original</code></a>.</p>
<a href="../../reference/configuration/download/#subtitle"><code>sidecar_format: original</code></a>.</p>
</div>
<h3 id="how-the-conversion-backend-is-chosen">How the conversion backend is chosen<a class="headerlink" href="#how-the-conversion-backend-is-chosen" title="Permanent link">&para;</a></h3>
<p>Under the hood unshackle picks the highest-fidelity converter that supports the
source→target pair. Which converter runs depends on the
<a href="#subtitle-configuration"><code>conversion_method</code></a> config key (default <code>auto</code>) and the
formats involved:</p>
<table>
<thead>
<tr>
<th>Backend</th>
<th>Best at</th>
<th>Requires</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>subtitleedit</code></td>
<td>Highest fidelity; preserves positioning and italics</td>
<td>SubtitleEdit installed</td>
</tr>
<tr>
<td><code>subby</code></td>
<td>Native SRT output with clean-up</td>
<td>-</td>
</tr>
<tr>
<td><code>pysubs2</code></td>
<td>Best fidelity for styled SSA/ASS</td>
<td>- (pure Python, always available)</td>
</tr>
<tr>
<td><code>pycaption</code></td>
<td>Last-resort fallback; flattens styling</td>
<td>-</td>
</tr>
</tbody>
</table>
<p>With <code>conversion_method: auto</code>, unshackle ranks these automatically per conversion.
Setting it to a specific value pins that backend as the first choice, falling back to
others only if the pin cannot convert the pair.</p>
source→target pair. Which converter runs depends on the formats and on the
<a href="../../reference/configuration/download/#conversion-backends"><code>conversion_method</code></a> config key.</p>
<h4 id="what-each-backend-preserves">What each backend preserves<a class="headerlink" href="#what-each-backend-preserves" title="Permanent link">&para;</a></h4>
<p>The table below comes from round-tripping a subtitle that carries italics, bold,
underline, positioning, and colour through every backend. Each cell shows the
@@ -3002,7 +3009,7 @@ preference. Leave <code>conversion_method</code> at <code>auto</code> to let the
<h2 id="muxed-vs-sidecar-output">Muxed vs. sidecar output<a class="headerlink" href="#muxed-vs-sidecar-output" title="Permanent link">&para;</a></h2>
<p>By default unshackle muxes subtitles <strong>into</strong> the final <code>.mkv</code>. You can instead (or
additionally) write them as separate sidecar files next to the video, controlled by the
<a href="#subtitle-configuration"><code>output_mode</code></a> config key:</p>
<a href="../../reference/configuration/download/#subtitle"><code>output_mode</code></a> config key:</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:3"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">mux (default)</label><label for="__tabbed_1_2">sidecar</label><label for="__tabbed_1_3">both</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@@ -3035,7 +3042,7 @@ in the name, so players and media managers can match them automatically:</p>
</span><span id="__span-11-3"><a id="__codelineno-11-3" name="__codelineno-11-3" href="#__codelineno-11-3"></a>Show.S01E01.1080p.WEB.en.sdh.srt
</span></code></pre></div>
<p>The pattern is <code>{base}.{language}[.forced][.sdh].{extension}</code>. The
<a href="#subtitle-configuration"><code>sidecar_format</code></a> config key sets the sidecar file format. Use
<a href="../../reference/configuration/download/#subtitle"><code>sidecar_format</code></a> config key sets the sidecar file format. Use
a format name like <code>srt</code> or <code>vtt</code>, or <code>original</code> to keep each subtitle in its downloaded
format.</p>
<h2 id="custom-font-and-style">Custom font and style<a class="headerlink" href="#custom-font-and-style" title="Permanent link">&para;</a></h2>
@@ -3044,7 +3051,7 @@ of your choice, unshackle converts the subtitles to ASS and gives them one style
<div class="language-shell highlight"><span class="filename">Convert to ASS in a custom font</span><pre><span></span><code><span id="__span-12-1"><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a>unshackle<span class="w"> </span>dl<span class="w"> </span>--sub-font<span class="w"> </span><span class="s2">"Noto Sans"</span><span class="w"> </span>EXAMPLE<span class="w"> </span><span class="m">81234567</span>
</span></code></pre></div>
<p><code>--sub-font</code> sets only the font name. The rest of the look comes from
<a href="#subtitle-configuration"><code>subtitle.ass_style</code></a>, a mapping of style fields. A field takes its
<a href="../../reference/configuration/download/#subtitle"><code>subtitle.ass_style</code></a>, a mapping of style fields. A field takes its
<a href="https://pysubs2.readthedocs.io/en/latest/api-reference.html#ssastyle-style-of-subtitles">pysubs2 name</a>
(<code>primarycolor</code>) or its ASS name (<code>PrimaryColour</code>). Give sizes and margins for a 1080-line
picture. unshackle writes a 1080-line canvas in the shape of the video, and the player scales
@@ -3078,7 +3085,7 @@ an anchor, and an unquoted number is not read as a colour.</p>
<div class="admonition note">
<p class="admonition-title">Player settings</p>
<p>A player draws an ASS subtitle with its own style, so player options for text subtitles,
such as the mpv options <code>sub-font</code> and <code>sub-font-size</code>, no longer apply. The text size
such as the mpv options <code>sub-font</code> and <code>sub-font-size</code>, do not apply. The text size
follows the height of the video, so on a wide video such as 1920x800 the text is smaller
than on a 1920x1080 video.</p>
</div>
@@ -3103,84 +3110,7 @@ relevant font packages.</p>
</span><span id="__span-14-7"><a id="__codelineno-14-7" name="__codelineno-14-7" href="#__codelineno-14-7"></a><span class="w"> </span><span class="nt">output_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mux</span>
</span><span id="__span-14-8"><a id="__codelineno-14-8" name="__codelineno-14-8" href="#__codelineno-14-8"></a><span class="w"> </span><span class="nt">sidecar_format</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">srt</span>
</span></code></pre></div>
<table>
<thead>
<tr>
<th>Key</th>
<th>Default</th>
<th>Values</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>strip_sdh</code></td>
<td><code>true</code></td>
<td><code>true</code> / <code>false</code></td>
<td>Auto-generate a stripped non-SDH copy when a language has only an SDH track.</td>
</tr>
<tr>
<td><code>preserve_formatting</code></td>
<td><code>true</code></td>
<td><code>true</code> / <code>false</code></td>
<td>Keep original WebVTT styling and layout during sanitization. When <code>false</code>, WebVTT is re-encoded more aggressively (merging identical cues, dropping empty ones).</td>
</tr>
<tr>
<td><code>conversion_method</code></td>
<td><code>auto</code></td>
<td><code>auto</code>, <code>subby</code>, <code>pysubs2</code>, <code>subtitleedit</code>, <code>pycaption</code></td>
<td>Which conversion backend to prefer. <code>auto</code> ranks them per conversion.</td>
</tr>
<tr>
<td><code>sdh_method</code></td>
<td><code>auto</code></td>
<td><code>auto</code>, <code>subby</code>, <code>subtitleedit</code>, <code>filter-subs</code></td>
<td>Engine used to strip hearing-impaired cues.</td>
</tr>
<tr>
<td><code>convert_before_strip</code></td>
<td><code>true</code></td>
<td><code>true</code> / <code>false</code></td>
<td>Convert a subtitle to SRT before stripping SDH (for non-SubtitleEdit engines).</td>
</tr>
<tr>
<td><code>output_mode</code></td>
<td><code>mux</code></td>
<td><code>mux</code>, <code>sidecar</code>, <code>both</code></td>
<td>Whether subtitles are embedded, written as sidecars, or both.</td>
</tr>
<tr>
<td><code>sidecar_format</code></td>
<td><code>srt</code></td>
<td>a format name (e.g. <code>srt</code>, <code>vtt</code>) or <code>original</code></td>
<td>Format used for sidecar files.</td>
</tr>
<tr>
<td><code>group_by</code></td>
<td><code>type</code></td>
<td><code>type</code>, <code>language</code></td>
<td>Whether all tracks of one type stay together, or each language stays next to its own variants.</td>
</tr>
<tr>
<td><code>language_priority</code></td>
<td><em>(unset)</em></td>
<td>a list of languages</td>
<td>Languages to sort to the top. The rest keep the default order. Nothing is removed.</td>
</tr>
<tr>
<td><code>dedupe_codecs</code></td>
<td><em>(unset)</em></td>
<td>a list of codecs, e.g. <code>[VTT, STPP, WVTT]</code></td>
<td>Keep one copy of a subtitle that the service sends in several codecs: the earliest listed codec wins.</td>
</tr>
<tr>
<td><code>ass_style</code></td>
<td><em>(unset)</em></td>
<td>a mapping of pysubs2 style fields</td>
<td>The look of subtitles converted to ASS; makes ASS the default output format. See <a href="#custom-font-and-style">custom font and style</a>.</td>
</tr>
</tbody>
</table>
<p>The <a href="../../reference/configuration/download/#subtitle"><code>subtitle</code> reference</a> lists every config key of the block, with its type, default and values.</p>
<h3 id="which-settings-to-change">Which settings to change<a class="headerlink" href="#which-settings-to-change" title="Permanent link">&para;</a></h3>
<p>The defaults give a clean, player-safe file, so most people change nothing. Start here
only when you want something the defaults do not do:</p>
@@ -3231,8 +3161,8 @@ only when you want something the defaults do not do:</p>
markup in the file: <a href="#cue-markup-and-html-entities">cue markup normalisation</a> runs
either way.</li>
<li><strong><code>convert_before_strip</code></strong> applies to SDH stripping, not to your output format. It
converts the working copy to SRT so a non-SubtitleEdit engine can read it. Turning it
off makes <code>subby</code> and <code>filter-subs</code> no-ops on anything that is not already SRT.</li>
converts the working copy to SRT so <code>filter-subs</code> can read it. Turning it
off makes <code>filter-subs</code> a no-op on anything that is not already SRT.</li>
</ul>
<div class="admonition tip">
<p class="admonition-title">SubtitleEdit is optional but recommended</p>