mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-04 06:55:09 +00:00
Deployed 0536056e with MkDocs version: 1.6.1
This commit is contained in:
@@ -2659,7 +2659,11 @@ accepted URL/ID formats and options there.</p>
|
|||||||
<code>is_widevine_cdm()</code> / <code>is_playready_cdm()</code> from <code>unshackle.core.cdm.detect</code>
|
<code>is_widevine_cdm()</code> / <code>is_playready_cdm()</code> from <code>unshackle.core.cdm.detect</code>
|
||||||
to classify it. These work correctly for local <em>and</em> remote CDMs, so never
|
to classify it. These work correctly for local <em>and</em> remote CDMs, so never
|
||||||
hand-roll an <code>isinstance</code> check. Services often pick a device profile or
|
hand-roll an <code>isinstance</code> check. Services often pick a device profile or
|
||||||
manifest endpoint based on which DRM the CDM speaks.</p>
|
manifest endpoint based on which DRM the CDM speaks. A service whose DRM
|
||||||
|
plugin licenses locally puts only the plugin data on the track: unshackle
|
||||||
|
licenses it at the licence step. To pick streams by the device, read the
|
||||||
|
device with <code>ctx.obj.cdm_for("<plugin id>")</code>.
|
||||||
|
<code>ctx.obj.cdm_for</code> is <code>None</code> where nothing licenses, for example in a search.</p>
|
||||||
</div>
|
</div>
|
||||||
<h3 id="authenticate-optional-login"><code>authenticate</code>: optional login<a class="headerlink" href="#authenticate-optional-login" title="Permanent link">¶</a></h3>
|
<h3 id="authenticate-optional-login"><code>authenticate</code>: optional login<a class="headerlink" href="#authenticate-optional-login" title="Permanent link">¶</a></h3>
|
||||||
<p>Override to log in with cookies and/or credentials. <strong>Call <code>super().authenticate()</code>
|
<p>Override to log in with cookies and/or credentials. <strong>Call <code>super().authenticate()</code>
|
||||||
|
|||||||
@@ -3813,7 +3813,7 @@ ignore it safely. See <a href="../../creating-a-service/#split-episodes">Split e
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>The server sorts tracks by bitrate, descending. Episodes the server cannot get go into <code>unavailable_episodes</code>, rather than failing the whole request. Track objects here do <strong>not</strong> include a download <code>url</code>. Only the remote session endpoints give segment URLs.</p>
|
<p>The server sorts tracks by bitrate, descending. Episodes the server cannot get go into <code>unavailable_episodes</code>, rather than failing the whole request. Track objects here do <strong>not</strong> include a download <code>url</code>. Only the remote session endpoints give segment URLs.</p>
|
||||||
<p>The <code>drm</code> array on a track is a list of <code>{type, pssh?, kids?, content_keys?, license_url?}</code> objects.</p>
|
<p>The <code>drm</code> array on a track is a list of <code>{type, pssh?, kids?, content_keys?, license_url?}</code> objects. Only a <code>widevine</code>, <code>playready</code> or <code>clearkeycenc</code> entry carries <code>content_keys</code>.</p>
|
||||||
<p>Every track carries the same fields as a local track: <code>is_original_lang</code>, <code>name</code>, <code>needs_repack</code>, <code>edition</code>, <code>note</code>, and <code>data</code>. <code>name</code> is the name the service set, or null. <code>note</code> is display text the service set, such as an encoding profile, or null: <code>--list</code> shows it, but the filename and the mux do not use it. <code>track_name</code> is the name <code>--list</code> shows and the mux writes to an audio or subtitle track: <code>name</code> when the service set one, else the name of the language (English, or in the language itself when the server sets <code>muxing.track_names: native</code>, or no name when it sets <code>none</code>), then the server's <code>muxing.original_label</code> on an original-language track, then the SDH, CC, Forced or Descriptive label. <code>bitrate</code> is in kb/s, and <code>bitrate_bps</code> gives the exact bits/s. <code>data</code> holds the part of the service-set <code>track.data</code> that fits in JSON, without the <code>hls</code>, <code>dash</code>, and <code>ism</code> parser keys. Audio keeps <code>is_original</code> and <code>atmos</code> for clients that read them, and adds the exact <code>joc</code> object count. Audio <code>bit_depth</code> and <code>sample_rate</code> (Hz) are integers, or null when the manifest and the service do not give them.</p>
|
<p>Every track carries the same fields as a local track: <code>is_original_lang</code>, <code>name</code>, <code>needs_repack</code>, <code>edition</code>, <code>note</code>, and <code>data</code>. <code>name</code> is the name the service set, or null. <code>note</code> is display text the service set, such as an encoding profile, or null: <code>--list</code> shows it, but the filename and the mux do not use it. <code>track_name</code> is the name <code>--list</code> shows and the mux writes to an audio or subtitle track: <code>name</code> when the service set one, else the name of the language (English, or in the language itself when the server sets <code>muxing.track_names: native</code>, or no name when it sets <code>none</code>), then the server's <code>muxing.original_label</code> on an original-language track, then the SDH, CC, Forced or Descriptive label. <code>bitrate</code> is in kb/s, and <code>bitrate_bps</code> gives the exact bits/s. <code>data</code> holds the part of the service-set <code>track.data</code> that fits in JSON, without the <code>hls</code>, <code>dash</code>, and <code>ism</code> parser keys. Audio keeps <code>is_original</code> and <code>atmos</code> for clients that read them, and adds the exact <code>joc</code> object count. Audio <code>bit_depth</code> and <code>sample_rate</code> (Hz) are integers, or null when the manifest and the service do not give them.</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@@ -5019,7 +5019,7 @@ Use <code>error_code</code> and <code>retryable</code> to decide what to do.</p>
|
|||||||
<p>A slow response is not gzip-compressed. Gzip output cannot start before the body is ready, and
|
<p>A slow response is not gzip-compressed. Gzip output cannot start before the body is ready, and
|
||||||
the newlines must go out at once.</p>
|
the newlines must go out at once.</p>
|
||||||
<h3 id="post-apisessioncreate"><code>POST /api/session/create</code><a class="headerlink" href="#post-apisessioncreate" title="Permanent link">¶</a></h3>
|
<h3 id="post-apisessioncreate"><code>POST /api/session/create</code><a class="headerlink" href="#post-apisessioncreate" title="Permanent link">¶</a></h3>
|
||||||
<p>Make a remote session for a service and title. Authentication runs asynchronously in the background. This call returns immediately with <code>status: "authenticating"</code>, and you then poll the prompt endpoint. The body accepts <code>service</code> and <code>title_id</code> (both required). It also accepts a broad set of optional keys, because the body allows <code>additionalProperties</code>. These are <code>session_id</code>, <code>credentials</code> (<code>{username, password, extra?}</code>), <code>cookies</code> (base64 of zlib-compressed Netscape cookie file), <code>proxy</code>, <code>no_proxy</code>, <code>profile</code>, <code>cache</code> (map of forwarded cache files, keyed by the file path relative to the service cache directory with <code>/</code> separators and no <code>.json</code> suffix, so a nested key such as <code>session_web/<sha1></code> lands in a subdirectory), <code>client_region</code>, <code>proxy_region</code>, <code>cdm_type</code>, <code>range_</code>, <code>vcodec</code>, <code>quality</code>, <code>best_available</code>, <code>dl_params</code>, <code>client</code>, and any service CLI options. <code>proxy_region</code> is the country code the client resolved <code>proxy</code> from; the server matches it against its own accounts. <code>client</code> is a freeform object the dashboard shows as sent (the CLI puts <code>version</code>, <code>code_hash</code>, <code>platform</code> and a redacted <code>argv</code> in it); the server ignores it above 4096 bytes of JSON.</p>
|
<p>Make a remote session for a service and title. Authentication runs asynchronously in the background. This call returns immediately with <code>status: "authenticating"</code>, and you then poll the prompt endpoint. The body accepts <code>service</code> and <code>title_id</code> (both required). It also accepts a broad set of optional keys, because the body allows <code>additionalProperties</code>. These are <code>session_id</code>, <code>credentials</code> (<code>{username, password, extra?}</code>), <code>cookies</code> (base64 of zlib-compressed Netscape cookie file), <code>proxy</code>, <code>no_proxy</code>, <code>profile</code>, <code>cache</code> (map of forwarded cache files, keyed by the file path relative to the service cache directory with <code>/</code> separators and no <code>.json</code> suffix, so a nested key such as <code>session_web/<sha1></code> lands in a subdirectory), <code>client_region</code>, <code>proxy_region</code>, <code>cdm_type</code>, <code>range_</code>, <code>vcodec</code>, <code>quality</code>, <code>best_available</code>, <code>dl_params</code>, <code>plugins</code>, <code>client</code>, and any service CLI options. <code>plugins</code> maps the id of each DRM plugin that the client loads to <code>{version, device?}</code>; <code>device</code> holds the plain values of the device attributes that the plugin names in <code>device_facts</code>. The server refuses a title with a track of a plugin that is not in <code>plugins</code> (or a body with no <code>plugins</code>) on <code>POST /api/session/{id}/tracks</code> with <code>DRM_ERROR</code>, and gives <code>device</code> to the service only in a remote session that the client's device licenses. A <code>plugins</code> value over 16384 bytes of JSON, or of another shape, gets <code>INVALID_INPUT</code>. <code>proxy_region</code> is the country code the client resolved <code>proxy</code> from; the server matches it against its own accounts. <code>client</code> is a freeform object the dashboard shows as sent (the CLI puts <code>version</code>, <code>code_hash</code>, <code>platform</code> and a redacted <code>argv</code> in it); the server ignores it above 4096 bytes of JSON.</p>
|
||||||
<p><code>session_id</code> is the ID that you give the remote session, so that you can delete it before this call answers. It must be the canonical text of a version 4 UUID. Without it, the server makes the ID. A remote session with your ID ends when you send no request for it and open no channel within 150s of the create. A second create with the same ID from the same API key and IP ends the first one if the first one has not answered, and replaces its remote session when the new one is stored. A second create that fails leaves that remote session open.</p>
|
<p><code>session_id</code> is the ID that you give the remote session, so that you can delete it before this call answers. It must be the canonical text of a version 4 UUID. Without it, the server makes the ID. A remote session with your ID ends when you send no request for it and open no channel within 150s of the create. A second create with the same ID from the same API key and IP ends the first one if the first one has not answered, and replaces its remote session when the new one is stored. A second create that fails leaves that remote session open.</p>
|
||||||
<p><code>dl_params</code> is an object with the <code>dl</code> track selection: <code>lang</code>, <code>v_lang</code>, <code>a_lang</code> and <code>s_lang</code> (arrays of language strings), <code>acodec</code> (an array of audio codec names or <code>dl -a</code> aliases such as <code>ddp</code>), and <code>forced_subs</code> and <code>exact_lang</code> (booleans). The service reads these values from <code>ctx.parent.params</code>. The server uses the <code>dl</code> default for each absent value. It refuses a malformed value, an unknown codec, range or vcodec name, and a height of 0 or less with <code>INVALID_PARAMETERS</code>. The flat <code>range_</code>, <code>vcodec</code>, <code>quality</code>, <code>best_available</code> and <code>generate_dv</code> keys are <code>dl</code> values on this route. On the list and search routes they are <code>dl</code> values only when the body has <code>service_params</code>.</p>
|
<p><code>dl_params</code> is an object with the <code>dl</code> track selection: <code>lang</code>, <code>v_lang</code>, <code>a_lang</code> and <code>s_lang</code> (arrays of language strings), <code>acodec</code> (an array of audio codec names or <code>dl -a</code> aliases such as <code>ddp</code>), and <code>forced_subs</code> and <code>exact_lang</code> (booleans). The service reads these values from <code>ctx.parent.params</code>. The server uses the <code>dl</code> default for each absent value. It refuses a malformed value, an unknown codec, range or vcodec name, and a height of 0 or less with <code>INVALID_PARAMETERS</code>. The flat <code>range_</code>, <code>vcodec</code>, <code>quality</code>, <code>best_available</code> and <code>generate_dv</code> keys are <code>dl</code> values on this route. On the list and search routes they are <code>dl</code> values only when the body has <code>service_params</code>.</p>
|
||||||
<p>Service CLI options also travel in a nested <code>service_params</code> object. When the body has <code>service_params</code>, the server reads service options only from it, and a flat key with the same name stays a <code>dl</code> value. <code>profile</code> at the top level always means the credentials profile, never a service's own <code>--profile</code> option.</p>
|
<p>Service CLI options also travel in a nested <code>service_params</code> object. When the body has <code>service_params</code>, the server reads service options only from it, and a flat key with the same name stays a <code>dl</code> value. <code>profile</code> at the top level always means the credentials profile, never a service's own <code>--profile</code> option.</p>
|
||||||
@@ -5479,7 +5479,7 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>drm_type</code></td>
|
<td><code>drm_type</code></td>
|
||||||
<td><code>widevine</code> (default) or <code>playready</code>. In server-CDM mode the server's <code>cdm</code> mapping for the service decides the DRM system and the response <code>drm_type</code> names the system that licensed. A mapping with a device for each system takes the system of the device the remote session loaded. With no mapping, the client's value decides when the track carries that system; else a system the track carries decides, PlayReady first. The tracks response <code>server_cdm_type</code> names the system the same order gives for the title's tracks. A track whose DRM is a whole-file cipher takes <code>clearkeyctr</code> with no <code>pssh</code>: the service on the server licenses it. A MonaLisa track takes <code>monalisa</code> with no <code>pssh</code> and <code>mode</code> <code>server_cdm</code>: the server answers in <code>keys</code> with the content key that its service extracted, and only in a session that uses the server CDM.</td>
|
<td><code>widevine</code> (default), <code>playready</code>, or the id of a DRM plugin that both peers load. In server-CDM mode the server's <code>cdm</code> mapping for the service decides the DRM system and the response <code>drm_type</code> names the system that licensed. A mapping with a device for each system takes the system of the device the remote session loaded. With no mapping, the client's value decides when the track carries that system; else a system the track carries decides, PlayReady first. The tracks response <code>server_cdm_type</code> names the system the same order gives for the title's tracks. A track whose DRM is a whole-file cipher takes <code>clearkeyctr</code> with no <code>pssh</code>: the service on the server licenses it. A track of a DRM plugin that licenses locally takes the plugin id with no <code>pssh</code> and <code>mode</code> <code>server_cdm</code>: the server answers in <code>keys</code> with the content key from a server vault or from a licence of its own plugin device, only in a session that uses the server CDM, and only under the licence cap (<code>SERVER_CDM_CAPPED</code> above it).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>mode</code></td>
|
<td><code>mode</code></td>
|
||||||
|
|||||||
@@ -2808,6 +2808,12 @@ See <a href="../../../reference/configuration/drm/"><code>cdm</code></a>.</p>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
|
<p class="admonition-title">A DRM type that the client does not know</p>
|
||||||
|
<p>The client rebuilds the DRM of each track from the track list of the server. When the server
|
||||||
|
sends a DRM <code>type</code> that the client does not know, the client stops the title with one
|
||||||
|
<code>DRM_ERROR</code> line that names the type. Update the client to the version of the server.</p>
|
||||||
|
</div>
|
||||||
|
<div class="admonition note">
|
||||||
<p class="admonition-title">A height limit on the server CDM</p>
|
<p class="admonition-title">A height limit on the server CDM</p>
|
||||||
<p>An API key with <code>server_cdm_max_height</code> gets the server CDM only up to that height. The
|
<p>An API key with <code>server_cdm_max_height</code> gets the server CDM only up to that height. The
|
||||||
session create response tells the client who licenses the session in <code>server_cdm</code> and gives
|
session create response tells the client who licenses the session in <code>server_cdm</code> and gives
|
||||||
@@ -3066,8 +3072,10 @@ session when the new one is stored, and the server answers the ID of another API
|
|||||||
<code>credentials</code>, <code>cookies</code> (base64 of zlib-compressed Netscape cookie file), <code>proxy</code>,
|
<code>credentials</code>, <code>cookies</code> (base64 of zlib-compressed Netscape cookie file), <code>proxy</code>,
|
||||||
<code>no_proxy</code>, <code>profile</code>, <code>cache</code> (a map of <code>filename → base64(zlib(bytes))</code>),
|
<code>no_proxy</code>, <code>profile</code>, <code>cache</code> (a map of <code>filename → base64(zlib(bytes))</code>),
|
||||||
<code>client_region</code>, <code>server_cdm</code> (<code>false</code> when the user picked the local CDM), <code>cdm_type</code>, <code>cdm_security_level</code>, <code>cdm_relay</code> (<code>true</code> when the client
|
<code>client_region</code>, <code>server_cdm</code> (<code>false</code> when the user picked the local CDM), <code>cdm_type</code>, <code>cdm_security_level</code>, <code>cdm_relay</code> (<code>true</code> when the client
|
||||||
answers CDM calls), <code>cdm_system_id</code> and <code>cdm_device_type</code> (Widevine only), <code>service_config</code>
|
answers CDM calls; a plugin <code>cdm_type</code> gets no relay), <code>cdm_system_id</code> and <code>cdm_device_type</code> (Widevine only), <code>service_config</code>
|
||||||
(the identity config keys the service lists in <code>client_config</code>), <code>client</code> (a freeform identity
|
(the identity config keys the service lists in <code>client_config</code>), <code>plugins</code> (the version of each DRM plugin of the
|
||||||
|
client and the values of the plugin device attributes that the plugin names in <code>device_facts</code>; see
|
||||||
|
<a href="../endpoints/#post-apisessioncreate">endpoints</a>), <code>client</code> (a freeform identity
|
||||||
object the dashboard shows as sent), and the track-selection hints <code>range_</code>, <code>vcodec</code>,
|
object the dashboard shows as sent), and the track-selection hints <code>range_</code>, <code>vcodec</code>,
|
||||||
<code>quality</code>, <code>best_available</code>, <code>generate_dv</code>, plus arbitrary service CLI options
|
<code>quality</code>, <code>best_available</code>, <code>generate_dv</code>, plus arbitrary service CLI options
|
||||||
(<code>additionalProperties: true</code>).</p>
|
(<code>additionalProperties: true</code>).</p>
|
||||||
|
|||||||
@@ -3219,7 +3219,7 @@ least one and no track is left.</p>
|
|||||||
</ul>
|
</ul>
|
||||||
<h2 id="drm-hooks">DRM hooks<a class="headerlink" href="#drm-hooks" title="Permanent link">¶</a></h2>
|
<h2 id="drm-hooks">DRM hooks<a class="headerlink" href="#drm-hooks" title="Permanent link">¶</a></h2>
|
||||||
<p>If a track carries DRM, the framework licenses and decrypts it, but it needs your
|
<p>If a track carries DRM, the framework licenses and decrypts it, but it needs your
|
||||||
service to talk to the platform's license server. unshackle recognizes seven DRM systems:</p>
|
service to talk to the platform's license server. unshackle recognizes six DRM classes:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -3250,14 +3250,9 @@ service to talk to the platform's license server. unshackle recognizes seven DRM
|
|||||||
<td>content key fetched directly from a URI; no CDM, no challenge</td>
|
<td>content key fetched directly from a URI; no CDM, no challenge</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>MonaLisa</code></td>
|
<td><code>CustomDRM</code></td>
|
||||||
<td>Proprietary WASM DRM</td>
|
<td>a system that a DRM plugin adds</td>
|
||||||
<td>keys extracted locally; no license server. Without <code>tool_path</code>, core uses <code>bbtsdecrypt</code> per segment, else its built-in decrypter (<code>core/drm/bbts.py</code>) per segment. <code>command_builder</code> sets the command of the decryption backend, and <code>segment_decrypt=False</code> runs it once on the merged file. Over <code>--remote</code> only the KID goes to the client, and the server sends the content key under the server CDM. An export also holds only the KID as its DRM, never the tool or the command. One process extracts the keys of one ticket at a time, because the wasmtime bindings are not thread-safe</td>
|
<td><code>CustomDRM("<plugin id>", kids=..., data=...)</code>. For a plugin that holds its key, put the key in <code>data</code>. For a plugin that licenses locally, put only the data the plugin reads: unshackle licenses it at the licence step. The plugin decrypts. Its README names the <code>data</code> it reads</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><code>BlowfishStripe</code></td>
|
|
||||||
<td>Blowfish CBC stripe cipher</td>
|
|
||||||
<td>the service gives the per-track key; no CDM, no license server</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>ClearKeyCTR</code></td>
|
<td><code>ClearKeyCTR</code></td>
|
||||||
|
|||||||
@@ -4410,6 +4410,9 @@ a song has no video track. Export the song again.</p>
|
|||||||
<p>An import uses only the content keys in the file and in your vaults. It never gets a licence
|
<p>An import uses only the content keys in the file and in your vaults. It never gets a licence
|
||||||
from a CDM. When a track needs a content key that neither has, the import stops and names the
|
from a CDM. When a track needs a content key that neither has, the import stops and names the
|
||||||
KID. To fix this, export the title again with that track selected.</p>
|
KID. To fix this, export the title again with that track selected.</p>
|
||||||
|
<p>An import also stops when the export names a DRM system that this version of unshackle does not
|
||||||
|
know, and the message names that system. An HLS AES-128 entry from another tool does not stop the
|
||||||
|
import, because the playlist gives that content key.</p>
|
||||||
<div class="admonition warning">
|
<div class="admonition warning">
|
||||||
<p class="admonition-title">The export file is a secret</p>
|
<p class="admonition-title">The export file is a secret</p>
|
||||||
<p>It holds the content keys and usually a signed manifest URL. Hand it over on purpose,
|
<p>It holds the content keys and usually a signed manifest URL. Hand it over on purpose,
|
||||||
|
|||||||
@@ -1054,6 +1054,17 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#drm-plugins" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
DRM plugins
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -2529,6 +2540,17 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#drm-plugins" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
DRM plugins
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -2644,8 +2666,9 @@ from the track, asks the CDM for a license challenge, sends that challenge to th
|
|||||||
service's license server, hands the response back to the CDM to extract the keys, and
|
service's license server, hands the response back to the CDM to extract the keys, and
|
||||||
then decrypts the file with those keys.</p>
|
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">¶</a></h2>
|
<h2 id="supported-drm-systems">Supported DRM systems<a class="headerlink" href="#supported-drm-systems" title="Permanent link">¶</a></h2>
|
||||||
<p>unshackle implements seven DRM systems. Only the first two need a device file and a
|
<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.</p>
|
license-server handshake. The rest are special cases. A DRM plugin adds another system (see
|
||||||
|
<a href="#drm-plugins">DRM plugins</a>).</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -2681,18 +2704,6 @@ license-server handshake. The rest are special cases.</p>
|
|||||||
<td>in-process AES-CBC</td>
|
<td>in-process AES-CBC</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<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. Over <code>--remote</code> the server extracts the content key and sends it to the client, only when the remote session uses the server CDM.</td>
|
|
||||||
<td>The tool that the service names, else <code>bbtsdecrypt</code> per segment, else the built-in decrypter per segment, which needs no tool. Over <code>--remote</code> the client decrypts with its own tool or the built-in decrypter. An export holds the KID and the content key, and an import decrypts like a <code>--remote</code> client. After the merge FFmpeg decode-checks the video track; a content key that does not decode stops the track.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><strong>Blowfish stripe</strong></td>
|
|
||||||
<td>none</td>
|
|
||||||
<td>The service gives the per-track key. No CDM, no license server.</td>
|
|
||||||
<td>in-process Blowfish-CBC on every third 2048-byte chunk</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><strong>ClearKey (CTR)</strong>, AES-128-CTR</td>
|
<td><strong>ClearKey (CTR)</strong>, AES-128-CTR</td>
|
||||||
<td>none</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 license server.</td>
|
||||||
@@ -3177,6 +3188,47 @@ systems can list different sets of KIDs, and unshackle keeps the content keys of
|
|||||||
<li>A remote CDM that stores content keys can answer without a challenge to the service.</li>
|
<li>A remote CDM that stores content keys can answer without a challenge to the service.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<h2 id="drm-plugins">DRM plugins<a class="headerlink" href="#drm-plugins" title="Permanent link">¶</a></h2>
|
||||||
|
<p>A DRM system that is not built in comes from a plugin. A plugin is a zip file or a folder that holds
|
||||||
|
one Python package. Put it in <a href="../../reference/configuration/directories/"><code>directories.plugins</code></a>.
|
||||||
|
unshackle loads the plugins once per process, at the first DRM lookup, and never from a peer or a URL.
|
||||||
|
Restart <code>unshackle serve</code> after you add or replace a plugin. A plugin that
|
||||||
|
does not load gives one warning that names its file. A track that needs a plugin that is not loaded
|
||||||
|
stops with <code>No DRM plugin '<id>' is installed</code>.</p>
|
||||||
|
<p>A plugin sets the facts of its system: its id, its label, how it gets the content key, and how it
|
||||||
|
decrypts. The service gives the content key of a plugin that holds its key. A plugin device licenses
|
||||||
|
a plugin that licenses locally, at the licence step of a download, after the vault lookup, as for a CDM
|
||||||
|
track: <code>--list</code> sends no licence, and <code>--vaults-only</code> and <code>--cdm-only</code> apply. A plugin decrypts each segment and then the merged file, or the
|
||||||
|
merged file once. The README of each plugin gives its device files, its tools and its limits.</p>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Devices:</strong> a plugin device file is <code><name><suffix></code>, with the suffix that the plugin sets. A plugin
|
||||||
|
can carry its own device files and name a default device. unshackle looks for a device in
|
||||||
|
<code>directories.wvds</code>, then in <code>directories.prds</code>, then in the device files of the plugin, so your own
|
||||||
|
file comes first. A service that needs a plugin device gets the default device of the plugin when
|
||||||
|
its <a href="#selecting-which-device-to-use-the-cdm-config"><code>cdm</code></a> entry names no device of that system.
|
||||||
|
To use another device, name it under the plugin id in the <code>cdm</code> mapping, as you name a device
|
||||||
|
under <code>widevine</code>.</li>
|
||||||
|
<li><strong><code>--remote</code>:</strong> the server and each client must load the same plugin. When a client opens a
|
||||||
|
remote session, it sends the id and the version of each plugin it loads. For a plugin device, it also sends
|
||||||
|
the values of the device attributes that the plugin names (for example the security level), never a
|
||||||
|
path or a device file. The server sends the plugin id, the KIDs, the label and the data that the
|
||||||
|
plugin lets a peer carry; never a content key or a path. The server refuses a title with a track of
|
||||||
|
a plugin that the client did not send with <code>This title needs the DRM plugin '<id>', which your
|
||||||
|
unshackle does not have</code>, before it sends the track list. A client that sends no plugin list (an
|
||||||
|
older unshackle) gets <code>This title needs the DRM plugin '<id>', and your unshackle sends no plugin
|
||||||
|
list</code>. In a remote session that the client's device licenses, the service on the server reads the
|
||||||
|
values that the client sent, so it picks the data that the client's device can license.
|
||||||
|
In a remote session that uses the server CDM, the server licenses a plugin DRM that licenses locally
|
||||||
|
with its own plugin device, under the licence cap of the API key. With <code>--cdm-only</code>, in a session
|
||||||
|
that the client licenses, and for a track above the cap, the client licenses with its own plugin
|
||||||
|
device. The plugin data can be bound to the device that the service on the server read, so a
|
||||||
|
different client device can fail to read it.</li>
|
||||||
|
<li><strong>Export:</strong> an export writes a plugin DRM under the plugin id, with the same fields as <code>--remote</code>.
|
||||||
|
An import without the plugin stops with <code>Unknown DRM system '<id>' in the export</code>.</li>
|
||||||
|
<li><strong>Decode check:</strong> FFmpeg checks the content key of a plugin DRM that licenses locally after the
|
||||||
|
merge, as for a vault key. A content key that does not decode stops the track (see
|
||||||
|
<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">¶</a></h2>
|
<h2 id="keys-vaults-and-caching">Keys, vaults, and caching<a class="headerlink" href="#keys-vaults-and-caching" title="Permanent link">¶</a></h2>
|
||||||
<p>Fetching a license is comparatively slow and, for some services, rate-limited.
|
<p>Fetching a license is comparatively slow and, for some services, rate-limited.
|
||||||
unshackle therefore resolves each key ID in this order before ever contacting a
|
unshackle therefore resolves each key ID in this order before ever contacting a
|
||||||
|
|||||||
@@ -2745,9 +2745,9 @@
|
|||||||
<p><strong>Inspect:</strong> the licence server gave no content key for a key ID of the init segments, or gave a PlayReady or Widevine content key that is not the FairPlay one. unshackle flags a content key that does not decode. The next licence of that key ID clears the flag, so each run licenses and checks the key again. Operate unshackle with <code>-d</code> and read the <code>Key check on</code> debug line for the result of each window. See <a href="../drm-and-cdm/">DRM & CDM</a>.</p>
|
<p><strong>Inspect:</strong> the licence server gave no content key for a key ID of the init segments, or gave a PlayReady or Widevine content key that is not the FairPlay one. unshackle flags a content key that does not decode. The next licence of that key ID clears the flag, so each run licenses and checks the key again. Operate unshackle with <code>-d</code> and read the <code>Key check on</code> debug line for the result of each window. See <a href="../drm-and-cdm/">DRM & CDM</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">A MonaLisa track stops after its decryption</p>
|
<p class="admonition-title">A plugin DRM track stops after its decryption</p>
|
||||||
<p><strong>Symptom:</strong> the download of a MonaLisa video track stops with <code>The MonaLisa content key of KID <kid> does not decrypt track <id></code>, and unshackle keeps no output file.</p>
|
<p><strong>Symptom:</strong> the download of a track of a DRM plugin stops with <code>The <label> content key of KID <kid> does not decrypt track <id></code>, and unshackle keeps no output file.</p>
|
||||||
<p><strong>Inspect:</strong> FFmpeg could not decode the decrypted track, so the content key is wrong, or the platform changed its BBTS format and the decrypter no longer fits it. unshackle flags the pair in the local vaults and does not copy it to another vault. Run again with the other decrypter: hide <code>bbtsdecrypt</code> to use the built-in one, or install it. If both fail, the content key is wrong. See <a href="../drm-and-cdm/">DRM & CDM</a>.</p>
|
<p><strong>Inspect:</strong> FFmpeg could not decode the decrypted track. The content key is wrong, or the platform changed its format and the plugin decrypter no longer fits it. unshackle flags the pair in the local vaults and does not copy it to another vault. Read the README of the plugin for its other decrypter. See <a href="../drm-and-cdm/#drm-plugins">DRM plugins</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">A network request fails at the connection or TLS layer</p>
|
<p class="admonition-title">A network request fails at the connection or TLS layer</p>
|
||||||
|
|||||||
@@ -2404,7 +2404,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<p>unshackle pushes keys from every source, not only a local CDM. A run against a remote server that licenses with its own CDM (<code>--remote</code>) writes the keys the server returns, and <code>unshackle import</code> writes the keys it reads from an export file.</p>
|
<p>unshackle pushes keys from every source, not only a local CDM. A run against a remote server that licenses with its own CDM (<code>--remote</code>) writes the keys the server returns, and <code>unshackle import</code> writes the keys it reads from an export file.</p>
|
||||||
<h3 id="wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault<a class="headerlink" href="#wrong-keys-from-a-poisoned-vault" title="Permanent link">¶</a></h3>
|
<h3 id="wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault<a class="headerlink" href="#wrong-keys-from-a-poisoned-vault" title="Permanent link">¶</a></h3>
|
||||||
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check, with two exceptions: a FairPlay-only track that the FairPlay bridge licensed, and a MonaLisa video track. A MonaLisa track is MPEG-TS, so it gets the check of the whole file after the merge of its decrypted segments. This applies to both decrypters. An import also checks these content keys when it reads them from an export file. When one of these fails, unshackle flags the pair, stops the track and keeps no output file. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A BBTS decrypter keeps the continuity counter of a TS packet that it empties, so unshackle corrects the counters of a MonaLisa track before the check. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Damage to a small part of the slice data, such as one corrupt NAL unit, also often decodes without an error. Without FFmpeg there is no check at all.</p>
|
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check, with two exceptions: a FairPlay-only track that the FairPlay bridge licensed, and a track of a DRM plugin that licenses locally. A plugin track gets the check of the whole file after the merge of its decrypted segments. An import also checks these content keys when it reads them from an export file. When one of these fails, unshackle flags the pair, stops the track and keeps no output file. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A plugin that decrypts each segment can fix the merged file before the check. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Damage to a small part of the slice data, such as one corrupt NAL unit, also often decodes without an error. Without FFmpeg there is no check at all.</p>
|
||||||
<p>When the decode fails, unshackle:</p>
|
<p>When the decode fails, unshackle:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Flags the KID:KEY in the <code>bad_keys</code> table of every local SQLite vault, with the service and the name of the vault it came from. The pair also goes out of the service table, except in a vault marked <code>no_push</code>, where only the flag is written. A flagged pair cannot go back into a local vault from another vault, a later run, or <code>kv copy</code>. A licence that returns the pair clears the flag and stores it. An <code>API</code> vault that served the pair gets a report only when a different content key for that KID is accepted. When the CDM returns the same content key, that vault gets no report. <code>HTTP</code> and <code>MySQL</code> vaults have no report route. A pair from a local vault goes to no remote vault, even when a remote vault holds the same pair.</li>
|
<li>Flags the KID:KEY in the <code>bad_keys</code> table of every local SQLite vault, with the service and the name of the vault it came from. The pair also goes out of the service table, except in a vault marked <code>no_push</code>, where only the flag is written. A flagged pair cannot go back into a local vault from another vault, a later run, or <code>kv copy</code>. A licence that returns the pair clears the flag and stores it. An <code>API</code> vault that served the pair gets a report only when a different content key for that KID is accepted. When the CDM returns the same content key, that vault gets no report. <code>HTTP</code> and <code>MySQL</code> vaults have no report route. A pair from a local vault goes to no remote vault, even when a remote vault holds the same pair.</li>
|
||||||
@@ -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>
|
<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>
|
</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>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 a per-segment MonaLisa decrypter, 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 plugin that decrypts each segment, 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>
|
<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">
|
<div class="admonition tip">
|
||||||
<p class="admonition-title">A good two-vault setup</p>
|
<p class="admonition-title">A good two-vault setup</p>
|
||||||
|
|||||||
BIN
Binary file not shown.
+329
-1324
File diff suppressed because it is too large
Load Diff
@@ -9062,7 +9062,7 @@ unless the name already contains the label's words.</p>
|
|||||||
|
|
||||||
<div class="doc doc-contents ">
|
<div class="doc doc-contents ">
|
||||||
|
|
||||||
<p>Return the DRM matching the provided CDM, if available.</p>
|
<p>Return the DRM of the system of the provided CDM, if the track has one, else its first DRM.</p>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2086,6 +2086,13 @@ defaults relative to the installed package, and passes every user-settable path
|
|||||||
<td>PlayReady device files (<code>.prd</code>).</td>
|
<td>PlayReady device files (<code>.prd</code>).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><code>plugins</code></td>
|
||||||
|
<td>path</td>
|
||||||
|
<td><code>unshackle/plugins</code></td>
|
||||||
|
<td style="text-align: center;">Yes</td>
|
||||||
|
<td>DRM plugins: zip files or folders (see <a href="../../../guide/drm-and-cdm/#drm-plugins">DRM plugins</a>).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><code>dcsl</code></td>
|
<td><code>dcsl</code></td>
|
||||||
<td>path</td>
|
<td>path</td>
|
||||||
<td><code><data>/DCSL</code></td>
|
<td><code><data>/DCSL</code></td>
|
||||||
|
|||||||
@@ -2605,8 +2605,8 @@ ranges must all match the previous download, or the download silently restarts c
|
|||||||
<li>Single-file (non-segmented) downloads and DASH tracks collapsed to a single ranged
|
<li>Single-file (non-segmented) downloads and DASH tracks collapsed to a single ranged
|
||||||
download never make segment files, so this option does not apply to them (the
|
download never make segment files, so this option does not apply to them (the
|
||||||
downloader has its own in-flight partial-file handling for those).</li>
|
downloader has its own in-flight partial-file handling for those).</li>
|
||||||
<li>HLS resumes Widevine/PlayReady and unencrypted titles only. An AES-128 title always
|
<li>HLS resumes Widevine/PlayReady titles, unencrypted titles, and titles of a DRM plugin
|
||||||
restarts. An HLS failure after the post-download merge step starts to join or decrypt
|
that decrypts each segment. An AES-128 title always restarts. An HLS failure after the post-download merge step starts to join or decrypt
|
||||||
segments also restarts, and so does a failure of a multi-period DASH WebVTT subtitle
|
segments also restarts, and so does a failure of a multi-period DASH WebVTT subtitle
|
||||||
during its merge step. A failure before that point, such as a failed init segment
|
during its merge step. A failure before that point, such as a failed init segment
|
||||||
fetch, keeps the downloaded segments.</li>
|
fetch, keeps the downloaded segments.</li>
|
||||||
@@ -2614,7 +2614,7 @@ ranges must all match the previous download, or the download silently restarts c
|
|||||||
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> resumes too. A merge during the download
|
<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
|
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
|
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
|
<a href="../drm/#decrypt_segments"><code>decrypt_segments</code></a> or a DRM plugin decrypted stays decrypted. The next
|
||||||
download reuses it only with the same content key, and downloads it again when the
|
download reuses it only with the same content key, and downloads it again when the
|
||||||
content key changed.</li>
|
content key changed.</li>
|
||||||
<li>A multi-period DASH track whose periods restart their timeline does not resume with
|
<li>A multi-period DASH track whose periods restart their timeline does not resume with
|
||||||
@@ -2649,8 +2649,10 @@ file while the workers write many segment files can make the head seek. If a dow
|
|||||||
with the option on, turn it off.</p>
|
with the option on, turn it off.</p>
|
||||||
<p>This applies to video and audio tracks from DASH, ISM, and HLS. An HLS track qualifies
|
<p>This applies to video and audio tracks from DASH, ISM, and HLS. An HLS track qualifies
|
||||||
only when every segment shares one init segment and one <code>EXT-X-KEY</code>, with no
|
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
|
<code>EXT-X-DISCONTINUITY</code>, and the DRM is Widevine, PlayReady, or none. A track of a DRM plugin that
|
||||||
with content key rotation or discontinuities, and subtitle tracks keep the merge after the download.</p>
|
decrypts each segment needs no init segment and no <code>EXT-X-KEY</code>, only no <code>EXT-X-DISCONTINUITY</code>.
|
||||||
|
AES-128 tracks, tracks with content key rotation or discontinuities, and subtitle tracks keep the
|
||||||
|
merge after the download.</p>
|
||||||
<p>With <a href="#continue_downloads"><code>continue_downloads</code></a> on, a failed track keeps its output file and
|
<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>
|
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-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-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>
|
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-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>
|
||||||
|
|||||||
@@ -2194,7 +2194,9 @@ needs a device for each system from one of these shapes.</p>
|
|||||||
<p>unshackle finds the resolved name in <a href="#remote_cdm"><code>remote_cdm</code></a> by <code>name</code> first. If no entry
|
<p>unshackle finds the resolved name in <a href="#remote_cdm"><code>remote_cdm</code></a> by <code>name</code> first. If no entry
|
||||||
matches, unshackle loads it as a local device file, in this order: <code><name>.prd</code> in
|
matches, unshackle loads it as a local device file, in this order: <code><name>.prd</code> in
|
||||||
<code>directories.prds</code>, <code><name>.prd</code> in <code>directories.wvds</code>, then <code><name>.wvd</code> in
|
<code>directories.prds</code>, <code><name>.prd</code> in <code>directories.wvds</code>, then <code><name>.wvd</code> in
|
||||||
<code>directories.wvds</code>.</p>
|
<code>directories.wvds</code>, then a device file of a DRM plugin, <code><name><suffix></code> in <code>directories.wvds</code> or
|
||||||
|
<code>directories.prds</code>, then in the device files of the plugin. A service that needs a plugin device gets
|
||||||
|
the default device of the plugin when its entry names no device of that system.</p>
|
||||||
<h2 id="remote_cdm"><code>remote_cdm</code><a class="headerlink" href="#remote_cdm" title="Permanent link">¶</a></h2>
|
<h2 id="remote_cdm"><code>remote_cdm</code><a class="headerlink" href="#remote_cdm" title="Permanent link">¶</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Type:</strong> <code>list[dict]</code> · <strong>Default:</strong> <code>[]</code></li>
|
<li><strong>Type:</strong> <code>list[dict]</code> · <strong>Default:</strong> <code>[]</code></li>
|
||||||
@@ -2424,6 +2426,9 @@ cannot decrypt a segment without its init segment. It applies to DASH tracks and
|
|||||||
tracks that use one init segment, one <code>EXT-X-KEY</code> and no <code>EXT-X-DISCONTINUITY</code>. Every other
|
tracks that use one init segment, one <code>EXT-X-KEY</code> and no <code>EXT-X-DISCONTINUITY</code>. Every other
|
||||||
track keeps the whole-file decryption, and so does a track whose init segment mp4decrypt
|
track keeps the whole-file decryption, and so does a track whose init segment mp4decrypt
|
||||||
cannot key by KID when no content key has that KID.</p>
|
cannot key by KID when no content key has that KID.</p>
|
||||||
|
<p>A DRM plugin that decrypts each segment does so as the segments arrive, whatever this option
|
||||||
|
and <code>decryption</code> say, on an HLS track with no <code>EXT-X-DISCONTINUITY</code>. The plugin then runs its
|
||||||
|
fix on the merged file once.</p>
|
||||||
<p>With <a href="../download/#continue_downloads"><code>continue_downloads</code></a> on, a failed track keeps its
|
<p>With <a href="../download/#continue_downloads"><code>continue_downloads</code></a> on, a failed track keeps its
|
||||||
decrypted segments, and the next download reuses them when it has the same content key.</p>
|
decrypted segments, and the next download reuses them when it has the same content key.</p>
|
||||||
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-7-1"><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a><span class="nt">decrypt_segments</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-7-1"><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a><span class="nt">decrypt_segments</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user