mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-15 05:25:12 +00:00
Deployed 7a5ad502 with MkDocs version: 1.6.1
This commit is contained in:
@@ -2772,9 +2772,9 @@ Optional metadata keywords such as <code>album_artist</code>, <code>genre</code>
|
||||
class for the current list.</p>
|
||||
<p>From <code>get_tracks()</code>, give one <code>Audio</code> track for each codec and bitrate you offer
|
||||
for the song. The framework then selects one with its usual audio options.
|
||||
A <code>Song</code> skips the muxer, so restore the real container suffix on the track path
|
||||
in <code>on_track_downloaded</code>. The <strong>MUSIC_EXAMPLE</strong> service shows the full music
|
||||
surface.</p>
|
||||
A <code>Song</code> skips the muxer: the framework reads the codec from the downloaded file
|
||||
and gives the file its container, so a service does not rename the track path.
|
||||
The <strong>MUSIC_EXAMPLE</strong> service shows the full music surface.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2911,7 +2911,9 @@ final audio file under that suffix.
|
||||
You can set these fields in <code>get_tracks()</code> too, and a remote client gets them back.</p>
|
||||
<p>The tagger also falls back to <code>Song.data</code> for fields the constructor did not get, such
|
||||
as the composer or a full release date. It reads the top level of that dict and a
|
||||
nested <code>metadata</code> sub-dict, with the nested keys winning, so either shape works.</p>
|
||||
nested <code>metadata</code> sub-dict, with the nested keys winning, so either shape works. The keys
|
||||
that a remote client gets back are <code>MUSIC_DATA_KEYS</code> in <code>unshackle/core/titles/music.py</code>,
|
||||
for example <code>artists</code> (a list) and <code>replaygain_track_gain</code>.</p>
|
||||
<p>From <code>get_tracks()</code>, a music service gives <strong>one <code>Audio</code> track for each codec and
|
||||
bitrate it offers for a <code>Song</code></strong>. The framework then selects one with its usual audio
|
||||
options, <code>-a</code>/<code>--acodec</code> and <code>--abitrate</code>, and its usual audio sorting. A movie or an
|
||||
@@ -2922,15 +2924,9 @@ separates a hi-res FLAC from a CD FLAC, and the audio sort already ranks it.</p>
|
||||
music-specific service API and no separate music download loop. The
|
||||
<code>GROUP_AUDIO_DOWNLOADS</code> flag, <code>get_music_track_options</code> and <code>get_music_collection_label</code>
|
||||
no longer exist, and a music service does not need them.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Restore the container in <code>on_track_downloaded</code></p>
|
||||
<p>Every track downloads to a temp file named <code>Audio_<id>.mp4</code> whatever it holds, and
|
||||
the final move keeps that suffix. A <code>Song</code> skips the muxer, so its download <strong>is</strong>
|
||||
the delivered file, and the tagger picks its metadata format from the suffix.
|
||||
Rename the track path to the true container in <code>on_track_downloaded</code>, or a FLAC
|
||||
lands as an untaggable <code>.mp4</code>. The event fires twice, once before decryption and
|
||||
once at the end, so wait until <code>track.drm</code> is clear before you rename.</p>
|
||||
</div>
|
||||
<p>Core picks the container of a <code>Song</code> from the codec in the downloaded file, so a music
|
||||
service does not rename the track path. Read
|
||||
<a href="../../guide/output-and-naming/#music-output-files">Music output files</a>.</p>
|
||||
<p>The <strong>MUSIC_EXAMPLE</strong> reference service, at <code>unshackle/services/MUSIC_EXAMPLE/</code>, shows
|
||||
the full music surface.</p>
|
||||
</div>
|
||||
|
||||
@@ -2703,7 +2703,7 @@ download. For example, <code>dovi_tool</code> only matters if you download Dolby
|
||||
<tr>
|
||||
<td>MP4Box (GPAC)</td>
|
||||
<td><code>MP4Box</code></td>
|
||||
<td>Muxing DTS:X Profile 2 (DTS-UHD) and MPEG-H audio, and 3D video</td>
|
||||
<td>Muxing DTS:X Profile 2 (DTS-UHD) and MPEG-H audio, and 3D video; remuxing AC-4, MPEG-H and DTS-UHD music</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dovi_tool</td>
|
||||
@@ -2758,7 +2758,7 @@ download. For example, <code>dovi_tool</code> only matters if you download Dolby
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="admonition info">
|
||||
<p class="admonition-title">MP4Box is only used for DTS:X Profile 2, MPEG-H and 3D video</p>
|
||||
<p class="admonition-title">MP4Box is only used for DTS:X Profile 2, MPEG-H, AC-4 music and 3D video</p>
|
||||
<p>Titles with DTS:X Profile 2 (DTS-UHD) or MPEG-H audio, or a stereoscopic 3D video track, mux to
|
||||
MP4; everything else muxes to MKV with <code>mkvmerge</code>. Install with <code>apt install gpac</code>.</p>
|
||||
</div>
|
||||
|
||||
@@ -4205,15 +4205,16 @@ window, or the whole file when the track is one file.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Music is never muxed</p>
|
||||
<p>A song skips the muxer. unshackle keeps the container that the service
|
||||
delivered, such as <code>.flac</code>, <code>.m4a</code>, or <code>.mp3</code>, and writes the metadata into that file.
|
||||
<p>A song skips the muxer. unshackle remuxes it into the container of its codec,
|
||||
such as <code>.flac</code>, <code>.m4a</code>, or <code>.mp3</code>, and writes the metadata into that file.
|
||||
Read <a href="../output-and-naming/#music-output-files">Music output files</a>.</p>
|
||||
</div>
|
||||
<h3 id="after-the-download">After the download<a class="headerlink" href="#after-the-download" title="Permanent link">¶</a></h3>
|
||||
<p><code>--postscript "<command>"</code> runs your own command once per output file, with unshackle's
|
||||
metadata substituted into <code>{variable}</code> placeholders. It is repeatable, and it replaces the
|
||||
<code>post_scripts</code> config for that run. No <code>success</code> post-script operates under <code>--no-mux</code>, because
|
||||
that run writes no muxed output. A <code>failure</code> post-script still operates if the download fails.</p>
|
||||
that run writes no muxed output; a song is the exception, because <code>--no-mux</code> does not apply to it.
|
||||
A <code>failure</code> post-script still operates if the download fails.</p>
|
||||
<div class="language-shell highlight"><span class="filename">Hand each finished file to an uploader</span><pre><span></span><code><span id="__span-41-1"><a id="__codelineno-41-1" name="__codelineno-41-1" href="#__codelineno-41-1"></a>unshackle<span class="w"> </span>dl<span class="w"> </span>--postscript<span class="w"> </span><span class="s2">"python /opt/upload.py {filepath} --service={service}"</span><span class="w"> </span>EXAMPLE<span class="w"> </span><span class="m">81234567</span>
|
||||
</span></code></pre></div>
|
||||
<p><code>--no-postscript</code> operates the run with no post-script at all. It silences the <code>post_scripts</code>
|
||||
|
||||
@@ -3074,11 +3074,13 @@ standard height near it, such as 1600x900, keeps its own height. <code>dl -q</co
|
||||
<p>Episodes and songs are always foldered. unshackle writes movies directly into the output directory <em>unless</em> you define a <code>movies</code> folder template (or a single-string <code>folder</code> template, which folders every kind). Set one if you want each movie in its own directory.</p>
|
||||
</div>
|
||||
<h2 id="music-output-files">Music output files<a class="headerlink" href="#music-output-files" title="Permanent link">¶</a></h2>
|
||||
<p>A song does not go through the muxer. Music services deliver audio in a fragmented MP4, which is
|
||||
not a music file. Its header states a length of zero, so a player stops after the first fragment.
|
||||
FLAC inside an MP4 is also not a FLAC stream. A rename cannot correct either fault, so unshackle
|
||||
remuxes each downloaded audio track into the container of its codec, then moves the file to its
|
||||
final path.</p>
|
||||
<p>A song does not go through the muxer. Music services deliver audio as a fragmented MP4, a WebM
|
||||
file or a plain audio file, and every download has a <code>.mp4</code> name. A fragmented MP4 header states a
|
||||
length of zero, so a player stops after the first fragment. A rename cannot correct this, so
|
||||
unshackle remuxes each downloaded audio track into the container of its codec, then moves the file
|
||||
to its final path.</p>
|
||||
<p>FFprobe reads the codec from the downloaded file. The codec that the service declares is used only
|
||||
when FFprobe cannot read the file.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -3092,6 +3094,14 @@ final path.</p>
|
||||
<td><code>.flac</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PCM, integer, 24-bit or less</td>
|
||||
<td><code>.flac</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PCM, more than 24-bit or floating point</td>
|
||||
<td><code>.wav</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Opus</td>
|
||||
<td><code>.opus</code></td>
|
||||
</tr>
|
||||
@@ -3104,13 +3114,24 @@ final path.</p>
|
||||
<td><code>.mp3</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AAC, ALAC, and all other codecs</td>
|
||||
<td>DTS, DTS-HD</td>
|
||||
<td><code>.mka</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AAC, ALAC, Dolby Digital, Dolby Digital Plus, and all other codecs</td>
|
||||
<td><code>.m4a</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>unshackle re-encodes FLAC in this step. The audio does not change, but the new file states its
|
||||
true length. A plain copy cannot, because it keeps the source header and the zero in it.</p>
|
||||
<p>unshackle encodes FLAC and PCM to FLAC in this step. The audio does not change, but the new file
|
||||
states its true length. A plain copy cannot, because it keeps the source header and the zero in it.
|
||||
FLAC cannot hold floating-point PCM, and FFmpeg writes 32-bit FLAC only as an experimental feature,
|
||||
so that audio goes to <code>.wav</code>.</p>
|
||||
<p>FFmpeg writes DTS into MP4 with the wrong codec entry, so DTS goes to Matroska. AC-4, MPEG-H and
|
||||
DTS:X Profile 2 (DTS-UHD) go through MP4Box, because FFmpeg cannot write them into MP4. MP4Box
|
||||
needs <a href="../../getting-started/installation/#recommended-and-optional-tools">GPAC</a>.</p>
|
||||
<p>With <code>--sample</code>, the same step cuts the song to the sample window. If the window starts after the
|
||||
end of the song, unshackle shows a warning and keeps the full download.</p>
|
||||
<p>unshackle writes no <code>.mkv</code> file for music, and the <a href="#muxing-options">muxing options</a> below do not
|
||||
apply.</p>
|
||||
<p>The <code>songs</code> output template names the file. The <code>albums</code> folder template names the folder
|
||||
@@ -3122,12 +3143,17 @@ around it.</p>
|
||||
</span></code></pre></div>
|
||||
<h3 id="music-metadata">Music metadata<a class="headerlink" href="#music-metadata" title="Permanent link">¶</a></h3>
|
||||
<p>After the file moves, unshackle writes the metadata into the audio file. It uses Vorbis
|
||||
comments for FLAC and Ogg, ID3 frames for MP3, and MP4 atoms for M4A. The tags hold the
|
||||
track title, artist, album artist, track and disc numbers, date, genre, ISRC, UPC,
|
||||
copyright, and record label. When <code>tag</code> and <code>tag_group_name</code> are set, unshackle also writes the group
|
||||
name into a <code>GROUP</code> tag.</p>
|
||||
comments for FLAC and Ogg, ID3 frames for MP3 and WAV, MP4 atoms for M4A, and Matroska tags for
|
||||
MKA. The tags hold the track title, artist, album artist, track and disc numbers, date, genre,
|
||||
ISRC, UPC, copyright, and record label. When the service gives them, unshackle also writes each
|
||||
artist of a song with several artists into <code>ARTISTS</code>, and the ReplayGain values into
|
||||
<code>REPLAYGAIN_*</code> tags. An Opus file gets no <code>REPLAYGAIN_*</code> tags, because RFC 7845 advises against
|
||||
them in Opus files. When <code>tag</code> and <code>tag_group_name</code> are set, unshackle also writes the group name
|
||||
into a <code>GROUP</code> tag.</p>
|
||||
<p>unshackle embeds cover art when the service gives an artwork URL. It downloads the image
|
||||
and puts it in the file.</p>
|
||||
and puts it in the file. With no artwork URL, it uses the first image attachment of the song. It
|
||||
converts a WebP image to JPEG. It skips an image larger than 16 MiB, the FLAC limit, with a
|
||||
warning. An MKA file gets no cover art.</p>
|
||||
<p>unshackle writes lyrics when the service supplies them: a <code>LYRICS</code> Vorbis comment for FLAC, a
|
||||
<code>USLT</code> frame for MP3, and a <code>©lyr</code> atom for M4A. Ogg uses the same <code>LYRICS</code> field as
|
||||
FLAC. unshackle does not write synchronized lyrics (<code>SYLT</code>).</p>
|
||||
@@ -3136,9 +3162,9 @@ the audio, for example <code>08.Get.Lucky.lrc</code> next to <code>08.Get.Lucky.
|
||||
the timed lines from that file. The file also comes back to the client from a remote server.</p>
|
||||
<p>A metadata fault does not stop the run. The file is already in place, so unshackle writes a
|
||||
warning and continues.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title"><code>--no-mux</code> leaves music files untagged</p>
|
||||
<p><a href="../cli-reference/#output-muxing-files"><code>--no-mux</code></a> moves each downloaded track file to the output path without the tagging step. A music file from such a run holds only the metadata that the service put in it.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title"><code>--no-mux</code> does not change music output</p>
|
||||
<p>A song has no mux step, so <a href="../cli-reference/#output-muxing-files"><code>--no-mux</code></a> does not apply to it. The song gets the same file name, metadata, cover art and lyrics file as in a run without the flag.</p>
|
||||
</div>
|
||||
<h2 id="muxing-options">Muxing options<a class="headerlink" href="#muxing-options" title="Permanent link">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
@@ -3403,7 +3429,7 @@ wrong colours.</p>
|
||||
<li>Descriptive audio gets the visually-impaired flag. SDH subtitles get the hearing-impaired flag. Forced subtitles get the forced flag.</li>
|
||||
<li>unshackle writes the chapters from the title's chapter list (see <a href="#chapters-naming">Chapters</a> below).</li>
|
||||
</ul>
|
||||
<p>The <code>--no-mux</code> flag skips muxing entirely and writes the individual track files, each with a track-type suffix, into the same output/folder structure. A track that shaka-packager decrypts has its date set to 1970-01-01; other tracks keep the date of the source file.</p>
|
||||
<p>The <code>--no-mux</code> flag skips muxing entirely and writes the individual track files, each with a track-type suffix, into the same output/folder structure. An audio track in an MP4 container gets the <code>.m4a</code> extension. A track that shaka-packager decrypts has its date set to 1970-01-01; other tracks keep the date of the source file.</p>
|
||||
<h2 id="sample-files">Sample files<a class="headerlink" href="#sample-files" title="Permanent link">¶</a></h2>
|
||||
<p><a href="../cli-reference/#output-muxing-files"><code>--sample</code></a> and <code>--include-sample</code> write a sample into a
|
||||
<code>Sample</code> folder inside the output folder of the title. The sample keeps the filename of the
|
||||
|
||||
BIN
Binary file not shown.
+263
-11
@@ -1970,6 +1970,34 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.Codec" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> Codec
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label=" Codec">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.Codec.from_ffprobe" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> from_ffprobe
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -2014,6 +2042,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.probe_stream" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> probe_stream
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -2025,6 +2064,28 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.ffmpeg_music_container" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> ffmpeg_music_container
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.mp4box_music_container" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> mp4box_music_container
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3575,6 +3636,34 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.Codec" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> Codec
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label=" Codec">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.Codec.from_ffprobe" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> from_ffprobe
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3619,6 +3708,17 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.probe_stream" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> probe_stream
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -3630,6 +3730,28 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.ffmpeg_music_container" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> ffmpeg_music_container
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#unshackle.core.tracks.Audio.mp4box_music_container" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> mp4box_music_container
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -5482,13 +5604,12 @@ If mime_type is not provided, it will try to guess it.</p>
|
||||
<code>codec</code>
|
||||
</td>
|
||||
<td>
|
||||
<code><span title="typing.Optional">Optional</span>[<span title="unshackle.core.tracks.audio.Audio.Codec">Codec</span>]</code>
|
||||
<code><span title="typing.Optional">Optional</span>[<a class="autorefs autorefs-internal" title="<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">Codec</span> (<code>unshackle.core.tracks.audio.Audio.Codec</code>)" href="#unshackle.core.tracks.Audio.Codec">Codec</a>]</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>An Audio.Codec enum representing the audio codec.
|
||||
If not specified, unshackle uses MediaInfo to get the codec
|
||||
after it downloads the track.</p>
|
||||
<p>An Audio.Codec enum representing the audio codec. The music remux
|
||||
replaces it with the codec FFprobe reads from the downloaded file.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -5612,6 +5733,76 @@ recommended.</p>
|
||||
|
||||
|
||||
|
||||
<div class="doc doc-object doc-class">
|
||||
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.Codec" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">Codec</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.Codec" class="headerlink" title="Permanent link">¶</a></h3>
|
||||
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
<p class="doc doc-class-bases">
|
||||
Bases: <code><span title="str">str</span></code>, <code><span title="enum.Enum">Enum</span></code></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="doc doc-children">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h4 id="unshackle.core.tracks.Audio.Codec.from_ffprobe" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">from_ffprobe</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.Codec.from_ffprobe" class="headerlink" title="Permanent link">¶</a></h4>
|
||||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">from_ffprobe</span><span class="p">(</span><span class="n">codec_name</span><span class="p">,</span> <span class="n">profile</span><span class="o">=</span><span class="s1">''</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Map an FFprobe <code>codec_name</code> to a codec, or None for one core does not name.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
@@ -5723,22 +5914,83 @@ float, so this adds its figures: "5.1.4" -> 10.0.</p>
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.probe_stream" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">probe_stream</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.probe_stream" 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">probe_stream</span><span class="p">()</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>FFprobe codec fields of the first audio track plus the file <code>duration</code>; {} when it cannot probe.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.to_music_container" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">to_music_container</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.to_music_container" 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">to_music_container</span><span class="p">()</span>
|
||||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">to_music_container</span><span class="p">(</span><span class="n">start</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">duration</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Remux the track into the container of its codec, as a standalone audio file.</p>
|
||||
<p>Music titles never reach the muxer, so the downloaded file is the delivered file, and
|
||||
after decryption that is still a fragmented MP4. Its header states a length of zero, so
|
||||
a player stops after the first fragment. FLAC inside an MP4 is also not a FLAC stream.
|
||||
A rename cannot correct either fault. Returns True once the new file replaces the
|
||||
downloaded one; every failure raises.</p>
|
||||
<p>Remux the track into the container of the codec FFprobe reads from the file, cut to the sample window.</p>
|
||||
<p>The declared codec is used only when FFprobe cannot read the file. Every failure raises and keeps the
|
||||
downloaded file.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.ffmpeg_music_container" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">ffmpeg_music_container</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.ffmpeg_music_container" 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">ffmpeg_music_container</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">stream</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="n">duration</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Remux with FFmpeg. FLAC is encoded, never copied: FFmpeg's FLAC muxer writes a real sample count
|
||||
only from an encoder. Float PCM and PCM above 24 bits go to WAV: FLAC has no float samples, and FFmpeg
|
||||
writes 32-bit FLAC only as an experimental feature. 16- and 24-bit float, which FFmpeg cannot write,
|
||||
widen to 32-bit float. DTS goes to Matroska, because FFmpeg writes it into
|
||||
MP4 with an mp4a sample entry. Only AAC, ALAC and AC-3 take the ipod muxer (the M4A brand).</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="unshackle.core.tracks.Audio.mp4box_music_container" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">mp4box_music_container</span>
|
||||
|
||||
|
||||
<a href="#unshackle.core.tracks.Audio.mp4box_music_container" 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">mp4box_music_container</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="n">duration</span><span class="p">)</span>
|
||||
</span></code></pre></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Rewrite the track as an unfragmented .m4a with MP4Box, for the codecs FFmpeg cannot write into MP4.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2770,7 +2770,8 @@ environment variable inside your script rather than putting it in the <code>comm
|
||||
<h2 id="limitations">Limitations<a class="headerlink" href="#limitations" title="Permanent link">¶</a></h2>
|
||||
<ul>
|
||||
<li>No <code>success</code> post-script operates under <code>--no-mux</code> or <code>--skip-dl</code>, because neither writes a
|
||||
muxed output. A <code>failure</code> post-script still runs under <code>--no-mux</code> if the download itself fails.</li>
|
||||
muxed output. A song is the exception: <code>--no-mux</code> does not apply to it, so its post-scripts
|
||||
operate. A <code>failure</code> post-script still runs under <code>--no-mux</code> if the download itself fails.</li>
|
||||
<li><code>failure</code> post-scripts only operate in <code>file</code> mode.</li>
|
||||
<li>There is no webhook sender. Call <code>curl</code> from a script instead.</li>
|
||||
<li>Script output is not captured. Redirect it inside your own script if you want a log.</li>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+38
-38
@@ -2,154 +2,154 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/creating-a-service/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/service-architecture/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/authentication/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/dashboard/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/endpoints/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/errors/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/job-lifecycle/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/quickstart/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/dev/rest-api/remote-sessions/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/getting-started/configuration-file/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/getting-started/installation/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/getting-started/quickstart/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/cli-reference/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/downloading/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/drm-and-cdm/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/output-and-naming/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/proxies-and-vpn/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/subtitles/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/troubleshooting/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/guide/vaults/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/api/config/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/api/drm/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/api/service/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/api/titles/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/api/tracks/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/directories/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/download/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/drm/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/example/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/misc/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/network/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/output/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/post-scripts/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/services/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://docs.unshackle.dev/reference/configuration/vaults/</loc>
|
||||
<lastmod>2026-11-14</lastmod>
|
||||
<lastmod>2026-11-15</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
Binary file not shown.
Reference in New Issue
Block a user