Deployed 82991dd8 with MkDocs version: 1.6.1

This commit is contained in:
2026-11-29 12:29:39 +00:00
parent ae027db763
commit ad375885e1
3 changed files with 22 additions and 17 deletions
+19 -10
View File
@@ -2481,7 +2481,10 @@ stopped instead of restarting from byte zero.</p>
<p>unshackle keeps the segments of a failed track in a <code>resume</code> directory inside the temp
directory, and the next download of the same track takes them back from there. It removes a
kept entry after 7 days, and <code>unshackle env clear temp</code> removes them all. A process that is
killed, or a job cancelled over the REST API, keeps nothing.</p>
killed, and a job that the REST API cancels, keep their completed segments too. The next run
moves them into the <code>resume</code> directory, and the next download of the track takes them from
there. A merge during the download records its progress only when the download fails, so after
a kill the next download keeps only the segments that the merge had not appended yet.</p>
<p>unshackle reuses only whole, fully downloaded segments. It always discards partially written
segments, and no partial-byte (<code>Range</code>) resume across runs takes place. Reuse is possible only
with proof that the segmentation did not change. The manifest URL, segment count, and byte
@@ -2499,8 +2502,18 @@ ranges must all match the previous download, or the download silently restarts c
during its merge step. A failure before that point, such as a failed init segment
fetch, keeps the downloaded segments.</li>
<li>A track downloaded with <a href="#merge_segments"><code>merge_segments</code></a> or
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> never resumes. Both options consume
or rewrite the segment files during the download.</li>
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> resumes too. A merge during the download
keeps its output file up to the last segment it appended, and the next download cuts the
file back to that point and appends from there. A segment that
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> decrypted stays decrypted. The next
download reuses it only with the same content key, and downloads it again when the
content key changed.</li>
<li>A multi-period DASH track whose periods restart their timeline does not resume with
<code>merge_segments</code>: the merge moves the decode times of each period, and the next
download cannot continue that from the middle.</li>
<li>A service that puts a session token in the path of its segment URLs, or in the URL
of an HLS variant playlist, gives the track new URLs on each run. Its downloads always
restart.</li>
</ul>
</div>
<p>For a one-off resume without changing config, pass <code>dl --continue-downloads</code> on the
@@ -2519,7 +2532,7 @@ is the same either way.</p>
the next segment it needs and appends every segment that is ready in order, then deletes the
segment file. With <a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> also on, each segment is
appended after its decryption completes, never before.</p>
<p>This option is off by default because it disables resume. In a measurement of a 3 GiB track in
<p>This option is off by default. In a measurement of a 3 GiB track in
1500 segments with 16 workers, on an SSD and a loopback server, the merge during the download took
0.9 s more than the merge after it on Linux and 1.1 s less on Windows. With each connection limited
to 8 MiB/s, it took 2.2 s less on Linux and 8.0 s less on Windows. On a hard disk, the append to one
@@ -2529,12 +2542,8 @@ with the option on, turn it off.</p>
only when every segment shares one init segment and one <code>EXT-X-KEY</code>, with no
<code>EXT-X-DISCONTINUITY</code>, and the DRM is Widevine, PlayReady, or none. AES-128 tracks, tracks
with content key rotation or discontinuities, and subtitle tracks keep the merge after the download.</p>
<div class="admonition note">
<p class="admonition-title">No resume</p>
<p>A track that merges segment by segment always downloads from the start.
<a href="#continue_downloads"><code>continue_downloads</code></a> cannot reuse its segments, because unshackle
deletes each segment after it appends it.</p>
</div>
<p>With <a href="#continue_downloads"><code>continue_downloads</code></a> on, a failed track keeps its output file and
the number of segments in it, and the next download continues from there.</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="nt">merge_segments</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span></code></pre></div>
<h2 id="subtitle"><code>subtitle</code><a class="headerlink" href="#subtitle" title="Permanent link">&para;</a></h2>