1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

Document --restrict-filenames, remove stitle

This commit is contained in:
Philipp Hagemeister 2012-11-27 16:06:59 +01:00
parent 2811949f4c
commit 81db2d8040

View File

@ -90,14 +90,20 @@ Unsupported, see https://github.com/rg3/youtube-dl/issues/300
<li><em>url</em>: The sequence will be replaced by the video URL.</li>
<li><em>uploader</em>: The sequence will be replaced by the nickname of the person who uploaded the video.</li>
<li><em>upload_date</em>: The sequence will be replaced by the upload date in YYYYMMDD format.</li>
<li><em>title</em>: The sequence will be replaced by the literal video title.</li>
<li><em>stitle</em>: The sequence will be replaced by a simplified video title, restricted to alphanumeric characters and dashes.</li>
<li><em>title</em>: The sequence will be replaced by the video title.</li>
<li><em>ext</em>: The sequence will be replaced by the appropriate extension (like <em>flv</em> or <em>mp4</em>).</li>
<li><em>epoch</em>: The sequence will be replaced by the Unix epoch when creating the file.</li>
<li><em>autonumber</em>: The sequence will be replaced by a five-digit number that will be increased with each download, starting at zero.</li>
</ul>
<p>As you may have guessed, the default template is <em>%(id)s.%(ext)s</em>. When some command line options are used, it's replaced by other templates like <em>%(stitle)s-%(id)s.%(ext)s</em>. You can specify your own.</p>
<p>The current default template is <em>%(id)s.%(ext)s</em>, but that will be switchted to <em>%(title)s-%(id)s.%(ext)s</em> (which can be requested with <code>-t</code> at the moment).</p>
<p>In some cases, you don't want special characters such as 中, spaces, or &amp;, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the <code>--restrict-filenames</code> flag to get a shorter title:</p>
<p><code style="white-space: pre;"><span style="color: #888;">$</span> youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc
<span style="color: #004;">youtube-dl test video ''_ä↭𝕐.mp4</span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #666;"># All kinds of weird characters</span>
<span style="color: #888;">$</span> youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames
<span style="color: #004;">youtube-dl_test_video_.mp4</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #666;"># A simple file name</span></code></p>
<h1 id="d8">Configuration</h1>