Deployed 90ab0ca4 with MkDocs version: 1.6.1

This commit is contained in:
2026-12-01 21:29:26 +00:00
parent 5f4b508235
commit eaaad30b12
15 changed files with 905 additions and 631 deletions
+2 -2
View File
@@ -2591,7 +2591,7 @@ fetching tracks:</p>
</span></code></pre></div>
<div class="admonition note">
<p class="admonition-title"><code>generate_dv</code> and a hand-made HYBRID</p>
<p>A service that fetches the HYBRID variants itself (HDR10 and DV) must also fetch
<p>A service that fetches the HYBRID variants itself (HDR10 or HDR Vivid, and DV) must also fetch
HDR10P when <code>track_request.generate_dv</code> is set and the title has no DV track.
unshackle prefers an HEVC HDR10+ track as the base, and measures an HDR10 base from the decoded video.
<code>get_tracks_for_variants</code> does this for you.</p>
@@ -2941,7 +2941,7 @@ language token.</p>
</div>
<p>Some services deliver a <strong>separate manifest per codec/range</strong>. The base class
provides <code>get_tracks_for_variants(title, fetch_fn)</code> to fan out over every
codec×range in the <code>TrackRequest</code>, including <code>HYBRID</code> (fetch HDR10 + DV and
codec×range in the <code>TrackRequest</code>, including <code>HYBRID</code> (fetch HDR10, or HDR Vivid when there is no HDR10, + DV and
merge) and <code>--best-available</code> skip-on-error handling:</p>
<div class="language-python highlight"><pre><span></span><code><span id="__span-19-1"><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_tracks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tracks</span><span class="p">:</span>
</span><span id="__span-19-2"><a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a> <span class="k">def</span><span class="w"> </span><span class="nf">fetch_variant</span><span class="p">(</span><span class="n">title</span><span class="p">,</span> <span class="n">codec</span><span class="p">,</span> <span class="n">range_</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tracks</span><span class="p">:</span>
+1 -1
View File
@@ -3768,7 +3768,7 @@ ignore it safely. See <a href="../../creating-a-service/#split-episodes">Split e
</span><span id="__span-8-6"><a id="__codelineno-8-6" name="__codelineno-8-6" href="#__codelineno-8-6"></a><span class="w"> </span><span class="nt">"bitrate"</span><span class="p">:</span><span class="w"> </span><span class="mi">8000</span><span class="p">,</span><span class="w"> </span><span class="nt">"bitrate_bps"</span><span class="p">:</span><span class="w"> </span><span class="mi">8000000</span><span class="p">,</span><span class="w"> </span><span class="nt">"width"</span><span class="p">:</span><span class="w"> </span><span class="mi">3840</span><span class="p">,</span><span class="w"> </span><span class="nt">"height"</span><span class="p">:</span><span class="w"> </span><span class="mi">2160</span><span class="p">,</span>
</span><span id="__span-8-7"><a id="__codelineno-8-7" name="__codelineno-8-7" href="#__codelineno-8-7"></a><span class="w"> </span><span class="nt">"resolution"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2160p"</span><span class="p">,</span><span class="w"> </span><span class="nt">"fps"</span><span class="p">:</span><span class="w"> </span><span class="s2">"24"</span><span class="p">,</span><span class="w"> </span><span class="nt">"range"</span><span class="p">:</span><span class="w"> </span><span class="s2">"HDR10"</span><span class="p">,</span>
</span><span id="__span-8-8"><a id="__codelineno-8-8" name="__codelineno-8-8" href="#__codelineno-8-8"></a><span class="w"> </span><span class="nt">"range_display"</span><span class="p">:</span><span class="w"> </span><span class="s2">"HDR"</span><span class="p">,</span><span class="w"> </span><span class="nt">"scan_type"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"closed_captions"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span>
</span><span id="__span-8-9"><a id="__codelineno-8-9" name="__codelineno-8-9" href="#__codelineno-8-9"></a><span class="w"> </span><span class="nt">"dv_compatible_bitstream"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"hdr10plus"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"hdr10_base"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"stereo"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"language"</span><span class="p">:</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span>
</span><span id="__span-8-9"><a id="__codelineno-8-9" name="__codelineno-8-9" href="#__codelineno-8-9"></a><span class="w"> </span><span class="nt">"dv_compatible_bitstream"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"hdr10plus"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"hdr10_base"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"hlg_base"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"stereo"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"language"</span><span class="p">:</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span>
</span><span id="__span-8-10"><a id="__codelineno-8-10" name="__codelineno-8-10" href="#__codelineno-8-10"></a><span class="w"> </span><span class="nt">"is_original_lang"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
</span><span id="__span-8-11"><a id="__codelineno-8-11" name="__codelineno-8-11" href="#__codelineno-8-11"></a><span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"track_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"English"</span><span class="p">,</span><span class="w"> </span><span class="nt">"needs_repack"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="nt">"edition"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w"> </span><span class="nt">"note"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="nt">"data"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
</span><span id="__span-8-12"><a id="__codelineno-8-12" name="__codelineno-8-12" href="#__codelineno-8-12"></a><span class="w"> </span><span class="nt">"drm"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w"> </span><span class="nt">"descriptor"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DASH"</span>
+5 -5
View File
@@ -3043,8 +3043,8 @@ closed-caption descriptors. The relevant enums:</p>
<ul>
<li><strong><code>Video.Codec</code></strong>: <code>AVC</code> (H.264), <code>HEVC</code> (H.265), <code>VC1</code>, <code>VP8</code>, <code>VP9</code>, <code>AV1</code>, <code>LCEVC</code>.</li>
<li><strong><code>Video.Range</code></strong>: <code>SDR</code>, <code>HLG</code>, <code>HDR10</code>, <code>HDR10P</code> (HDR10+), <code>VIVID</code> (HDR Vivid), <code>DV</code> (Dolby
Vision), and <code>HYBRID</code>. <code>HYBRID</code> is special: it tells the pipeline to select both an HDR10(+) base and
a DV track and merge the DV RPU onto the HDR10 track with <code>dovi_tool</code> (see
Vision), and <code>HYBRID</code>. <code>HYBRID</code> is special: it tells the pipeline to select both an HDR10(+) or PQ HDR Vivid base and
a DV track and merge the DV RPU onto the base track with <code>dovi_tool</code> (see
<a href="#dolby-vision-and-hybrid">Dolby Vision hybrid</a>).</li>
</ul>
<div class="admonition note">
@@ -3206,7 +3206,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</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>
</tr>
<tr>
<td><code>BlowfishStripe</code></td>
@@ -3334,9 +3334,9 @@ HLS and DASH streams that carry a valid DV RPU but advertise plain HEVC, with DV
supplemental codecs (<code>dv_compatible_bitstream</code>). <code>--list</code> shows such a track as <code>HDR10+DV</code> or <code>HDR10P+DV</code>.
A service sets <code>hdr10_base</code> on a DV track that has an HDR10 base layer (DV profile 8.1), and <code>--list</code> shows it as <code>DV+HDR10</code>.
The HLS and DASH parsers set <code>stereo</code> on a stereoscopic 3D (MV-HEVC) track: an HLS <code>REQ-VIDEO-LAYOUT</code> that names <code>CH-STEREO</code>, or a DV profile 20 codec. <code>--list</code> shows it as <code>3D</code>.
<strong>Hybrid</strong> processing (<code>Video.Range.HYBRID</code>) selects an HDR10(+) base and a DV donor,
<strong>Hybrid</strong> processing (<code>Video.Range.HYBRID</code>) selects an HDR10(+) or PQ HDR Vivid base and a DV donor,
extracts the RPU with <code>dovi_tool</code>, and injects it onto the base layer, to make a single
track that carries both HDR10 metadata and the DV RPU. Both are automatic once the
track that carries both the base metadata and the DV RPU. Both are automatic once the
pipeline selects the right tracks. A service only needs to give accurate ranges.</p>
<p>The fixup replaces the track file with a raw HEVC file. A raw HEVC file has no duration and
FFmpeg cannot seek in it. When a hybrid base also gets the fixup, the pipeline keeps the
+1 -1
View File
@@ -3152,7 +3152,7 @@
</table>
<div class="admonition note">
<p class="admonition-title"><code>HYBRID</code> range</p>
<p><code>-r HYBRID</code> fetches both HDR10/HDR10+ and Dolby Vision and merges them with <code>dovi_tool</code>. It requires the <code>dovi_tool</code> binary on your <code>PATH</code>.</p>
<p><code>-r HYBRID</code> fetches both an HDR10/HDR10+/HDR Vivid base and Dolby Vision and merges them with <code>dovi_tool</code>. It requires the <code>dovi_tool</code> binary on your <code>PATH</code>.</p>
</div>
<h3 id="language-subtitles">Language &amp; subtitles<a class="headerlink" href="#language-subtitles" title="Permanent link">&para;</a></h3>
<table>
+13 -11
View File
@@ -3297,7 +3297,7 @@ therefore keeps its <code>3840×1920</code> HDR10 track, even when another range
</table>
<p>A <code>quality</code> in the config counts as a requested resolution. When <code>--best-available</code> finds none of the
requested resolutions, <code>--worst</code> also picks from the lowest resolution. In hybrid mode, that is the
lowest resolution that has an HDR10 or HDR10+ base.</p>
lowest resolution that has an HDR10, HDR10+ or HDR Vivid base.</p>
<div class="language-shell highlight"><span class="filename">Never fail on a missing resolution</span><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>unshackle<span class="w"> </span>dl<span class="w"> </span>-q<span class="w"> </span><span class="m">2160</span><span class="w"> </span>--best-available<span class="w"> </span>EXAMPLE<span class="w"> </span>0ABC123
</span></code></pre></div>
<h2 id="video-codec-and-colour-range">Video codec and colour range<a class="headerlink" href="#video-codec-and-colour-range" title="Permanent link">&para;</a></h2>
@@ -3389,7 +3389,7 @@ alone, so unshackle selects it only when you ask for it with <code>-v LCEVC</cod
</tr>
<tr>
<td><code>HYBRID</code></td>
<td>Fetch both an HDR10/HDR10+ base and a DV track, then merge them</td>
<td>Fetch both an HDR10/HDR10+/HDR Vivid base and a DV track, then merge them</td>
</tr>
</tbody>
</table>
@@ -3435,17 +3435,19 @@ MP4, see <a href="../output-and-naming/#3d-output">3D output</a>.</p>
<div class="admonition warning">
<p class="admonition-title">HYBRID requires dovi_tool</p>
<p><code>-r HYBRID</code> makes a single hybrid track by injecting the Dolby Vision RPU
metadata onto an HDR10/HDR10+ base layer with <strong>dovi_tool</strong>.
metadata onto an HDR10/HDR10+/HDR Vivid base layer with <strong>dovi_tool</strong>.
It requires the <code>dovi_tool</code> binary, resolved from unshackle's <code>binaries/</code> folder,
the <code>binaries</code> folder of your user data directory, or your <code>PATH</code>. A hybrid needs a DV track plus an HDR10 or
HDR10+ base. With no DV track, the title fails, unless you add <code>--generate-dv</code> (see below).
When HDR10+ is present, unshackle prefers it over HDR10 as the base layer. The base must be
HEVC; a title whose HDR10/HDR10+ tracks are all in another codec fails before it downloads.
the <code>binaries</code> folder of your user data directory, or your <code>PATH</code>. A hybrid needs a DV track plus an HDR10,
HDR10+ or HDR Vivid base. With no DV track, the title fails, unless you add <code>--generate-dv</code> (see below).
unshackle prefers HDR10+ as the base layer, then HDR10. It uses an HDR Vivid track only when the title has
no HEVC HDR10 or HDR10+ track, and only a track with a PQ base. The base and the DV track must have the
same frame rate, and the DV track must not be profile 8.4 (HLG). The base must be
HEVC; a title whose HDR10/HDR10+/HDR Vivid tracks are all in another codec fails before it downloads.
If the hybrid step fails for one resolution, unshackle logs an error, skips that resolution
and goes on with the other resolutions of the title. When no hybrid file at all was made,
the title fails.</p>
<p>A track that is <code>DV+HDR10P</code>, <code>HDR10+DV</code> or <code>HDR10P+DV</code> in <code>--list</code> already carries Dolby Vision and an HDR10
or HDR10+ base, so it is already a hybrid. At a resolution that has one, <code>-r HYBRID</code> selects it
<p>A track that is <code>DV+HDR10P</code>, <code>HDR10+DV</code>, <code>HDR10P+DV</code> or <code>VIVID+DV</code> in <code>--list</code> already carries Dolby Vision and
an HDR10, HDR10+ or PQ HDR Vivid base, so it is already a hybrid. At a resolution that has one, <code>-r HYBRID</code> selects it
and muxes it as it is, with no base track and no dovi_tool step. A track that carries HDR10+
comes first, then the highest bitrate (the lowest with <code>--worst</code>). The other resolutions get a
hybrid that unshackle makes.</p>
@@ -3454,7 +3456,7 @@ hybrid that unshackle makes.</p>
</div>
<h4 id="dolby-vision-without-a-dv-track">Dolby Vision without a DV track<a class="headerlink" href="#dolby-vision-without-a-dv-track" title="Permanent link">&para;</a></h4>
<p>When a title has no DV track, <code>-r HYBRID --generate-dv</code> makes a Dolby Vision Profile 8.1 track
for its HDR10 or HDR10+ base. When a title has a DV track, unshackle uses that track and ignores
for its HDR10, HDR10+ or HDR Vivid base. When a title has a DV track, unshackle uses that track and ignores
the flag. When it has none, the flag also makes unshackle ask the service for its HDR10+ tracks.</p>
<table>
<thead>
@@ -3469,7 +3471,7 @@ the flag. When it has none, the flag also makes unshackle ask the service for it
<td>The HDR10+ metadata</td>
</tr>
<tr>
<td>HDR10, or HDR10+ without <code>hdr10plus_tool</code>, or an HDR10+ label with no metadata in the track</td>
<td>HDR10, HDR Vivid, or HDR10+ without <code>hdr10plus_tool</code>, or an HDR10+ label with no metadata in the track</td>
<td>The decoded video</td>
</tr>
</tbody>
+1 -1
View File
@@ -2684,7 +2684,7 @@ license-server handshake. The rest are special cases.</p>
<td><strong>MonaLisa</strong> (proprietary, WASM)</td>
<td><code>.mld</code></td>
<td>Ticket from the service API; keys extracted locally via WASM. No license server.</td>
<td>ML-Worker binary + AES-ECB, per segment</td>
<td>External tool that the service names, per segment or on the whole track</td>
</tr>
<tr>
<td><strong>Blowfish stripe</strong></td>
+1 -1
View File
@@ -2829,7 +2829,7 @@ For an episode with no on-screen name, <code>{episode_name?}</code> and its adja
<tr>
<td><code>hdr</code></td>
<td>Dynamic-range label</td>
<td><code>HDR</code>, <code>HDR10P</code>, <code>DV</code>, <code>DV.HDR</code>, <code>DV.HDR10P</code>, <code>HDRVivid</code>, <code>HLG</code></td>
<td><code>HDR</code>, <code>HDR10P</code>, <code>DV</code>, <code>DV.HDR</code>, <code>DV.HDR10P</code>, <code>DV.HDRVivid</code>, <code>HDRVivid</code>, <code>HLG</code></td>
</tr>
<tr>
<td><code>hfr</code></td>
+1 -1
View File
@@ -2412,7 +2412,7 @@
<li>Removes the flag when the CDM returns the same content key, because then the decode check was wrong, not the content key. A content key from another vault is checked in its turn, and flagged as well if it also fails.</li>
</ol>
<p>The download stops with an error instead of writing noise when no ciphertext is left to retry with, or when every vault and the CDM are used up. Without a local SQLite vault nothing remembers a flag, so the same vault serves the same pair again and the download stops there.</p>
<p>Per-segment decryption gives up the retry. With <code>decrypt_segments</code> on, and always with MonaLisa, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.</p>
<p>Per-segment decryption gives up the retry. With <code>decrypt_segments</code> on, and always with a MonaLisa tool that decrypts segments, the plaintext replaces each segment as it arrives, so no ciphertext is left. A failed decode then flags the pair and stops the download. The next run skips the flagged pair.</p>
<p>unshackle copies a content key from one vault to the others only after this check passes, so a content key that fails the check does not spread. Without FFmpeg, a content key from a vault is not copied at all. To see or clear the flags, open the SQLite file and read or delete rows in <code>bad_keys</code>.</p>
<div class="admonition tip">
<p class="admonition-title">A good two-vault setup</p>
BIN
View File
Binary file not shown.
+175 -2
View File
@@ -2290,6 +2290,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.supports_segment_decrypt" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;supports_segment_decrypt
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.track_decrypted" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;track_decrypted
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3118,6 +3140,28 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.supports_segment_decrypt" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;supports_segment_decrypt
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.drm.MonaLisa.track_decrypted" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;track_decrypted
</span>
</a>
</li>
<li class="md-nav__item">
@@ -4366,7 +4410,14 @@ A cipher built with <code>key</code> holds its content key from the start.
<a href="#unshackle.core.drm.MonaLisa" class="headerlink" title="Permanent link">&para;</a></h2>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">MonaLisa</span><span class="p">(</span><span class="n">ticket</span><span class="p">,</span> <span class="n">device_path</span><span class="p">,</span> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">MonaLisa</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="n">ticket</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -4440,6 +4491,39 @@ directly, and a WASM module extracts the content keys locally.</p>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Optional callback <code>(tool_path, src, dst, kid_hex, key_hex) -&gt; args</code>
that builds the decryption CLI invocation (default: <code>-i src -o dst -k kid:key</code>).</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Whether the external tool supports per-segment decryption.</p>
</div>
</td>
<td>
<code>True</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>**kwargs</code>
@@ -4705,6 +4789,55 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<h3 id="unshackle.core.drm.MonaLisa.supports_segment_decrypt" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">supports_segment_decrypt</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.supports_segment_decrypt" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">supports_segment_decrypt</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Whether the configured external tool supports per-segment decryption.</p>
</div>
</div>
<div class="doc doc-object doc-attribute">
<h3 id="unshackle.core.drm.MonaLisa.track_decrypted" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">track_decrypted</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-property"><code>property</code></small>
</span>
<a href="#unshackle.core.drm.MonaLisa.track_decrypted" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">track_decrypted</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Whether the service already decrypted the whole track into one clear segment file.</p>
<p>The service can keep its merged ciphertext beside that file, and the merge leaves it out.</p>
</div>
</div>
<div class="doc doc-object doc-attribute">
<h3 id="unshackle.core.drm.MonaLisa.key_pair" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">key_pair</span>
@@ -4900,7 +5033,13 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
</span>
<a href="#unshackle.core.drm.MonaLisa.from_ticket" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">from_ticket</span><span class="p">(</span><span class="n">ticket</span><span class="p">,</span> <span class="n">device_path</span><span class="p">,</span> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">from_ticket</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="n">ticket</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">device_path</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">tool_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">command_builder</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">segment_decrypt</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -4967,6 +5106,38 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>command_builder</code>
</td>
<td>
<code><span title="collections.abc.Callable">Callable</span>[[<span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="pathlib.Path">Path</span>, <span title="str">str</span>, <span title="str">str</span>], <span title="collections.abc.Sequence">Sequence</span>[<span title="str">str</span> | <span title="pathlib.Path">Path</span>]] | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Optional callback that builds the decryption CLI invocation.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>segment_decrypt</code>
</td>
<td>
<code><span title="bool">bool</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Whether the external tool supports per-segment decryption.</p>
</div>
</td>
<td>
<code>True</code>
</td>
</tr>
</tbody>
</table>
@@ -5079,6 +5250,8 @@ H5DCID-V3-P1-YYYYMMDD-HHMMSS-MEDIAID-TIMESTAMP-SUFFIX</p>
<div class="doc doc-contents ">
<p>Decrypt a media file (segment or track) using the configured CLI tool via subprocess.</p>
<p>A whole-track tool runs once on a service's own merged file, which the service gives an <code>output_path</code>.
The in-place calls of core after it do nothing.</p>
<p><span class="doc-section-title">Parameters:</span></p>
File diff suppressed because it is too large Load Diff
+77 -9
View File
@@ -2247,6 +2247,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Hybrid.check_base" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;check_base
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3968,6 +3979,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Hybrid.check_base" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;check_base
</span>
</a>
</li>
<li class="md-nav__item">
@@ -6547,8 +6569,8 @@ any existing data.</p>
<div class="doc doc-contents ">
<p>Takes the Dolby Vision and HDR10(+) streams out of the VideoTracks.
It will then attempt to inject the Dolby Vision metadata layer to the HDR10(+) stream.
<p>Takes the Dolby Vision and HDR10(+) or PQ HDR Vivid streams out of the VideoTracks.
It will then attempt to inject the Dolby Vision metadata layer to the base stream.
If no DV track is available, it makes the DV from the HDR10+ metadata, or from the
decoded video when there is no HDR10+ or no hdr10plus_tool.</p>
@@ -6559,6 +6581,32 @@ decoded video when there is no HDR10+ or no hdr10plus_tool.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Hybrid.check_base" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">check_base</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
<a href="#unshackle.core.tracks.Hybrid.check_base" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">check_base</span><span class="p">(</span><span class="n">base</span><span class="p">,</span> <span class="n">dv</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Raise ValueError for a VIVID base that is not PQ, a DV track made for HLG, or two frame rates.</p>
<p>The injected RPU is profile 8.1, which needs a PQ base, and dovi_tool exits 0 when the RPU count does
not fit the base. The rates come from the files, because a manifest can give one rate for every track.</p>
</div>
</div>
<div class="doc doc-object doc-function">
@@ -9447,10 +9495,13 @@ track twice.</p>
<div class="doc doc-contents ">
<p>Split videos into hybrid-ingredient candidates and the standalone-deliverable pool.</p>
<p>HDR10/HDR10+/DV tracks are hybrid ingredients. They only enter the standalone
<p>HDR10/HDR10+/VIVID/DV tracks are hybrid ingredients. They only enter the standalone
pool when the user explicitly requested their range alongside HYBRID, so for
example <code>-r HYBRID</code> muxes only the hybrid while <code>-r HYBRID,HDR10P</code> also delivers
HDR10+. A 3D track is never an ingredient: dovi_tool does not handle a second view.</p>
HDR10+. A 3D track is never an ingredient: dovi_tool does not handle a second view.
A VIVID track to build on must be HEVC, PQ and of the frame rate of a DV track, with no HEVC
HDR10 or HDR10+ track in the title: those always have the PQ base that the hybrid needs. Call it
before a filter by height, or a VIVID track that another height rules out counts as a base.</p>
</div>
@@ -9502,7 +9553,7 @@ A <code>native_hybrid</code> track is the hybrid itself, so it stays unflagged t
<div class="doc doc-contents ">
<p>A filter for the hybrid ingredients of each resolution. It sets <code>native_hybrid</code> on every track.</p>
<p>A track that already carries DV and an HDR10 or HDR10+ base (DV+HDR10P, HDR10+DV, HDR10P+DV) is a finished
<p>A track that already carries DV and a PQ base (DV+HDR10P, HDR10+DV, HDR10P+DV, VIVID+DV) is a finished
hybrid, so its resolution takes that track and no base. One that carries HDR10+ comes first. The other
resolutions get a base only when a DV track can give it an RPU, or with <code>generate_dv</code>. Each pick follows
<code>pick_video</code>, and the DV track is the lowest one, the best of that height.</p>
@@ -9759,9 +9810,10 @@ share a video list must pass distinct paths to avoid clobbering each other.</p>
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">dv_compatible_bitstream</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">hdr10plus</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">hdr10_base</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a> <span class="n">stereo</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16" href="#__codelineno-0-16"></a><span class="p">)</span>
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a> <span class="n">hlg_base</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a> <span class="n">stereo</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16" href="#__codelineno-0-16"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
</span><span id="__span-0-17"><a id="__codelineno-0-17" name="__codelineno-0-17" href="#__codelineno-0-17"></a><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
@@ -9919,6 +9971,22 @@ A zero denominator gives no fps.</p>
<code>False</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>hlg_base</code>
</td>
<td>
<code><span title="bool">bool</span></code>
</td>
<td>
<div class="doc-md-description">
<p>The HDR Vivid track has an HLG base. The HDR10+ probe sets it.</p>
</div>
</td>
<td>
<code>False</code>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code>stereo</code>
@@ -10000,7 +10068,7 @@ skip some checks or assume a value. Give as much information as possible.</p>
<div class="doc doc-contents ">
<p>Whether the track already carries DV and an HDR10 or HDR10+ base, so <code>-r HYBRID</code> needs no build.</p>
<p>Whether the track carries DV and an HDR10, HDR10+ or PQ HDR Vivid base, so <code>-r HYBRID</code> needs no build.</p>
</div>
+2 -1
View File
@@ -2999,7 +2999,8 @@ probes the two highest and the two lowest bitrates first:</p>
</table>
<p>The probe also finds HDR Vivid in HEVC HDR10 and HLG tracks. A track becomes <code>VIVID</code>, so
<code>-r VIVID</code> selects it, when its first frame carries CUVA HDR Vivid metadata, or when its MPEG-TS
program map table (PMT) has the <code>cuvv</code> registration. An HLG track never becomes <code>HDR10P</code>. An audio
program map table (PMT) has the <code>cuvv</code> registration. An HLG track never becomes <code>HDR10P</code>,
and an HDR Vivid track with an HLG base never makes a hybrid. An audio
track with no codec gets its codec from the PMT of an MPEG-TS first segment: the <code>AVSA</code>
registration or <code>stream_type</code> <code>0xD5</code> gives <code>Audio Vivid</code>. The probe has no HDR10+ result for an
MPEG-TS track.</p>
+3 -3
View File
@@ -2323,11 +2323,11 @@ order and the first match wins. If no rule matches, the global <code>tag</code>
<div class="admonition warning">
<p class="admonition-title">Match <code>hdr</code> on the exact value</p>
<p>Matching is exact, and <code>hdr</code> is a composite label for Dolby Vision titles: a DV title with
an HDR10 base layer gives <code>DV.HDR</code>, and with an HDR10+ base layer <code>DV.HDR10P</code>. Plain <code>DV</code>
does <strong>not</strong> match those. Name every variant you want, as the example above does. Note
an HDR10 base layer gives <code>DV.HDR</code>, with an HDR10+ base layer <code>DV.HDR10P</code>, and with an HDR Vivid base
layer <code>DV.HDRVivid</code>. Plain <code>DV</code> does <strong>not</strong> match those. Name every variant you want, as the example above does. Note
also that HDR10 gives <code>HDR</code>, not <code>HDR10</code>, and so does a PQ video track with no HDR10
metadata. The full set of values is <code>HDR</code>, <code>HDR10P</code>, <code>DV</code>, <code>DV.HDR</code>, <code>DV.HDR10P</code>,
<code>HDRVivid</code>, and <code>HLG</code>, as listed in the
<code>DV.HDRVivid</code>, <code>HDRVivid</code>, and <code>HLG</code>, as listed in the
<a href="../../../guide/output-and-naming/#template-variables">variable table</a>.</p>
</div>
<h3 id="operators">Operators<a class="headerlink" href="#operators" title="Permanent link">&para;</a></h3>
File diff suppressed because one or more lines are too long