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
+262 -244
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 @@
@@ -1249,6 +1229,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>
@@ -1441,7 +1589,7 @@
<span class="md-ellipsis">
Output & Naming
Output & Naming Options
@@ -1525,7 +1673,7 @@
<span class="md-ellipsis">
Key Vaults
Key Vault Options
@@ -1645,6 +1793,8 @@
@@ -1756,14 +1906,6 @@
@@ -1789,9 +1931,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">
@@ -1805,14 +1946,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">
@@ -1826,8 +1961,6 @@
<ul class="md-nav__list" data-md-scrollfix>
@@ -1841,35 +1974,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
@@ -1946,14 +2051,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
@@ -1981,7 +2086,7 @@
<span class="md-ellipsis">
Remote Sessions
Remote Session Protocol
@@ -1995,55 +2100,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>
@@ -2070,17 +2140,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
@@ -2091,12 +2161,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>
@@ -2248,6 +2318,14 @@
</li>
</ul>
</nav>
</li>
</ul>
</nav>
@@ -2610,9 +2688,9 @@
<p>A Digital Rights Management (DRM) system protects most commercial streaming titles.
To download a title and play it back, unshackle needs to get the <strong>content keys</strong>
for the encrypted tracks and then decrypt them. This page explains the DRM systems
unshackle supports, how to install a device so it can talk to a license server, the
unshackle supports, how to install a device so it can talk to a licence server, the
difference between local and remote CDMs, and how to choose a decryption backend.</p>
<div class="admonition note">
<div class="admonition info">
<p class="admonition-title">Who this page is for</p>
<p>This is a practical configuration guide for end users of the unshackle CLI.
A few sections have a <strong>Developer</strong> mark. They give internal behaviour that is
@@ -2624,10 +2702,10 @@ title.</p>
line between two things:</p>
<ul>
<li>A <strong>CDM</strong> (Content Decryption Module) is the trusted "black box" that turns a
<em>license challenge</em> into <em>content keys</em>. A <strong>device</strong> backs it: a file that carries
<em>licence challenge</em> into <em>content keys</em>. A <strong>device</strong> backs it: a file that carries
the cryptographic identity of a real client, such as a phone or a browser.</li>
<li>A <strong>DRM system</strong> is the wrapper around a CDM that parses the protection metadata,
drives the challenge → license → keys handshake, and finally invokes an external
drives the challenge → licence → keys handshake, and finally invokes an external
tool to physically decrypt the downloaded file.</li>
</ul>
<p>A handful of other terms show up throughout:</p>
@@ -2653,28 +2731,28 @@ line between two things:</p>
</tr>
<tr>
<td><strong>Challenge</strong></td>
<td>The license request the CDM produces, sent to the service's license server.</td>
<td>The request the CDM produces, sent to the service's licence server.</td>
</tr>
<tr>
<td><strong>License</strong></td>
<td><strong>Licence</strong></td>
<td>The server's response, which the CDM parses to recover the content keys.</td>
</tr>
</tbody>
</table>
<p>For a Widevine or PlayReady title, the flow is: unshackle reads the PSSH and KIDs
from the track, asks the CDM for a license challenge, sends that challenge to the
service's license server, hands the response back to the CDM to extract the keys, and
from the track, asks the CDM for a licence challenge, sends that challenge to the
service's licence server, hands the response back to the CDM to extract the keys, and
then decrypts the file with those keys.</p>
<h2 id="supported-drm-systems">Supported DRM systems<a class="headerlink" href="#supported-drm-systems" title="Permanent link">&para;</a></h2>
<p>unshackle has five DRM systems built in. Only the first two need a device file and a
license-server handshake. The rest are special cases. A DRM plugin adds another system (see
licence-server handshake. The rest are special cases. A DRM plugin adds another system (see
<a href="#drm-plugins">DRM plugins</a>).</p>
<table>
<thead>
<tr>
<th>System</th>
<th>Device file</th>
<th>License flow</th>
<th>Licence flow</th>
<th>Decryption</th>
</tr>
</thead>
@@ -2682,19 +2760,19 @@ license-server handshake. The rest are special cases. A DRM plugin adds another
<tr>
<td><strong>Widevine</strong> (Google)</td>
<td><code>.wvd</code></td>
<td>CDM challenge → license server → CDM parses → keys</td>
<td>CDM challenge → licence server → CDM parses → keys</td>
<td>shaka-packager / mp4decrypt</td>
</tr>
<tr>
<td><strong>PlayReady</strong> (Microsoft)</td>
<td><code>.prd</code></td>
<td>CDM challenge (WRM header) → license server → CDM parses → keys</td>
<td>CDM challenge (WRM header) → licence server → CDM parses → keys</td>
<td>shaka-packager / mp4decrypt</td>
</tr>
<tr>
<td><strong>ClearKey (CENC)</strong>, W3C EME <code>org.w3.clearkey</code> or the W3C common PSSH</td>
<td>none</td>
<td>JSON <code>{"kids":[...],"type":"temporary"}</code> → license server returns a JWK Set. No CDM.</td>
<td>JSON <code>{"kids":[...],"type":"temporary"}</code> → licence server returns a JWK Set. No CDM.</td>
<td>shaka-packager / mp4decrypt</td>
</tr>
<tr>
@@ -2706,7 +2784,7 @@ license-server handshake. The rest are special cases. A DRM plugin adds another
<tr>
<td><strong>ClearKey (CTR)</strong>, AES-128-CTR</td>
<td>none</td>
<td>The service gives the per-track key and IV. No CDM, no license server.</td>
<td>The service gives the per-track key and IV. No CDM, no licence server.</td>
<td>in-process AES-CTR over the whole file</td>
</tr>
</tbody>
@@ -2768,29 +2846,13 @@ you. You must supply your own. The <code>wvd</code> and <code>prd</code> command
provision device files once you have the raw cryptographic material.</p>
</div>
<h2 id="providing-a-device-with-the-wvd-and-prd-commands">Providing a device with the <code>wvd</code> and <code>prd</code> commands<a class="headerlink" href="#providing-a-device-with-the-wvd-and-prd-commands" title="Permanent link">&para;</a></h2>
<p>Device files live in dedicated directories, by default:</p>
<table>
<thead>
<tr>
<th>Kind</th>
<th>Default directory</th>
</tr>
</thead>
<tbody>
<tr>
<td>Widevine <code>.wvd</code></td>
<td><code>data/WVDs</code></td>
</tr>
<tr>
<td>PlayReady <code>.prd</code></td>
<td><code>data/PRDs</code></td>
</tr>
</tbody>
</table>
<p>You can move these with the <code>directories</code> section of your <code>unshackle.yaml</code>:</p>
<p>Device files live in two directories: <code>.wvd</code> files in <code>directories.wvds</code> and <code>.prd</code> files
in <code>directories.prds</code>. Their defaults are in the
<a href="../../reference/configuration/directories/">Directories reference</a>. To move them, set
them under <code>directories</code> in your <code>unshackle.yaml</code>:</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><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="nt">directories</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="w"> </span><span class="nt">wvds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/home/george/unshackle-data/WVDs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="nt">prds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/home/george/unshackle-data/PRDs</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="w"> </span><span class="nt">wvds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/unshackle-data/WVDs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="nt">prds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/unshackle-data/PRDs</span>
</span></code></pre></div>
<h3 id="widevine-devices-the-wvd-command">Widevine devices: the <code>wvd</code> command<a class="headerlink" href="#widevine-devices-the-wvd-command" title="Permanent link">&para;</a></h3>
<p>The <code>wvd</code> command group manages <code>.wvd</code> files.</p>
@@ -2859,7 +2921,7 @@ present, that is, a version 3 or higher device).</p>
<div class="tabbed-block">
<div class="language-console highlight"><pre><span></span><code><span id="__span-9-1"><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a><span class="gp">$ </span>unshackle<span class="w"> </span>prd<span class="w"> </span><span class="nb">test</span><span class="w"> </span>./data/PRDs/mydevice.prd<span class="w"> </span>-sl<span class="w"> </span><span class="m">2000</span><span class="w"> </span>-c<span class="w"> </span>aesctr
</span></code></pre></div>
<p>Runs a full challenge/license/keys cycle against Microsoft's public PlayReady
<p>Runs a full challenge/licence/keys cycle against Microsoft's public PlayReady
test server and prints the returned keys, confirming the device works.
<code>-sl/--security-level</code> accepts <code>150</code>, <code>2000</code>, or <code>3000</code> (default <code>2000</code>).
<code>-c/--ckt</code> accepts <code>aesctr</code> or <code>aescbc</code>.</p>
@@ -2887,10 +2949,10 @@ fallback:</p>
<p>Lookups are case-insensitive.</p>
<div class="admonition tip">
<p class="admonition-title">The device name is the file name</p>
<p>A device named <code>chromecdm_l3</code> in the config resolves to <code>chromecdm_l3.wvd</code> in the
WVDs directory (or <code>chromecdm_l3.prd</code> in the PRDs directory). It may also be the
<code>name</code> of a remote CDM defined in <code>remote_cdm</code>. See
<a href="#remote-cdms">Remote CDMs</a> below.</p>
<p>A device named <code>chromecdm_l3</code> in the config resolves to a remote CDM of that <code>name</code> in
<code>remote_cdm</code> (see <a href="#remote-cdms">Remote CDMs</a> below), else to a device file such as
<code>chromecdm_l3.wvd</code> in the device directories. The
<a href="../../reference/configuration/drm/#cdm"><code>cdm</code> reference</a> gives the lookup order.</p>
</div>
<h3 id="advanced-selection-by-quality-drm-or-profile">Advanced selection: by quality, DRM, or profile<a class="headerlink" href="#advanced-selection-by-quality-drm-or-profile" title="Permanent link">&para;</a></h3>
<p>Instead of a plain name, a <code>cdm</code> entry can be a nested mapping, letting unshackle pick
@@ -2933,7 +2995,7 @@ fallback.</p>
<p>A CDM can operate in two places:</p>
<ul>
<li>A <strong>local CDM</strong> loads a <code>.wvd</code> or <code>.prd</code> device from your machine and performs the
challenge/license/keys handshake locally. This is what the <code>cdm</code> mapping above
challenge/licence/keys handshake locally. This is what the <code>cdm</code> mapping above
resolves to by default.</li>
<li>A <strong>remote CDM</strong> delegates the CDM operations to an HTTP API. Your device (and its
secrets) live on the remote CDM host. unshackle sends it PSSH/challenge data and
@@ -2962,9 +3024,8 @@ standard pywidevine "serve" endpoint:</p>
</span><span id="__span-15-10"><a id="__codelineno-15-10" name="__codelineno-15-10" href="#__codelineno-15-10"></a><span class="nt">cdm</span><span class="p">:</span>
</span><span id="__span-15-11"><a id="__codelineno-15-11" name="__codelineno-15-11" href="#__codelineno-15-11"></a><span class="w"> </span><span class="nt">default</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_wv_remote</span>
</span></code></pre></div>
<p><code>security_level</code> defaults to <code>3000</code> if omitted. unshackle reads field names
case-insensitively, so <code>Device Type</code>/<code>device_type</code>, <code>System ID</code>/<code>system_id</code>, and the
other field names are all accepted.</p>
<p>The <a href="../../reference/configuration/drm/#remote_cdm"><code>remote_cdm</code> reference</a> gives the default
of each field and the two spellings of each field name.</p>
<h3 id="playready-remote-cdm">PlayReady remote CDM<a class="headerlink" href="#playready-remote-cdm" title="Permanent link">&para;</a></h3>
<p>If the device type is <code>PLAYREADY</code>, unshackle routes the entry to the pyplayready
remote CDM:</p>
@@ -3000,10 +3061,9 @@ includes an intelligent key-caching layer:</p>
</span></code></pre></div>
<p>unshackle sends the API key as the <code>decrypt-labs-api-key</code> header. If you do not write
<code>secret</code> on the entry, unshackle falls back to the global <code>decrypt_labs_api_key</code> value.
If neither is present it raises an error. The <code>host</code> defaults to
<code>https://keyxtractor.decryptlabs.com</code>. PlayReady devices (<code>SL2</code>/<code>SL3</code>) default to
security level <code>2000</code>/<code>3000</code> respectively. Widevine devices default to
<code>system_id: 26830</code>, <code>security_level: 3</code>.</p>
If neither is present it raises an error. The
<a href="../../reference/configuration/drm/#remote-cdm-decrypt-labs"><code>decrypt_labs</code> fields</a> give the host,
system ID and security level that unshackle uses when you leave them out.</p>
<h3 id="custom-api-custom_api">Custom API (<code>custom_api</code>)<a class="headerlink" href="#custom-api-custom_api" title="Permanent link">&para;</a></h3>
<p>For an arbitrary CDM HTTP API, <code>type: custom_api</code> provides a fully configurable client
that adapts to almost any request/response shape through YAML alone. A minimal example:</p>
@@ -3077,9 +3137,10 @@ globally, or a per-service mapping:</p>
</div>
<div class="admonition info">
<p class="admonition-title">How the value is interpreted</p>
<p>The default is <code>shaka</code>. Only the exact value <code>mp4decrypt</code> selects mp4decrypt.
<strong>Anything else</strong> (including <code>shaka</code>) selects shaka-packager. Per-service lookups
are case-insensitive, with the <code>default</code>/<code>DEFAULT</code> entry used as the fallback.</p>
<p>The default is <code>shaka</code>. <code>mp4decrypt</code> selects mp4decrypt, and <strong>anything else</strong>
(including <code>shaka</code>) selects shaka-packager. The
<a href="../../reference/configuration/drm/#decryption"><code>decryption</code> reference</a> gives how unshackle
reads the value, and the tracks that use mp4decrypt whatever this setting says.</p>
</div>
<p>The two backends give equivalent output for a standard CENC title. In most
conditions shaka-packager is the better backend. Switch a specific service to
@@ -3094,30 +3155,30 @@ ignores the <code>decryption</code> setting entirely. You do not need to configu
<p>When an HLS playlist references a content key with an <code>EXT-X-KEY</code> tag, unshackle
fetches the content key directly (from the given URI or an inline <code>data:</code> URL) and
decrypts each segment in-process with AES-CBC. There is no device, no CDM, and no
license challenge, so you do not set anything up. unshackle decrypts such tracks
licence challenge, so you do not set anything up. unshackle decrypts such tracks
automatically during download.</p>
<p>The <code>EXT-X-KEY</code> URI must return a content key of exactly 16 bytes, or the download stops with an error.
If a decrypted segment has no valid PKCS7 padding, unshackle keeps the output and
logs one warning for the track, because the content key is possibly wrong.</p>
<h3 id="clearkey-over-cenc-w3c-eme-orgw3clearkey">ClearKey over CENC (W3C EME <code>org.w3.clearkey</code>)<a class="headerlink" href="#clearkey-over-cenc-w3c-eme-orgw3clearkey" title="Permanent link">&para;</a></h3>
<p>The CENC ClearKey scheme is a proper license flow, but the "license server"
<p>The CENC ClearKey scheme is a proper licence flow, but the "licence server"
returns the keys as a JWK Set and not a DRM-wrapped blob. unshackle builds a W3C
EME request of the form:</p>
<div class="language-json highlight"><pre><span></span><code><span id="__span-21-1"><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a><span class="p">{</span><span class="nt">"kids"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"&lt;base64url-kid&gt;"</span><span class="p">,</span><span class="w"> </span><span class="err">...</span><span class="p">],</span><span class="w"> </span><span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"temporary"</span><span class="p">}</span>
</span></code></pre></div>
<p>It sends this to the manifest's license URL (or to whatever a service's ClearKey
license hook returns) and reads the JSON Web Key set back. You do not need a device
<p>It sends this to the manifest's licence URL (or to whatever a service's ClearKey
licence hook returns) and reads the JSON Web Key set back. You do not need a device
file. The decrypted file still goes through shaka-packager or mp4decrypt like any
other CENC track, so the <code>decryption</code> setting applies.</p>
<p>A DASH manifest can also give the KID of a ClearKey track with only the W3C common PSSH
(<code>urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b</code>). The common PSSH can name KIDs for any DRM
system, so unshackle reads it as ClearKey (CENC) only when the manifest and the init segment
give no other DRM system. This scheme has no license URL in the manifest, so the content key
must come from the service's ClearKey license hook or from a key vault.</p>
give no other DRM system. This scheme has no licence URL in the manifest, so the content key
must come from the service's ClearKey licence hook or from a key vault.</p>
<h3 id="clearkey-over-a-whole-file-aes-ctr">ClearKey over a whole file (AES-CTR)<a class="headerlink" href="#clearkey-over-a-whole-file-aes-ctr" title="Permanent link">&para;</a></h3>
<p>Some services encrypt one whole audio file with AES-128-CTR and give the content key and
the IV with the track. unshackle decrypts the file in-process after the download. There is
no device, no CDM and no license challenge. The licence step of a download or of a <code>--skip-dl</code> run licenses
no device, no CDM and no licence challenge. The licence step of a download or of a <code>--skip-dl</code> run licenses
the content key, so <code>--list</code> asks for none. The IV, the length of the header in front of the media and the
signature the file must start with travel with the track list.</p>
<p>Over <code>--remote</code> the track list carries no content key. After the track selection the client asks the server
@@ -3229,81 +3290,38 @@ merged file once. The README of each plugin gives its device files, its tools an
<a href="../vaults/#wrong-keys-from-a-poisoned-vault">Vaults</a>).</li>
</ul>
<h2 id="keys-vaults-and-caching">Keys, vaults, and caching<a class="headerlink" href="#keys-vaults-and-caching" title="Permanent link">&para;</a></h2>
<p>Fetching a license is comparatively slow and, for some services, rate-limited.
<p>Fetching a licence is comparatively slow and, for some services, rate-limited.
unshackle therefore resolves each key ID in this order before ever contacting a
license server:</p>
licence server:</p>
<ol>
<li>Keys already known for the current DRM object.</li>
<li>An in-process cache of content keys, for the current <code>dl</code> run.</li>
<li>The content keys that a remote server gives over <code>--remote</code>, or that an export holds
for <code>unshackle import</code>.</li>
<li>The content keys that the run already holds: from the service, or from an earlier track.</li>
<li>Your configured <a href="../vaults/">key vaults</a>.</li>
<li>Only if still missing, a live license request.</li>
<li>Only if still missing, a licence from the CDM.</li>
</ol>
<p>After a successful license request, unshackle writes the recovered keys back to all
configured vaults, so future downloads can skip the license server. Two flags let you
control this trade-off on the <code>dl</code> command:</p>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--vaults-only</code></td>
<td>Never send a license request; use only cached/vault keys. Fails if a content key is missing.</td>
</tr>
<tr>
<td><code>--cdm-only</code></td>
<td>Ignore vaults for sourcing keys and always perform a fresh license request. Over <code>--remote</code>, your own CDM licenses each track, and the run uses neither the server CDM nor the server vault. A remote session on the server's device fails, and so does a run with no local CDM.</td>
</tr>
<tr>
<td><code>--cdm &lt;name&gt;</code></td>
<td>Use the named CDM device for this run instead of the one the <code>cdm</code> config maps for the service. Over <code>--remote</code>, that device licenses the remote session, not the server CDM.</td>
</tr>
</tbody>
</table>
<p>After a successful licence, unshackle writes the recovered keys back to all
configured vaults, so future downloads can skip the licence server.
<a href="../cli-reference/#drm-keys-decryption"><code>--vaults-only</code>, <code>--cdm-only</code> and <code>--cdm</code></a> change
this for one <code>dl</code> run.</p>
<p>See <a href="../vaults/">key vaults</a> for how to configure vault backends.</p>
<h2 id="debugging-drm-issues">Debugging DRM issues<a class="headerlink" href="#debugging-drm-issues" title="Permanent link">&para;</a></h2>
<p>A few configuration toggles help when a title will not decrypt:</p>
<table>
<thead>
<tr>
<th>Config key</th>
<th>Default</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>debug</code></td>
<td><code>false</code></td>
<td>Global debug output.</td>
</tr>
<tr>
<td><code>debug_keys</code></td>
<td><code>false</code></td>
<td>Log decryption keys.</td>
</tr>
<tr>
<td><code>debug_requests</code></td>
<td><code>false</code></td>
<td>Log HTTP requests to the console with <code>-d</code>, each request to the <a href="../troubleshooting/#debug-requests">JSON debug log</a>, and the request and response bodies as files in a folder beside it. The folder holds tokens and content keys as sent and received.</td>
</tr>
</tbody>
</table>
<p>A few configuration toggles help when a title will not decrypt: <code>debug</code>, <code>debug_keys</code> (logs
the content keys) and <code>debug_requests</code> (logs each HTTP request, see
<a href="../troubleshooting/#debug-requests">Debugging HTTP traffic</a>). Their defaults and effects are in
the <a href="../../reference/configuration/misc/#logging-privacy-debug">logging and debug reference</a>.</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-24-1"><a id="__codelineno-24-1" name="__codelineno-24-1" href="#__codelineno-24-1"></a><span class="nt">debug_keys</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-24-2"><a id="__codelineno-24-2" name="__codelineno-24-2" href="#__codelineno-24-2"></a><span class="nt">debug_requests</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span></code></pre></div>
<div class="admonition warning">
<p class="admonition-title">Keys and paths in logs</p>
<p>When you enable key logging, unshackle writes content keys (KID:key pairs) to the logs.
<p>When you enable key logging, unshackle writes content keys (<code>KID:KEY</code>) to the logs.
Treat those logs as sensitive. The unrelated <code>redact_paths</code> option (default
<code>true</code>) masks local directory paths in log output.</p>
</div>
<h2 id="see-also">See also<a class="headerlink" href="#see-also" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="../downloading/">Downloading</a>: the <code>dl</code> command and its DRM-related flags.</li>
<li><a href="../cli-reference/#drm-keys-decryption">CLI reference</a>: the DRM-related flags of the <code>dl</code> command.</li>
<li><a href="../vaults/">Key vaults</a>: caching content keys across downloads.</li>
<li><a href="../../reference/configuration/">Configuration</a>: the full <code>unshackle.yaml</code> reference.</li>
<li><a href="../../getting-started/installation/">Dependencies</a>: installing shaka-packager and mp4decrypt.</li>