You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
8.4 KiB

  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
  7. <title>youtube-dl: Download videos from YouTube.com</title>
  8. <style type="text/css"><!--
  9. body {
  10. font-family: sans-serif;
  11. font-size: small;
  12. }
  13. h1 {
  14. text-align: center;
  15. text-decoration: underline;
  16. color: #006699;
  17. }
  18. h2 {
  19. color: #006699;
  20. }
  21. p {
  22. text-align: justify;
  23. margin-left: 5%;
  24. margin-right: 5%;
  25. }
  26. ul {
  27. margin-left: 5%;
  28. margin-right: 5%;
  29. list-style-type: square;
  30. }
  31. li {
  32. margin-bottom: 0.5ex;
  33. }
  34. .smallnote {
  35. font-size: x-small;
  36. text-align: center;
  37. }
  38. --></style>
  39. </head>
  40. <body>
  41. <h1>youtube-dl: Download videos from YouTube.com</h1>
  42. <p class="smallnote">(and more...)</p>
  43. <h2>What is it?</h2>
  44. <p><em>youtube-dl</em> is a small command-line program to download videos
  45. from YouTube.com. It requires the <a href="http://www.python.org/">Python
  46. interpreter</a>, version 2.4 or later, and it's not platform specific.
  47. It should work in your Unix box, in Windows or in Mac OS X. The latest version
  48. is <strong>@PROGRAM_VERSION@</strong>. It's released to the public domain,
  49. which means you can modify it, redistribute it or use it however you like.</p>
  50. <p>I'll try to keep it updated if YouTube.com changes the way you access
  51. their videos. After all, it's a simple and short program. However, I can't
  52. guarantee anything. If you detect it stops working, check for new versions
  53. and/or inform me about the problem, indicating the program version you
  54. are using. If the program stops working and I can't solve the problem but
  55. you have a solution, I'd like to know it. If that happens and you feel you
  56. can maintain the program yourself, tell me. My contact information is
  57. at <a href="http://freshmeat.net/~rg3/">freshmeat.net</a>.</p>
  58. <p>Thanks for all the feedback received so far. I'm glad people find my
  59. program useful.</p>
  60. <h2>Usage instructions</h2>
  61. <p>In Windows, once you have installed the Python interpreter, save the
  62. program with the <em>.py</em> extension and put it somewhere in the PATH.
  63. Try to follow the
  64. <a href="http://rg03.wordpress.com/youtube-dl-under-windows-xp/">guide to
  65. install youtube-dl under Windows XP</a>.</p>
  66. <p>In Unix, download it, give it execution permission and copy it to one
  67. of the PATH directories (typically, <em>/usr/local/bin</em>).</p>
  68. <p>After that, you should be able to call it from the command line as
  69. <em>youtube-dl</em> or <em>youtube-dl.py</em>. I will use <em>youtube-dl</em>
  70. in the following examples. Usage instructions are easy. Use <em>youtube-dl</em>
  71. followed by a video URL or identifier. Example: <em>youtube-dl
  72. "http://www.youtube.com/watch?v=foobar"</em>. The video will be saved
  73. to the file <em>foobar.flv</em> in that example. As YouTube.com
  74. videos are in Flash Video format, their extension should be <em>flv</em>.
  75. In Linux and other unices, video players using a recent version of
  76. <em>ffmpeg</em> can play them. That includes MPlayer, VLC, etc. Those two
  77. work under Windows and other platforms, but you could also get a
  78. specific FLV player of your taste.</p>
  79. <p>If you try to run the program and you receive an error message containing the
  80. keyword <em>SyntaxError</em> near the end, it means your Python interpreter
  81. is too old.</p>
  82. <h2>More usage tips</h2>
  83. <ul>
  84. <li>You can change the file name of the video using the -o option, like in
  85. <em>youtube-dl -o vid.flv "http://www.youtube.com/watch?v=foobar"</em>.
  86. Read the <em>Output template</em> section for more details on this.</li>
  87. <li>Some videos require an account to be downloaded, mostly because they're
  88. flagged as mature content. You can pass the program a username and password
  89. for a YouTube.com account with the -u and -p options, like <em>youtube-dl
  90. -u myusername -p mypassword "http://www.youtube.com/watch?v=foobar"</em>.</li>
  91. <li>The account data can also be read from the user .netrc file by indicating
  92. the -n or --netrc option. The machine name is <em>youtube</em> in that
  93. case.</li>
  94. <li>The <em>simulate mode</em> (activated with -s or --simulate) can be used
  95. to just get the real video URL and use it with a download manager if you
  96. prefer that option.</li>
  97. <li>The <em>quiet mode</em> (activated with -q or --quiet) can be used to
  98. supress all output messages. This allows, in systems featuring /dev/stdout
  99. and other similar special files, outputting the video data to standard output
  100. in order to pipe it to another program without interferences.</li>
  101. <li>The program can be told to simply print the final video URL to standard
  102. output using the -g or --get-url option.</li>
  103. <li>In a similar line, the -e or --get-title option tells the program to print
  104. the video title.</li>
  105. <li>The default filename is <em>video_id.flv</em>. But you can also use the
  106. video title in the filename with the -t or --title option, or preserve the
  107. literal title in the filename with the -l or --literal option.</li>
  108. <li>You can make the program append <em>&amp;fmt=something</em> to the URL
  109. by using the -f or --format option. This makes it possible to download high
  110. quality versions of the videos when available.</li>
  111. <li><em>youtube-dl</em> can attempt to download the best quality version of
  112. a video by using the -b or --best-quality option.</li>
  113. <li><em>youtube-dl</em> can attempt to download the mobile quality version of
  114. a video by using the -m or --mobile-version option.</li>
  115. <li>Normally, the program will stop on the first error, but you can tell it
  116. to attempt to download every video with the -i or --ignore-errors option.</li>
  117. <li><em>youtube-dl</em> honors the <em>http_proxy</em> environment variable
  118. if you want to use a proxy. Set it to something like
  119. <em>http://proxy.example.com:8080</em>, and do not leave the <em>http://</em>
  120. prefix out.</li>
  121. <li>You can get the program version by calling it as <em>youtube-dl
  122. -v</em> or <em>youtube-dl --version</em>.</li>
  123. <li>For usage instructions, use <em>youtube-dl -h</em> or <em>youtube-dl
  124. --help.</em></li>
  125. <li>You can cancel the program at any time pressing Ctrl+C. It may print
  126. some error lines saying something about <em>KeyboardInterrupt</em>.
  127. That's ok.</li>
  128. </ul>
  129. <h2>Download it</h2>
  130. <p>Note that if you directly click on these hyperlinks, your web browser will
  131. most likely display the program contents. It's usually better to
  132. right-click on it and choose the appropriate option, normally called <em>Save
  133. Target As</em> or <em>Save Link As</em>, depending on the web browser you
  134. are using.</p>
  135. <p><a href="youtube-dl">@PROGRAM_VERSION@</a></p>
  136. <ul>
  137. <li><strong>MD5</strong>: @PROGRAM_MD5SUM@</li>
  138. <li><strong>SHA1</strong>: @PROGRAM_SHA1SUM@</li>
  139. <li><strong>SHA256</strong>: @PROGRAM_SHA256SUM@</li>
  140. </ul>
  141. <h2>Output template</h2>
  142. <p>The -o option allows users to indicate a template for the output file names.
  143. The basic usage is not to set any template arguments when downloading a single
  144. file, like in <em>youtube-dl -o funny_video.flv 'http://some/video'</em>.
  145. However, it may contain special sequences that will be replaced when
  146. downloading each video. The special sequences have the format
  147. <strong>%(NAME)s</strong>. To clarify, that's a percent symbol followed by a
  148. name in parenthesis, followed by a lowercase S. Allowed names are:</p>
  149. <ul>
  150. <li><em>id</em>: The sequence will be replaced by the video identifier.</li>
  151. <li><em>url</em>: The sequence will be replaced by the video URL.</li>
  152. <li><em>uploader</em>: The sequence will be replaced by the nickname of the
  153. person who uploaded the video.</li>
  154. <li><em>title</em>: The sequence will be replaced by the literal video
  155. title.</li>
  156. <li><em>stitle</em>: The sequence will be replaced by a simplified video
  157. title.</li>
  158. <li><em>ext</em>: The sequence will be replaced by the appropriate
  159. extension.</li>
  160. </ul>
  161. <p>As you may have guessed, the default template is <em>%(id)s.%(ext)s</em>.
  162. When some command line options are used, it's replaced by other templates like
  163. <em>%(title)s-%(id)s.%(ext)s</em>. You can specify your own.</p>
  164. <h2>Authors</h2>
  165. <ul>
  166. <li>Ricardo Garcia Gonzalez: program core, YouTube.com InfoExtractor,
  167. metacafe.com InfoExtractor and YouTube playlist InfoExtractor.</li>
  168. <li>Many other people contributing patches, code, ideas and kind messages. Too
  169. many to be listed here. You know who you are. Thank you very much.</li>
  170. </ul>
  171. <p class="smallnote">Copyright &copy; 2006-2007 Ricardo Garcia Gonzalez</p>
  172. </body>
  173. </html>