Initial pages commit, using the wiki contents
This commit is contained in:
commit
5c7359365f
|
@ -0,0 +1,31 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>youtube-dl Frequently Asked Questions</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>youtube-dl Frequently Asked Questions</h1>
|
||||||
|
|
||||||
|
<h2>The program has stopped working. Please fix it.</h2>
|
||||||
|
|
||||||
|
<p>First, that is not a question. Second, when reporting this type of issue please make sure you're using the latest version, and mention the version you're using in the bug report. You should also copy the command line you're using to call the program, and the program output so I can see how it fails and have an example of a specific video that's giving you problems.</p>
|
||||||
|
|
||||||
|
<p>The preferred method to report bugs is to write me an e-mail. You can find my address in the <a href="http://rg03.wordpress.com/contact-me/">contact information page at rg03.wordpress.com</a>. Together with this, you should check if there's a similar recent issue reported in the issue tracker. If you decide to open a new issue or post a comment in an existing issue, mention that in the e-mail as well. Writing me by e-mail lets me answer you directly and I have your contact information, so I can get back to you for more information or ask you to test a solution for your problem.</p>
|
||||||
|
|
||||||
|
<h2>Can you please put the -b option back?</h2>
|
||||||
|
|
||||||
|
<p>Most people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the -b option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the -f option and youtube-dl will try to download it.</p>
|
||||||
|
|
||||||
|
<h2>I get HTTP error 402 when trying to download a video. What's this?</h2>
|
||||||
|
|
||||||
|
<p>Apparently YouTube requires you to pass a CAPTCHA test if you download too much. At this moment, there is no plan to solve this issue, as youtube-dl is a command line program that is many times used without X and in an unattended fashion, so there's no easy way of solving this, in my humble opinion. I have no plans to solve it at this moment, but let me know your ideas and code if you come up with something.</p>
|
||||||
|
|
||||||
|
<h2>I have downloaded a video but how can I play it?</h2>
|
||||||
|
|
||||||
|
<p>If you used youtube-dl to download a video and it wrote the video file to your hard drive, finishing with a completion message of 100%, the video is downloaded, so youtube-dl has finished its job and usually it's not to blame for problems that happen later. Not every video player supports FLV or MP4 files and every codec out there needed to play YouTube videos. In Linux, for example, I am generally pleased with <a href="http://www.mplayerhq.hu/">MPlayer</a>. In Windows, I tend to use <a href="http://www.videolan.org/">VLC</a>. Those usually work flawlessly.</p>
|
||||||
|
|
||||||
|
<h2>Sometimes the program does not download the best quality format</h2>
|
||||||
|
|
||||||
|
<p>This issue happens on YouTube and related to formats 34 and 18. Format 34 is, for many videos, 360p widescreen, and of higher quality than the same video in format 18. However, sometimes format 18 provides a better quality version, as format 34 appears to be just 240p for some videos. There is no plan to fix this. Currently the only way of finding out which version gives higher quality is to download a chunk of both formats and peek into the files themselves to find out, if you know how. As, in my experience, format 34 usually wins, and in many future videos uploaded in high definition formats it will be 360p, format 34 will remain as the format to download in case of doubt.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import hashlib
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Run command line and get output
|
||||||
|
def output(cmdline):
|
||||||
|
p = subprocess.Popen(cmdline, shell=True, stdout=subprocess.PIPE)
|
||||||
|
retval = p.communicate()[0]
|
||||||
|
p.wait()
|
||||||
|
return retval
|
||||||
|
|
||||||
|
# Read template page
|
||||||
|
template = file('index.html.in', 'r').read()
|
||||||
|
|
||||||
|
# Build replacement strings
|
||||||
|
version = output('cd ../master && git tag | tail -1').strip()
|
||||||
|
data = output('cd ../master && git show %s:youtube-dl' % version)
|
||||||
|
url = 'http://github.com/rg3/youtube-dl/raw/%s/youtube-dl' % version
|
||||||
|
md5sum = hashlib.md5(data).hexdigest()
|
||||||
|
sha1sum = hashlib.sha1(data).hexdigest()
|
||||||
|
sha256sum = hashlib.sha256(data).hexdigest()
|
||||||
|
template = template.replace('@PROGRAM_VERSION@', version)
|
||||||
|
template = template.replace('@PROGRAM_URL@', url)
|
||||||
|
template = template.replace('@PROGRAM_MD5SUM@', md5sum)
|
||||||
|
template = template.replace('@PROGRAM_SHA1SUM@', sha1sum)
|
||||||
|
template = template.replace('@PROGRAM_SHA256SUM@', sha256sum)
|
||||||
|
file('index.html', 'w').write(template)
|
|
@ -0,0 +1,101 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>youtube-dl</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>youtube-dl: Download videos from YouTube.com</h1>
|
||||||
|
|
||||||
|
<div class="note">(and more...)</div>
|
||||||
|
|
||||||
|
<h2>What is it?</h2>
|
||||||
|
|
||||||
|
<p><em>youtube-dl</em> is a small command-line program to download videos from YouTube.com and a few more sites. It requires the <a href="http://www.python.org/">Python interpreter</a>, version 2.x (x being at least 4), and it's not platform specific. It should work in your Unix box, in Windows or in Mac OS X. The latest version is <strong>2010.10.24</strong>. It's released to the public domain, which means you can modify it, redistribute it or use it however you like.</p>
|
||||||
|
|
||||||
|
<p>I'll try to keep it updated if YouTube.com changes the way you access their videos. After all, it's a simple and short program. However, I can't guarantee anything. If you detect it stops working, check for new versions and/or inform me about the problem, indicating the program version you are using. My contact information is at <a href="http://rg03.wordpress.com/contact-me/">rg03.wordpress.com</a>. If the program stops working and I can't solve the problem but you have a solution, I'd like to know it. If that happens and you feel you can maintain the program yourself, tell me.</p>
|
||||||
|
|
||||||
|
<p>Thanks for all the feedback received so far. I'm glad people find my program useful.</p>
|
||||||
|
|
||||||
|
<h2>Usage instructions</h2>
|
||||||
|
|
||||||
|
<p>In Windows, once you have installed the Python interpreter, save the program with the <em>.py</em> extension and put it somewhere in the PATH. Try to follow the <a href="windows.html">guide to install youtube-dl under Windows</a>.</p>
|
||||||
|
|
||||||
|
<p>In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, <em>/usr/local/bin</em>).</p>
|
||||||
|
|
||||||
|
<p>After that, you should be able to call it from the command line as <em>youtube-dl</em> or <em>youtube-dl.py</em>. I will use <em>youtube-dl</em> in the following examples. Usage instructions are easy. Use <em>youtube-dl</em> followed by a video URL or identifier. Example: <em>youtube-dl "http://www.youtube.com/watch?v=foobar"</em>. The video will be saved to the file <em>foobar.flv</em> in that example. As YouTube.com videos are usually in Flash Video format, their extension should be <em>flv</em>. In Linux and other unices, video players using a recent version of <em>ffmpeg</em> can play them. That includes VLC, MPlayer, etc. Those two work under Windows and other platforms, but you could also get a specific FLV player of your taste.</p>
|
||||||
|
|
||||||
|
<p>If you try to run the program and you receive an error message containing the keyword <em>SyntaxError</em> near the end, it means your Python interpreter is too old.</p>
|
||||||
|
|
||||||
|
<h2>More usage tips</h2>
|
||||||
|
|
||||||
|
<p>The program is usually invoked as <em>youtube-dl</em> followed by options and the video URLs. Listing all the options here would make this text too long, so you can run <em>youtube-dl --help</em> and get a summary of them. From that point on you can start experimenting with the different options yourself. The most common ones are -t (or -l) to include the video title in the file name. Also, the -o option can specify the output file name and path. It allows special character sequences that can be used as templates to be replaced. See the "Output template" section for more details.</p>
|
||||||
|
|
||||||
|
<h2>Download it</h2>
|
||||||
|
|
||||||
|
<p>Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called <em>Save Target As</em> or <em>Save Link As</em>, depending on the web browser you are using.</p>
|
||||||
|
|
||||||
|
<h3><a href="http://github.com/rg3/youtube-dl/raw/2010.10.24/youtube-dl">2010.10.24</a></h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><strong>MD5</strong>: 4408021502046e52bc3d3ddd95123d44</li>
|
||||||
|
<li><strong>SHA1</strong>: 5c5e68776be8eeefc2ddeeabccbc12185312fd69</li>
|
||||||
|
<li><strong>SHA256</strong>: 1ec91cd1d791c62777724fb650fde3d6da1ad5c86b4f46ec0368759ce7a7a381</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>FAQ</h2>
|
||||||
|
|
||||||
|
<p>The <a href="faq.html">Frequently Asked Questions</a> page contains answers to some common questions that pop up in my e-mail and in the <a href="http://github.com/rg3/youtube-dl/issues">issue tracker</a>. Be sure to check it before reporting problems.</p>
|
||||||
|
|
||||||
|
<h2>Supported sites</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>YouTube.com.</li>
|
||||||
|
<li>YouTube.com playlists (playlist URLs in "view_play_list" form).</li>
|
||||||
|
<li>YouTube.com searches, using the special keyword "ytsearch" as a form of URL, as in "ytsearch:cute kittens". Do not forget the quotes if you want to include spaces in your search. Other variants are "ytsearchN" to download more than the first result, with N being a number, and "ytsearchall".</li>
|
||||||
|
<li>metacafe.com.</li>
|
||||||
|
<li>Google Video.</li>
|
||||||
|
<li>Google Video searches ("gvsearch" keyword).</li>
|
||||||
|
<li>Photobucket videos.</li>
|
||||||
|
<li>Yahoo! video.</li>
|
||||||
|
<li>Yahoo! video searches ("ybsearch" keyword).</li>
|
||||||
|
<li>Dailymotion.</li>
|
||||||
|
<li>A generic downloader that works in some sites.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Proxy support</h2>
|
||||||
|
|
||||||
|
<p>youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in <em>http://proxy_machine_name:port/</em>.</p>
|
||||||
|
|
||||||
|
<h2>YouTube formats</h2>
|
||||||
|
|
||||||
|
<p>Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. Instead of keeping a video format table here, I will refer you to the <a href="http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs">list of YouTube formats on Wikipedia</a>.</p>
|
||||||
|
|
||||||
|
<h2>Output template</h2>
|
||||||
|
|
||||||
|
<p>The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in <em>youtube-dl -o funny_video.flv "http://some/video"</em>. However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format <strong>%(NAME)s</strong>. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><em>id</em>: The sequence will be replaced by the video identifier.</li>
|
||||||
|
<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>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>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>ord</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>%(title)s-%(id)s.%(ext)s</em>. You can specify your own.</p>
|
||||||
|
|
||||||
|
<h2>Authors</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Ricardo Garcia Gonzalez: program core, YouTube.com InfoExtractor, metacafe.com InfoExtractor and YouTube playlist InfoExtractor.</li>
|
||||||
|
<li>Danny Colligan: YouTube search InfoExtractor, ideas and patches.</li>
|
||||||
|
<li>Benjamin Johnson: Google Video InfoExtractor, Photobucket InfoExtractor, Yahoo! Video InfoExtractor, generic InfoExtractor, ideas, patches, etc.</li>
|
||||||
|
<li>Many other people contributing patches, code, ideas and kind messages. Too many to be listed here. You know who you are. Thank you very much.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="note">Copyright © 2006-2010 Ricardo Garcia Gonzalez</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>youtube-dl</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>youtube-dl: Download videos from YouTube.com</h1>
|
||||||
|
|
||||||
|
<div class="note">(and more...)</div>
|
||||||
|
|
||||||
|
<h2>What is it?</h2>
|
||||||
|
|
||||||
|
<p><em>youtube-dl</em> is a small command-line program to download videos from YouTube.com and a few more sites. It requires the <a href="http://www.python.org/">Python interpreter</a>, version 2.x (x being at least 4), and it's not platform specific. It should work in your Unix box, in Windows or in Mac OS X. The latest version is <strong>@PROGRAM_VERSION@</strong>. It's released to the public domain, which means you can modify it, redistribute it or use it however you like.</p>
|
||||||
|
|
||||||
|
<p>I'll try to keep it updated if YouTube.com changes the way you access their videos. After all, it's a simple and short program. However, I can't guarantee anything. If you detect it stops working, check for new versions and/or inform me about the problem, indicating the program version you are using. My contact information is at <a href="http://rg03.wordpress.com/contact-me/">rg03.wordpress.com</a>. If the program stops working and I can't solve the problem but you have a solution, I'd like to know it. If that happens and you feel you can maintain the program yourself, tell me.</p>
|
||||||
|
|
||||||
|
<p>Thanks for all the feedback received so far. I'm glad people find my program useful.</p>
|
||||||
|
|
||||||
|
<h2>Usage instructions</h2>
|
||||||
|
|
||||||
|
<p>In Windows, once you have installed the Python interpreter, save the program with the <em>.py</em> extension and put it somewhere in the PATH. Try to follow the <a href="windows.html">guide to install youtube-dl under Windows</a>.</p>
|
||||||
|
|
||||||
|
<p>In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, <em>/usr/local/bin</em>).</p>
|
||||||
|
|
||||||
|
<p>After that, you should be able to call it from the command line as <em>youtube-dl</em> or <em>youtube-dl.py</em>. I will use <em>youtube-dl</em> in the following examples. Usage instructions are easy. Use <em>youtube-dl</em> followed by a video URL or identifier. Example: <em>youtube-dl "http://www.youtube.com/watch?v=foobar"</em>. The video will be saved to the file <em>foobar.flv</em> in that example. As YouTube.com videos are usually in Flash Video format, their extension should be <em>flv</em>. In Linux and other unices, video players using a recent version of <em>ffmpeg</em> can play them. That includes VLC, MPlayer, etc. Those two work under Windows and other platforms, but you could also get a specific FLV player of your taste.</p>
|
||||||
|
|
||||||
|
<p>If you try to run the program and you receive an error message containing the keyword <em>SyntaxError</em> near the end, it means your Python interpreter is too old.</p>
|
||||||
|
|
||||||
|
<h2>More usage tips</h2>
|
||||||
|
|
||||||
|
<p>The program is usually invoked as <em>youtube-dl</em> followed by options and the video URLs. Listing all the options here would make this text too long, so you can run <em>youtube-dl --help</em> and get a summary of them. From that point on you can start experimenting with the different options yourself. The most common ones are -t (or -l) to include the video title in the file name. Also, the -o option can specify the output file name and path. It allows special character sequences that can be used as templates to be replaced. See the "Output template" section for more details.</p>
|
||||||
|
|
||||||
|
<h2>Download it</h2>
|
||||||
|
|
||||||
|
<p>Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called <em>Save Target As</em> or <em>Save Link As</em>, depending on the web browser you are using.</p>
|
||||||
|
|
||||||
|
<h3><a href="@PROGRAM_URL@">@PROGRAM_VERSION@</a></h3>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><strong>MD5</strong>: @PROGRAM_MD5SUM@</li>
|
||||||
|
<li><strong>SHA1</strong>: @PROGRAM_SHA1SUM@</li>
|
||||||
|
<li><strong>SHA256</strong>: @PROGRAM_SHA256SUM@</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>FAQ</h2>
|
||||||
|
|
||||||
|
<p>The <a href="faq.html">Frequently Asked Questions</a> page contains answers to some common questions that pop up in my e-mail and in the <a href="http://github.com/rg3/youtube-dl/issues">issue tracker</a>. Be sure to check it before reporting problems.</p>
|
||||||
|
|
||||||
|
<h2>Supported sites</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>YouTube.com.</li>
|
||||||
|
<li>YouTube.com playlists (playlist URLs in "view_play_list" form).</li>
|
||||||
|
<li>YouTube.com searches, using the special keyword "ytsearch" as a form of URL, as in "ytsearch:cute kittens". Do not forget the quotes if you want to include spaces in your search. Other variants are "ytsearchN" to download more than the first result, with N being a number, and "ytsearchall".</li>
|
||||||
|
<li>metacafe.com.</li>
|
||||||
|
<li>Google Video.</li>
|
||||||
|
<li>Google Video searches ("gvsearch" keyword).</li>
|
||||||
|
<li>Photobucket videos.</li>
|
||||||
|
<li>Yahoo! video.</li>
|
||||||
|
<li>Yahoo! video searches ("ybsearch" keyword).</li>
|
||||||
|
<li>Dailymotion.</li>
|
||||||
|
<li>A generic downloader that works in some sites.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Proxy support</h2>
|
||||||
|
|
||||||
|
<p>youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in <em>http://proxy_machine_name:port/</em>.</p>
|
||||||
|
|
||||||
|
<h2>YouTube formats</h2>
|
||||||
|
|
||||||
|
<p>Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. Instead of keeping a video format table here, I will refer you to the <a href="http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs">list of YouTube formats on Wikipedia</a>.</p>
|
||||||
|
|
||||||
|
<h2>Output template</h2>
|
||||||
|
|
||||||
|
<p>The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in <em>youtube-dl -o funny_video.flv "http://some/video"</em>. However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format <strong>%(NAME)s</strong>. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><em>id</em>: The sequence will be replaced by the video identifier.</li>
|
||||||
|
<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>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>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>ord</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>%(title)s-%(id)s.%(ext)s</em>. You can specify your own.</p>
|
||||||
|
|
||||||
|
<h2>Authors</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Ricardo Garcia Gonzalez: program core, YouTube.com InfoExtractor, metacafe.com InfoExtractor and YouTube playlist InfoExtractor.</li>
|
||||||
|
<li>Danny Colligan: YouTube search InfoExtractor, ideas and patches.</li>
|
||||||
|
<li>Benjamin Johnson: Google Video InfoExtractor, Photobucket InfoExtractor, Yahoo! Video InfoExtractor, generic InfoExtractor, ideas, patches, etc.</li>
|
||||||
|
<li>Many other people contributing patches, code, ideas and kind messages. Too many to be listed here. You know who you are. Thank you very much.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="note">Copyright © 2006-2010 Ricardo Garcia Gonzalez</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,25 @@
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
margin-left: 10%;
|
||||||
|
margin-right: 10%;
|
||||||
|
margin-top: 2ex;
|
||||||
|
margin-bottom: 3ex;
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.note {
|
||||||
|
text-align: center;
|
||||||
|
font-size: x-small;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
color: #006699;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
color: #006699;
|
||||||
|
}
|
||||||
|
tt {
|
||||||
|
background: #dddddd;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>youtube-dl under Windows</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>youtube-dl under Windows</h1>
|
||||||
|
|
||||||
|
<p>The following text explains how to run <em>youtube-dl</em> under <em>Microsoft Windows</em>. The first part describes some generic instructions about installing a command line program, followed by specific instructions on running <em>youtube-dl</em>.</p>
|
||||||
|
|
||||||
|
<h2>Disclaimer</h2>
|
||||||
|
|
||||||
|
<p>User <em>nishad</em> provides a standalone executable for youtube-dl. With it, you don't need the Python interpreter. In addition, he has created an optional graphical user interface to ease using the program. The following instructions apply if you want to install the official version of youtube-dl with the Python interpreter, and still apply if you want to install the standalone executable. In that case, you can skip the step of installing the Python interpreter.</p>
|
||||||
|
|
||||||
|
<p>His contributions can be downloaded from <a href="http://www.himili.com/blog/downloads/youtube-video-downloader/">http://www.himili.com/blog/downloads/youtube-video-downloader/</a>. If you use these versions and find a problem, contact him first. He will redirect real youtube-dl issues to me.</p>
|
||||||
|
|
||||||
|
<h2>Preparing to install a command line program</h2>
|
||||||
|
|
||||||
|
<p>The Windows command line interpreter is a program called <em>cmd</em>. It can be found somewhere in the applications menu, but many people prefer to run it by clicking on <em>Start</em> > <em>Run</em> and then typing <tt>cmd</tt> and pressing the enter key. It's very similar to the DOS command line interpreter, if you're old enough to remember it. When you launch it, it will be usually running at your home directory. It's <tt>C:\Documents and Settings\<username></tt> usually, where <tt><username></tt> is your user name in that computer, and it will be waiting for you to input commands followed by the enter key. The text to the left of the cursor usually indicates the so-called <em>current working directory</em>, followed by a greater than (>) symbol. You can go up the directory hierarchy with the command <tt>cd ..</tt>, change the current working drive letter by typing its name as a command, like <tt>D:</tt>, and you can go to a subdirectory (or subfolder, as Windows prefers to call it) by typing the command <tt>cd</tt> followed by its path, maybe using double quotes if the name contains spaces, like in <tt>cd "My Documents\My Porn\My Hardcore Orgies\Animals"</tt>. Just kidding. The cd command stands for <em>change [to] directory</em>.</p>
|
||||||
|
|
||||||
|
<p>The goal here is to use <em>youtube-dl.py</em> as one of those system commands. The problem is that <em>youtube-dl.py</em> is a simple text file you will download from a webserver and will be stored in some obscure place in your hard drive. If you want to type <em>youtube-dl.py</em> in the command line interpreter and have it run the program, you will have to give the command line interpreter at least a clue about where to find the program, or it will find <em>youtube-dl.py</em> to be a meaningless name.</p>
|
||||||
|
|
||||||
|
<p>This is where the PATH environment variable is important. Environment variables are pairs of names and values that are available to any program that is running on the computer. This environment variable is specially useful for the command line interpreter, as its value is a list of folders where system commands and programs can be found. So what we will do is to create a personal folder where we can drop command line programs, and add that folder to the list of folders in the PATH environment variable.</p>
|
||||||
|
|
||||||
|
<p>So let's go to our home directory. Our home directory or folder is the one that contains folders such as <em>My Documents</em> or the <em>Desktop</em> folder. However, for some reason, Microsoft didn't make it simple to reach that directory. One would expect that going to the <em>My Documents</em> folder and going up one level, you'd reach the home directory, but that's not the case. The Windows explorer will take you to a different place if you go up from the <em>My Documents</em> folder. One straightforward way of going there is to click on <em>Start</em> > <em>Run</em> and typing <tt>explorer "%USERPROFILE%"</tt> literally, followed by the enter key. Once there, right click on an empty space and choose to create a new folder, giving it an appropriate name like <em>Commands</em> or something similar. Double click to enter the newly created folder, and don't close that explorer window yet.</p>
|
||||||
|
|
||||||
|
<p>Now click with the right mouse button on any <em>My Computer</em> icon, and choose <em>Properties</em>. There should be an <em>Advanced Options</em> tab, which has a <em>Environment Variables</em> button at the bottom, which you have to press. In the window that will be opened you can set your user or personal environment variables, and the system environment variables if you have enough security privileges. Modifying the personal environment variables will be enough for our case.</p>
|
||||||
|
|
||||||
|
<p>First, check to see if you have a PATH environment variable among your personal variables. Usually, you won't have it, so you'll have to create a new variable, with the name PATH, and use <tt>%USERPROFILE%\Commands</tt>, literally, as the variable value. Be careful when typing that and don't forget to change the word <em>Commands</em> to the appropriate name if you didn't use that name when creating the folder. In the case a PATH environment variable already exists, it should contain one or more directories or folders, separated by semicolon characters. In that case, simply append <tt>;%USERPROFILE%\Commands</tt> at the end. Note the semicolon character used as a separator. It's also a good idea to create a personal variable named HOME with the value <tt>%USERPROFILE%</tt> at this moment. Finally, accept all the changes. Programs started from now on will have the new folder in the PATH environment variable.</p>
|
||||||
|
|
||||||
|
<p>Up to this point, we have created a <em>Commands</em> folder where we can drop command line programs and later use them in the command line interpreter, because the interpreter will be able to find them. These steps were all generic, and you can drop any command line program in there. In the next step, we'll drop <em>youtube-dl.py</em> in it.</p>
|
||||||
|
|
||||||
|
<h2>Running youtube-dl.py</h2>
|
||||||
|
|
||||||
|
<p>If the <a href="http://www.python.org/">Python</a> interpreter is not installed in your system, install it now. There is a download section in the previous webpage that lets you download a Windows installer to run Python programs. Remember you have to get version 2.x, with x being at least 4.</p>
|
||||||
|
|
||||||
|
<p>Now go to the <em>youtube-dl</em> webpage and download the program to your Windows Desktop. Under Windows, it's important that you use the .py suffix in the program name, so be sure to set it when downloading, or at least rename it after the download.</p>
|
||||||
|
|
||||||
|
<p>Right click on it and select <em>Cut</em>. Go to the explorer Window we left open previously, right click on an emtpy space and choose <em>Paste</em>. Tadah! Installation finished.</p>
|
||||||
|
|
||||||
|
<p>Now let's suppose I want to download a video to my Windows Desktop. Piece of cake: go to <em>Start</em> > <em>Run</em>, type <tt>cmd</tt> and press the enter key. Type the command <tt>cd desktop</tt> and then type the command <tt>youtube-dl.py "<url>"</tt>, where <tt><url></tt> is a YouTube video URL you can copy from your web browser program address bar, and paste it to the command line interpreter window by right clicking and choosing <em>Paste</em>, for example. Remember commands are always followed by pressing the enter key in the command line interpreter.</p>
|
||||||
|
|
||||||
|
<h2>One final tip</h2>
|
||||||
|
|
||||||
|
<p>If you are going to store all your videos in a fixed folder, some people find it handy to create a shortcut to <em>cmd</em> that starts with the current working directory set to that folder, so as to avoid typing a <em>cd</em> command each time they launch <em>cmd</em>. To do this, right click on an empty space in your Desktop and choose to create a new shortcut. The program you want to launch is <em>cmd</em> and you can give the shortcut any name you want. After it's created, right click on it, choose <em>Properties</em> and, in the <tt>Shortcut</tt> tab, which should be the one selected by default, there's an option called <tt>Start in:</tt>. Put something like <tt>%USERPROFILE%\Desktop</tt> or <tt>%USERPROFILE%\My Documents</tt> in it. Some people also prefer to put that shortcut in the quickstart bar to the right of the <em>Start</em> button. Whatever floats your boat.</p>
|
||||||
|
|
||||||
|
<h2>Conclusions</h2>
|
||||||
|
|
||||||
|
<p>The hardest part is preparing the Windows system to run user command line programs, as it's not initially prepared to do that. Linux, MacOSX and other systems are, in my humble opinion, better prepared, out of the box, for downloading and running your own command line programs easily.</p>
|
||||||
|
|
||||||
|
<p>A remaining question is how to play those videos. You'll need a video player capable of playing FLV videos. I know a couple of them, but you should better ask a Windows expert about it. At least the video files will be in your hard drive, so sooner or later you'll be able to play them.</p>
|
||||||
|
|
||||||
|
<p>Good luck!</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue