mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 14:35:09 +00:00
Deployed 3b6bd02e with MkDocs version: 1.6.1
This commit is contained in:
@@ -2009,6 +2009,17 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> resolution_label
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3046,6 +3057,28 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> held_playlist
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> playlist_text
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3195,6 +3228,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> drop
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3752,6 +3796,17 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.resolution_label" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> resolution_label
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -4789,6 +4844,28 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Track.held_playlist" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> held_playlist
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Track.playlist_text" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> playlist_text
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -4938,6 +5015,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Tracks.drop" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> drop
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -5334,7 +5422,7 @@
|
||||
If providing a URL, download() fetches the file during the download phase.
|
||||
You must give either path or url.</p>
|
||||
<p>If name is not provided it will use the file name (without extension).
|
||||
If mime_type is not provided, it will try to guess it.</p>
|
||||
If mime_type is not provided, it comes from the file signature, else from the suffix.</p>
|
||||
|
||||
|
||||
<p><span class="doc-section-title">Parameters:</span></p>
|
||||
@@ -5511,6 +5599,7 @@ If mime_type is not provided, it will try to guess it.</p>
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Download a URL-backed attachment to the temp directory with the same retries as a track.</p>
|
||||
<p>A type equal to the suffix type can be a guess, also one a remote server sent, so the file signature replaces it.</p>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -5729,8 +5818,10 @@ If mime_type is not provided, it will try to guess it.</p>
|
||||
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">channels</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">joc</span><span class="o">=</span><span class="kc">None</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="n">descriptive</span><span class="o">=</span><span class="kc">False</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="o">**</span><span class="n">kwargs</span><span class="p">,</span>
|
||||
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a><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="n">bit_depth</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a> <span class="n">sample_rate</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
|
||||
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
@@ -5837,6 +5928,38 @@ not supported. All numbers and strings will be cast to float.</p>
|
||||
<code>False</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code>bit_depth</code>
|
||||
</td>
|
||||
<td>
|
||||
<code><span title="int">int</span> | None</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>Bits per sample, e.g. 24. A manifest rarely states it, so a service sets it.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<code>None</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code>sample_rate</code>
|
||||
</td>
|
||||
<td>
|
||||
<code><span title="int">int</span> | None</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>Samples per second in Hz, e.g. 96000.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<code>None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Note: If codec, bitrate, channels, or joc is not specified some checks may be
|
||||
@@ -5985,6 +6108,30 @@ recommended.</p>
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.resolution_label" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">resolution_label</span>
|
||||
|
||||
|
||||
<span class="doc doc-labels">
|
||||
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
|
||||
</span>
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.resolution_label" class="headerlink" title="Permanent link">¶</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">resolution_label</span><span class="p">(</span><span class="n">bit_depth</span><span class="p">,</span> <span class="n">sample_rate</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>The bit depth and sample rate in the form music services show, e.g. "24-bit / 96 kHz"; "" for neither.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.parse_channels" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">parse_channels</span>
|
||||
|
||||
@@ -8474,6 +8621,8 @@ nested saving and safer exists-checks.</p>
|
||||
<li>playlist: m3u8.model.Playlist - The primary track information.</li>
|
||||
<li>media: m3u8.model.Media - The audio/subtitle track information.</li>
|
||||
<li>segment_durations: list[int] - A list of each segment's duration.</li>
|
||||
<li>playlist_text: str - The media playlist, set by a service that has its text and no
|
||||
playlist URL. Its segment URIs resolve against the track URL.</li>
|
||||
<li>"dash" used by the DASH class.</li>
|
||||
<li>manifest: lxml.ElementTree - DASH MPD manifest.</li>
|
||||
<li>period: lxml.Element - The period of this track.</li>
|
||||
@@ -8482,6 +8631,11 @@ nested saving and safer exists-checks.</p>
|
||||
<li>timescale: int - The timescale of the track's segments.</li>
|
||||
<li>segment_durations: list[int] - A list of each segment's duration.</li>
|
||||
</ul>
|
||||
<p>A service can set:</p>
|
||||
<ul>
|
||||
<li>"own_stream_only": bool - Mux only the track of the same kind from the file: a video
|
||||
without the audio its file holds, or an audio track without the video in its file.</li>
|
||||
</ul>
|
||||
<p>You should not add, change, or remove any data within reserved keys.
|
||||
You may use their data, but note that these values can change or be removed
|
||||
at any point.</p>
|
||||
@@ -9044,6 +9198,46 @@ of <code>get_init_segment</code> to find the Key ID.</p>
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Track.held_playlist" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">held_playlist</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Track.held_playlist" class="headerlink" title="Permanent link">¶</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">held_playlist</span><span class="p">()</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>The HLS media playlist text the track holds: <code>data["hls"]["playlist_text"]</code>, else the <code>from_file</code> text.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Track.playlist_text" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">playlist_text</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Track.playlist_text" class="headerlink" title="Permanent link">¶</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">playlist_text</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>The HLS media playlist text the track holds, else the one at its URL; a response that is not ok raises.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Track.load_drm_from_playlist" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">load_drm_from_playlist</span>
|
||||
|
||||
@@ -9193,10 +9387,11 @@ is larger than it. Use a value of 20000 (20KB) or higher.</p>
|
||||
<p>Remux the track with FFmpeg <code>-c copy</code>.</p>
|
||||
<p>A given <code>bsf_v</code> goes into the same pass as <code>-bsf:v</code>, which normalises video VUI
|
||||
colour metadata without a second full-file remux. Repackaging is mandatory. The
|
||||
bitstream filter is best-effort: if the combined pass fails, and it is not the
|
||||
AAC-retry case, unshackle tries it again once without <code>bsf_v</code> so the remux still
|
||||
succeeds. Returns True if unshackle applied the requested <code>bsf_v</code> (always False
|
||||
when <code>bsf_v</code> is None, because the caller requested nothing).</p>
|
||||
bitstream filter is best-effort: if the combined pass fails, unshackle tries it again
|
||||
once without <code>bsf_v</code> so the remux still succeeds, and the caller falls back to
|
||||
<code>normalize_vui</code>. Returns True if unshackle applied
|
||||
the requested <code>bsf_v</code> (always False when <code>bsf_v</code> is None, because the caller
|
||||
requested nothing).</p>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -9482,6 +9677,26 @@ sorts "en-US" and "en-GB".</p>
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Tracks.drop" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">drop</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Tracks.drop" class="headerlink" title="Permanent link">¶</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">drop</span><span class="p">(</span><span class="n">ids</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Remove the video, audio and subtitle tracks whose id is in <code>ids</code>.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Tracks.filter" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">filter</span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user