]> Raphaël G. Git Repositories - youtubedl/blob - README.txt
debian/rules: Remove repackaging need: Upstream adopted a new strategy.
[youtubedl] / README.txt
1 NAME
2 ====
3
4 youtube-dl
5
6 SYNOPSIS
7 ========
8
9 youtube-dl [OPTIONS] URL [URL...]
10
11 DESCRIPTION
12 ===========
13
14 youtube-dl is a small command-line program to download videos from
15 YouTube.com and a few more sites. It requires the Python interpreter,
16 version 2.x (x being at least 6), and it is not platform specific. It
17 should work in your Unix box, in Windows or in Mac OS X. It is released
18 to the public domain, which means you can modify it, redistribute it or
19 use it however you like.
20
21 OPTIONS
22 =======
23
24 -h, --help print this help text and exit
25 --version print program version and exit
26 -U, --update update this program to latest version
27 -i, --ignore-errors continue on download errors
28 -r, --rate-limit LIMIT download rate limit (e.g. 50k or 44.6m)
29 -R, --retries RETRIES number of retries (default is 10)
30 --buffer-size SIZE size of download buffer (e.g. 1024 or 16k) (default
31 is 1024)
32 --no-resize-buffer do not automatically adjust the buffer size. By
33 default, the buffer size is automatically resized
34 from an initial value of SIZE.
35 --dump-user-agent display the current browser identification
36 --user-agent UA specify a custom user agent
37 --list-extractors List all supported extractors and the URLs they
38 would handle
39
40 Video Selection:
41 ----------------
42
43 --playlist-start NUMBER playlist video to start at (default is 1)
44 --playlist-end NUMBER playlist video to end at (default is last)
45 --match-title REGEX download only matching titles (regex or caseless
46 sub-string)
47 --reject-title REGEX skip download for matching titles (regex or
48 caseless sub-string)
49 --max-downloads NUMBER Abort after downloading NUMBER files
50
51 Filesystem Options:
52 -------------------
53
54 -t, --title use title in file name
55 --id use video ID in file name
56 -l, --literal [deprecated] alias of --title
57 -A, --auto-number number downloaded files starting from 00000
58 -o, --output TEMPLATE output filename template. Use %(title)s to get the
59 title, %(uploader)s for the uploader name,
60 %(autonumber)s to get an automatically incremented
61 number, %(ext)s for the filename extension,
62 %(upload_date)s for the upload date (YYYYMMDD),
63 %(extractor)s for the provider (youtube, metacafe,
64 etc), %(id)s for the video id and %% for a literal
65 percent. Use - to output to stdout. Can also be
66 used to download to a different directory, for
67 example with -o '/my/downloads/%(uploader)s/%(title
68 )s-%(id)s.%(ext)s' .
69 --restrict-filenames Restrict filenames to only ASCII characters, and
70 avoid "&" and spaces in filenames
71 -a, --batch-file FILE file containing URLs to download ('-' for stdin)
72 -w, --no-overwrites do not overwrite files
73 -c, --continue resume partially downloaded files
74 --no-continue do not resume partially downloaded files (restart
75 from beginning)
76 --cookies FILE file to read cookies from and dump cookie jar in
77 --no-part do not use .part files
78 --no-mtime do not use the Last-modified header to set the file
79 modification time
80 --write-description write video description to a .description file
81 --write-info-json write video metadata to a .info.json file
82
83 Verbosity / Simulation Options:
84 -------------------------------
85
86 -q, --quiet activates quiet mode
87 -s, --simulate do not download the video and do not write anything
88 to disk
89 --skip-download do not download the video
90 -g, --get-url simulate, quiet but print URL
91 -e, --get-title simulate, quiet but print title
92 --get-thumbnail simulate, quiet but print thumbnail URL
93 --get-description simulate, quiet but print video description
94 --get-filename simulate, quiet but print output filename
95 --get-format simulate, quiet but print output format
96 --no-progress do not print progress bar
97 --console-title display progress in console titlebar
98 -v, --verbose print various debugging information
99
100 Video Format Options:
101 ---------------------
102
103 -f, --format FORMAT video format code
104 --all-formats download all available video formats
105 --prefer-free-formats prefer free video formats unless a specific one is
106 requested
107 --max-quality FORMAT highest quality format to download
108 -F, --list-formats list all available formats (currently youtube only)
109 --write-srt write video closed captions to a .srt file
110 (currently youtube only)
111 --srt-lang LANG language of the closed captions to download
112 (optional) use IETF language tags like 'en'
113
114 Authentication Options:
115 -----------------------
116
117 -u, --username USERNAME account username
118 -p, --password PASSWORD account password
119 -n, --netrc use .netrc authentication data
120
121 Post-processing Options:
122 ------------------------
123
124 -x, --extract-audio convert video files to audio-only files (requires
125 ffmpeg or avconv and ffprobe or avprobe)
126 --audio-format FORMAT "best", "aac", "vorbis", "mp3", "m4a", or "wav";
127 best by default
128 --audio-quality QUALITY ffmpeg/avconv audio quality specification, insert a
129 value between 0 (better) and 9 (worse) for VBR or a
130 specific bitrate like 128K (default 5)
131 -k, --keep-video keeps the video file on disk after the post-
132 processing; the video is erased by default
133
134 CONFIGURATION
135 =============
136
137 You can configure youtube-dl by placing default arguments (such as
138 --extract-audio --no-mtime to always extract the audio and not copy the
139 mtime) into /etc/youtube-dl.conf and/or ~/.local/config/youtube-dl.conf.
140
141 OUTPUT TEMPLATE
142 ===============
143
144 The -o option allows users to indicate a template for the output file
145 names. The basic usage is not to set any template arguments when
146 downloading a single file, like in
147 youtube-dl -o funny_video.flv "http://some/video". However, it may
148 contain special sequences that will be replaced when downloading each
149 video. The special sequences have the format %(NAME)s. To clarify, that
150 is a percent symbol followed by a name in parenthesis, followed by a
151 lowercase S. Allowed names are:
152
153 - id: The sequence will be replaced by the video identifier.
154 - url: The sequence will be replaced by the video URL.
155 - uploader: The sequence will be replaced by the nickname of the
156 person who uploaded the video.
157 - upload_date: The sequence will be replaced by the upload date in
158 YYYYMMDD format.
159 - title: The sequence will be replaced by the video title.
160 - ext: The sequence will be replaced by the appropriate extension
161 (like flv or mp4).
162 - epoch: The sequence will be replaced by the Unix epoch when creating
163 the file.
164 - autonumber: The sequence will be replaced by a five-digit number
165 that will be increased with each download, starting at zero.
166
167 The current default template is %(id)s.%(ext)s, but that will be
168 switchted to %(title)s-%(id)s.%(ext)s (which can be requested with -t at
169 the moment).
170
171 In some cases, you don't want special characters such as 中, spaces, or
172 &, such as when transferring the downloaded filename to a Windows system
173 or the filename through an 8bit-unsafe channel. In these cases, add the
174 --restrict-filenames flag to get a shorter title:
175
176 $ youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc
177 youtube-dl test video ''_ä↭𝕐.mp4 # All kinds of weird characters
178 $ youtube-dl --get-filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames
179 youtube-dl_test_video_.mp4 # A simple file name
180
181 FAQ
182 ===
183
184 Can you please put the -b option back?
185
186 Most people asking this question are not aware that youtube-dl now
187 defaults to downloading the highest available quality as reported by
188 YouTube, which will be 1080p or 720p in some cases, so you no longer
189 need the -b option. For some specific videos, maybe YouTube does not
190 report them to be available in a specific high quality format you''re
191 interested in. In that case, simply request it with the -f option and
192 youtube-dl will try to download it.
193
194 I get HTTP error 402 when trying to download a video. What's this?
195
196 Apparently YouTube requires you to pass a CAPTCHA test if you download
197 too much. We''re considering to provide a way to let you solve the
198 CAPTCHA, but at the moment, your best course of action is pointing a
199 webbrowser to the youtube URL, solving the CAPTCHA, and restart
200 youtube-dl.
201
202 I have downloaded a video but how can I play it?
203
204 Once the video is fully downloaded, use any video player, such as vlc or
205 mplayer.
206
207 The links provided by youtube-dl -g are not working anymore
208
209 The URLs youtube-dl outputs require the downloader to have the correct
210 cookies. Use the --cookies option to write the required cookies into a
211 file, and advise your downloader to read cookies from that file. Some
212 sites also require a common user agent to be used, use --dump-user-agent
213 to see the one in use by youtube-dl.
214
215 ERROR: no fmt_url_map or conn information found in video info
216
217 youtube has switched to a new video info format in July 2011 which is
218 not supported by old versions of youtube-dl. You can update youtube-dl
219 with sudo youtube-dl --update.
220
221 ERROR: unable to download video
222
223 youtube requires an additional signature since September 2012 which is
224 not supported by old versions of youtube-dl. You can update youtube-dl
225 with sudo youtube-dl --update.
226
227 SyntaxError: Non-ASCII character
228
229 The error
230
231 File "youtube-dl", line 2
232 SyntaxError: Non-ASCII character '\x93' ...
233
234 means you're using an outdated version of Python. Please update to
235 Python 2.6 or 2.7.
236
237 What is this binary file? Where has the code gone?
238
239 Since June 2012 (#342) youtube-dl is packed as an executable zipfile,
240 simply unzip it (might need renaming to youtube-dl.zip first on some
241 systems) or clone the git repository, as laid out above. If you modify
242 the code, you can run it by executing the __main__.py file. To recompile
243 the executable, run make youtube-dl.
244
245 The exe throws a Runtime error from Visual C++
246
247 To run the exe you need to install first the Microsoft Visual C++ 2008
248 Redistributable Package.
249
250 COPYRIGHT
251 =========
252
253 youtube-dl is released into the public domain by the copyright holders.
254
255 This README file was originally written by Daniel Bolton
256 (https://github.com/dbbolton) and is likewise released into the public
257 domain.
258
259 BUGS
260 ====
261
262 Bugs and suggestions should be reported at:
263 https://github.com/rg3/youtube-dl/issues
264
265 Please include:
266
267 - Your exact command line, like
268 youtube-dl -t "http://www.youtube.com/watch?v=uHlDtZ6Oc3s&feature=channel_video_title".
269 A common mistake is not to escape the &. Putting URLs in quotes
270 should solve this problem.
271 - The output of youtube-dl --version
272 - The output of python --version
273 - The name and version of your Operating System ("Ubuntu 11.04 x64" or
274 "Windows 7 x64" is usually enough).
275
276 For discussions, join us in the irc channel #youtube-dl on freenode.