4 youtube-dl - download videos from youtube.com
8 youtube-dl [options] url ...
12 youtube-dl is a script to download videos from youtube.com.
14 Once it is installed in your system, you should be able to call it from
15 the command line. Usage instructions are easy. Use youtube-dl followed
16 by a video URL or identifier. As an example, consider:
18 youtube-dl "http://www.youtube.com/watch?v=foobar"
20 The video will be saved to the file C<foobar.flv> in that example. Many
21 YouTube.com videos are in Flash Video format and their extension would
22 be C<flv>. Other videos are encoded in H.264 and these usually have the
23 extension C<mp4>. In Linux and other unices, video players using a
24 recent version of ffmpeg can play them. That includes MPlayer, VLC,
29 B<youtube-dl> accepts options in the following categories
35 Print help text and exit.
39 Print program version and exit.
43 Update this program to the latest stable version.
45 =item -i, --ignore-errors
47 Ignore errors during download and continue processing.
49 =item -r B<L>, --rate-limit=B<L>
51 Limit the download speed to the specified maximum B<L> (e.g., 50k or 44.6m).
53 =item -R B<R>, --retries=B<R>
55 Number B<R> of retries for a given download (default is 10).
57 =item --playlist-start=B<N>
59 The number B<N> of the video in a playlist where we should start downlading
62 =item --playlist-end=B<N>
64 The number B<N> of the video in a playlist where we should stop downloading
65 (default is -1, which stands for the last video in the playlist).
67 =item --dump-user-agent
69 Display how youtube-dl will identify itself (the User-Agent string) to the
72 =item -u B<UN>, --username=B<UN>
74 Specify the youtube account username B<UN>. Some videos require an
75 account to be downloaded, mostly because they're flagged as mature
78 =item -p B<PW>, --password=B<PW>
80 Like the username, specifies the account password to be B<PW>.
84 Get authentication data from the standard unix .netrc file on the user's
85 home directory. The machine name is youtube regarding this usage.
87 =item -f B<FMT>, --format=B<FMT>
89 Specify the video format (quality) in which to download the video.
91 For youtube.com, in particular, the meaning of the format codes is given as:
95 =item WebM video at 480p: 43
97 =item WebM video at 720p: 45
99 =item H264 video in MP4 container at 480p: 18
101 =item H264 video in MP4 container at 720p: 22
103 =item H264 video in MP4 container at 1080p: 37
105 =item H264 video in FLV container at 360p: 34
107 =item H264 video in FLV container at 480p: 35
109 =item H263 video at 240p: 5
115 Note that not all videos are available in all formats and that other
116 sites supported by B<youtube-dl> may have different conventions for
119 By default, youtube-dl will download the best available format; if you want
120 to download the worst format to save bandwidth and time, use C<-f> I<worst>.
124 Downloads all formats for which a video may be available.
126 =item --max-quality=B<FMT>
128 Limit the maximum quality of the videos to downloads to B<FMT>.
132 Activates quiet mode, avoiding many messages being written to the
137 Simulate the operation, but do not download the video. Useful for
142 Simulate the operation, like quiet mode, but show the URL that would be
143 used to download the video. Can be used with other download tools like
146 =item -e, --get-title
148 Simulate the operation, like quiet mode, but show the title of the video
149 that would be downloaded.
151 =item --get-thumbnail
153 Simulate the operation, like quiet mode, but print the URL of of the video's
156 =item --get-description
158 Simulate the operation, like quiet mode, but print the description of the
163 Simulate the operation, like quiet mode, but print the output filename.
167 Do not print the progress bar during downloads.
169 =item --console-title
171 If possible, set the title of the console window with the progress of the
176 Use the title of the video in the file name used to download the video.
180 Use the literal title of the video in file name used to download the
181 video. Can contain "weird" characters that are not filtered like with
184 =item -A, --auto-number
186 When downloading multiple videos from a playlist, automatically number them,
187 in sequence, starting from 00000.
189 =item -o B<TPL>, --output=B<TPL>
191 Specify a template B<TPL> for the names of the files to be created when
192 they are downloaded. The default filename is video_id.flv. But you can
193 also use the video title in the filename with the C<-t> or C<--title>
194 option, or preserve the literal title in the filename with the C<-l> or
197 =item -a B<F>, --batch-file=B<F>
199 Specify the name of a file containing URLs of videos to download from
200 youtube in batch mode. The file must contain one URL per line.
202 =item -w, --no-overwrites
204 Do no overwrite already existing files.
208 Resume partially downloaded files.
212 Store the received cookies to file B<F> (the "cookie jar").
216 Do not append the I<.part> suffix do files that have not yet been completed.
220 Do not use the I<Last-modified> header to set the file modification time.
222 =item --extract-audio
224 Create an audio-only file extracted from the video downloaded. Requires that
225 ffmpeg and ffprobe be installed.
227 =item --audio-format=B<FORMAT>
229 Set the audio format to be used for the extraction. Possible values are
230 I<best>, I<aac>, I<mp3>, with I<best> being the default.
234 =head1 OUTPUT TEMPLATE
236 The -o option allows users to indicate a template for the output file
237 names. The basic usage is not to set any template arguments when
238 downloading a single file, like in youtube-dl -o funny_video.flv
239 "http://some/video". However, it may contain special sequences that will
240 be replaced when downloading each video.
242 The special sequences have the format C<%(NAME)s>. To clarify, that's a
243 percent symbol followed by a name in parenthesis, followed by a
244 lowercase S. Allowed names are:
250 The sequence will be replaced by the video identifier.
254 The sequence will be replaced by the video URL.
258 The sequence will be replaced by the nickname of the person who uploaded
263 The sequence will be replaced by the literal video title.
267 The sequence will be replaced by a simplified video title, restricted to
268 alphanumeric characters and dashes.
272 The sequence will be replaced by the appropriate extension (like C<flv>
277 The sequence will be replaced by the Unix epoch when creating the file.
281 As you may have guessed, the default template is C<%(id)s.%(ext)s>. When
282 some command line options are used, it's replaced by other templates
283 like C<%(title)s-%(id)s.%(ext)s>. You can specify your own.
287 youtube-dl was written by Ricardo Garcia Gonzalez and many contributors
288 from all around the internet. This manpage was written by Rogerio Brito
289 <rbrito@users.sf.net>.