ddcebcdf55bbbc8e643dc789b39581ce27715686
[youtube-dl] / index.html.in
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
43 <p class="smallnote">(and more...)</p>
44
45 <h2>What is it?</h2>
46
47 <p><em>youtube-dl</em> is a small command-line program to download videos
48 from YouTube.com. It requires the <a href="http://www.python.org/">Python
49 interpreter</a>, version 2.4 or later, and it's not platform specific.
50 It should work in your Unix box, in Windows or in Mac OS X. The latest version
51 is <strong>@PROGRAM_VERSION@</strong>. It's released to the public domain,
52 which means you can modify it, redistribute it or use it however you like.</p>
53
54 <p>I'll try to keep it updated if YouTube.com changes the way you access
55 their videos. After all, it's a simple and short program. However, I can't
56 guarantee anything. If you detect it stops working, check for new versions
57 and/or inform me about the problem, indicating the program version you
58 are using. If the program stops working and I can't solve the problem but
59 you have a solution, I'd like to know it. If that happens and you feel you
60 can maintain the program yourself, tell me. My contact information is
61 at <a href="http://freshmeat.net/~rg3/">freshmeat.net</a>.</p>
62
63 <p>Thanks for all the feedback received so far. I'm glad people find my
64 program useful.</p>
65
66 <h2>Usage instructions</h2>
67
68 <p>In Windows, once you have installed the Python interpreter, save the
69 program with the <em>.py</em> extension and put it somewhere in the PATH.
70 Try to follow the
71 <a href="http://rg03.wordpress.com/youtube-dl-under-windows-xp/">guide to
72 install youtube-dl under Windows XP</a>.</p>
73
74 <p>In Unix, download it, give it execution permission and copy it to one
75 of the PATH directories (typically, <em>/usr/local/bin</em>).</p>
76
77 <p>After that, you should be able to call it from the command line as
78 <em>youtube-dl</em> or <em>youtube-dl.py</em>. I will use <em>youtube-dl</em>
79 in the following examples. Usage instructions are easy. Use <em>youtube-dl</em>
80 followed by a video URL or identifier. Example: <em>youtube-dl
81 "http://www.youtube.com/watch?v=foobar"</em>. The video will be saved
82 to the file <em>foobar.flv</em> in that example. As YouTube.com
83 videos are in Flash Video format, their extension should be <em>flv</em>.
84 In Linux and other unices, video players using a recent version of
85 <em>ffmpeg</em> can play them. That includes MPlayer, VLC, etc. Those two
86 work under Windows and other platforms, but you could also get a
87 specific FLV player of your taste.</p>
88
89 <p>If you try to run the program and you receive an error message containing the
90 keyword <em>SyntaxError</em> near the end, it means your Python interpreter
91 is too old.</p>
92
93 <h2>More usage tips</h2>
94
95 <ul>
96
97 <li>You can change the file name of the video using the -o option, like in
98 <em>youtube-dl -o vid.flv "http://www.youtube.com/watch?v=foobar"</em>.
99 Read the <a href="#otpl">Output template</a> section for more details on
100 this.</li>
101
102 <li>Some videos require an account to be downloaded, mostly because they're
103 flagged as mature content. You can pass the program a username and password
104 for a YouTube.com account with the -u and -p options, like <em>youtube-dl
105 -u myusername -p mypassword "http://www.youtube.com/watch?v=foobar"</em>.</li>
106
107 <li>The account data can also be read from the user .netrc file by indicating
108 the -n or --netrc option. The machine name is <em>youtube</em> in that
109 case.</li>
110
111 <li>The <em>simulate mode</em> (activated with -s or --simulate) can be used
112 to just get the real video URL and use it with a download manager if you
113 prefer that option.</li>
114
115 <li>The <em>quiet mode</em> (activated with -q or --quiet) can be used to
116 supress all output messages. This allows, in systems featuring /dev/stdout
117 and other similar special files, outputting the video data to standard output
118 in order to pipe it to another program without interferences.</li>
119
120 <li>The program can be told to simply print the final video URL to standard
121 output using the -g or --get-url option.</li>
122
123 <li>In a similar line, the -e or --get-title option tells the program to print
124 the video title.</li>
125
126 <li>The default filename is <em>video_id.flv</em>. But you can also use the
127 video title in the filename with the -t or --title option, or preserve the
128 literal title in the filename with the -l or --literal option.</li>
129
130 <li>You can make the program append <em>&amp;fmt=something</em> to the URL
131 by using the -f or --format option. This makes it possible to download high
132 quality versions of the videos when available.</li>
133
134 <li>The -b or --best-quality option is an alias for -f 18.</li>
135
136 <li>The -m or --mobile-version option is an alias for -f 17.</li>
137
138 <li>Normally, the program will stop on the first error, but you can tell it
139 to attempt to download every video with the -i or --ignore-errors option.</li>
140
141 <li>The -a or --batch-file option lets you specify a file to read URLs from.
142 The file must contain one URL per line.</li>
143
144 <li>For YouTube, you can also use the URL of a playlist, and it will download
145 all the videos in that playlist.</li>
146
147 <li>For YouTube, you can also use the special word <em>ytsearch</em> to
148 download search results. With <em>ytsearch</em> it will download the
149 first search result. With <em>ytsearchN</em>, where N is a number, it
150 will download the first N results. With <em>ytsearchall</em> it will
151 download every result for that search. In most systems you'll need to
152 use quotes for multiple words. Example: <em>youtube-dl "ytsearch3:cute
153 kittens"</em>.
154
155 <li><em>youtube-dl</em> honors the <em>http_proxy</em> environment variable
156 if you want to use a proxy. Set it to something like
157 <em>http://proxy.example.com:8080</em>, and do not leave the <em>http://</em>
158 prefix out.</li>
159
160 <li>You can get the program version by calling it as <em>youtube-dl
161 -v</em> or <em>youtube-dl --version</em>.</li>
162
163 <li>For usage instructions, use <em>youtube-dl -h</em> or <em>youtube-dl
164 --help.</em></li>
165
166 <li>You can cancel the program at any time pressing Ctrl+C. It may print
167 some error lines saying something about <em>KeyboardInterrupt</em>.
168 That's ok.</li>
169
170 </ul>
171
172 <h2>Download it</h2>
173
174 <p>Note that if you directly click on these hyperlinks, your web browser will
175 most likely display the program contents. It's usually better to
176 right-click on it and choose the appropriate option, normally called <em>Save
177 Target As</em> or <em>Save Link As</em>, depending on the web browser you
178 are using.</p>
179
180 <p><a href="youtube-dl">@PROGRAM_VERSION@</a></p>
181 <ul>
182         <li><strong>MD5</strong>: @PROGRAM_MD5SUM@</li>
183         <li><strong>SHA1</strong>: @PROGRAM_SHA1SUM@</li>
184         <li><strong>SHA256</strong>: @PROGRAM_SHA256SUM@</li>
185 </ul>
186
187 <h2 id="otpl">Output template</h2>
188
189 <p>The -o option allows users to indicate a template for the output file names.
190 The basic usage is not to set any template arguments when downloading a single
191 file, like in <em>youtube-dl -o funny_video.flv 'http://some/video'</em>.
192 However, it may contain special sequences that will be replaced when
193 downloading each video. The special sequences have the format
194 <strong>%(NAME)s</strong>. To clarify, that's a percent symbol followed by a
195 name in parenthesis, followed by a lowercase S. Allowed names are:</p>
196
197 <ul>
198 <li><em>id</em>: The sequence will be replaced by the video identifier.</li>
199 <li><em>url</em>: The sequence will be replaced by the video URL.</li>
200 <li><em>uploader</em>: The sequence will be replaced by the nickname of the
201 person who uploaded the video.</li>
202 <li><em>title</em>: The sequence will be replaced by the literal video
203 title.</li>
204 <li><em>stitle</em>: The sequence will be replaced by a simplified video
205 title, restricted to alphanumeric characters and dashes.</li>
206 <li><em>ext</em>: The sequence will be replaced by the appropriate
207 extension (like <em>flv</em> or <em>mp4</em>).</li>
208 </ul>
209
210 <p>As you may have guessed, the default template is <em>%(id)s.%(ext)s</em>.
211 When some command line options are used, it's replaced by other templates like
212 <em>%(title)s-%(id)s.%(ext)s</em>. You can specify your own.</p>
213
214 <h2>Authors</h2>
215
216 <ul>
217 <li>Ricardo Garcia Gonzalez: program core, YouTube.com InfoExtractor,
218 metacafe.com InfoExtractor and YouTube playlist InfoExtractor.</li>
219 <li>Danny Colligan: YouTube search InfoExtractor, ideas and patches.</li>
220 <li>Many other people contributing patches, code, ideas and kind messages. Too
221 many to be listed here. You know who you are. Thank you very much.</li>
222 </ul>
223
224 <p class="smallnote">Copyright &copy; 2006-2007 Ricardo Garcia Gonzalez</p>
225 </body>
226 </html>