]> Raphaël G. Git Repositories - youtubedl/blob - youtube-dl.1
Imported Upstream version 2013.12.04
[youtubedl] / youtube-dl.1
1 .TH YOUTUBE\-DL 1 ""
2 .SH NAME
3 .PP
4 youtube\-dl \- download videos from youtube.com or other video platforms
5 .SH SYNOPSIS
6 .PP
7 \f[B]youtube\-dl\f[] OPTIONS (#options) URL [URL...]
8 .SH DESCRIPTION
9 .PP
10 \f[B]youtube\-dl\f[] is a small command\-line program to download videos
11 from YouTube.com and a few more sites.
12 It requires the Python interpreter, version 2.6, 2.7, or 3.3+, and it is
13 not platform specific.
14 It should work on your Unix box, on Windows or on Mac OS X.
15 It is released to the public domain, which means you can modify it,
16 redistribute it or use it however you like.
17 .SH OPTIONS
18 .IP
19 .nf
20 \f[C]
21 \-h,\ \-\-help\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ print\ this\ help\ text\ and\ exit
22 \-\-version\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ print\ program\ version\ and\ exit
23 \-U,\ \-\-update\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ update\ this\ program\ to\ latest\ version.\ Make\ sure
24 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ that\ you\ have\ sufficient\ permissions\ (run\ with
25 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sudo\ if\ needed)
26 \-i,\ \-\-ignore\-errors\ \ \ \ \ \ \ \ continue\ on\ download\ errors,\ for\ example\ to\ to
27 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ skip\ unavailable\ videos\ in\ a\ playlist
28 \-\-abort\-on\-error\ \ \ \ \ \ \ \ \ \ \ Abort\ downloading\ of\ further\ videos\ (in\ the
29 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ playlist\ or\ the\ command\ line)\ if\ an\ error\ occurs
30 \-\-dump\-user\-agent\ \ \ \ \ \ \ \ \ \ display\ the\ current\ browser\ identification
31 \-\-user\-agent\ UA\ \ \ \ \ \ \ \ \ \ \ \ specify\ a\ custom\ user\ agent
32 \-\-referer\ REF\ \ \ \ \ \ \ \ \ \ \ \ \ \ specify\ a\ custom\ referer,\ use\ if\ the\ video\ access
33 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ is\ restricted\ to\ one\ domain
34 \-\-list\-extractors\ \ \ \ \ \ \ \ \ \ List\ all\ supported\ extractors\ and\ the\ URLs\ they
35 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ would\ handle
36 \-\-extractor\-descriptions\ \ \ Output\ descriptions\ of\ all\ supported\ extractors
37 \-\-proxy\ URL\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ the\ specified\ HTTP/HTTPS\ proxy.\ Pass\ in\ an
38 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ empty\ string\ (\-\-proxy\ "")\ for\ direct\ connection
39 \-\-no\-check\-certificate\ \ \ \ \ Suppress\ HTTPS\ certificate\ validation.
40 \-\-cache\-dir\ DIR\ \ \ \ \ \ \ \ \ \ \ \ Location\ in\ the\ filesystem\ where\ youtube\-dl\ can
41 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ store\ downloaded\ information\ permanently.\ By
42 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default\ $XDG_CACHE_HOME/youtube\-dl\ or\ ~/.cache
43 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ /youtube\-dl\ .
44 \-\-no\-cache\-dir\ \ \ \ \ \ \ \ \ \ \ \ \ Disable\ filesystem\ caching
45 \f[]
46 .fi
47 .SS Video Selection:
48 .IP
49 .nf
50 \f[C]
51 \-\-playlist\-start\ NUMBER\ \ \ \ playlist\ video\ to\ start\ at\ (default\ is\ 1)
52 \-\-playlist\-end\ NUMBER\ \ \ \ \ \ playlist\ video\ to\ end\ at\ (default\ is\ last)
53 \-\-match\-title\ REGEX\ \ \ \ \ \ \ \ download\ only\ matching\ titles\ (regex\ or\ caseless
54 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub\-string)
55 \-\-reject\-title\ REGEX\ \ \ \ \ \ \ skip\ download\ for\ matching\ titles\ (regex\ or
56 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub\-string)
57 \-\-max\-downloads\ NUMBER\ \ \ \ \ Abort\ after\ downloading\ NUMBER\ files
58 \-\-min\-filesize\ SIZE\ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ smaller\ than\ SIZE
59 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (e.g.\ 50k\ or\ 44.6m)
60 \-\-max\-filesize\ SIZE\ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ larger\ than\ SIZE\ (e.g.
61 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 50k\ or\ 44.6m)
62 \-\-date\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ in\ this\ date
63 \-\-datebefore\ DATE\ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ before\ this\ date
64 \-\-dateafter\ DATE\ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ after\ this\ date
65 \-\-no\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ the\ currently\ playing\ video
66 \-\-age\-limit\ YEARS\ \ \ \ \ \ \ \ \ \ download\ only\ videos\ suitable\ for\ the\ given\ age
67 \-\-download\-archive\ FILE\ \ \ \ Download\ only\ videos\ not\ listed\ in\ the\ archive
68 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file.\ Record\ the\ IDs\ of\ all\ downloaded\ videos\ in
69 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ it.
70 \f[]
71 .fi
72 .SS Download Options:
73 .IP
74 .nf
75 \f[C]
76 \-r,\ \-\-rate\-limit\ LIMIT\ \ \ \ \ maximum\ download\ rate\ in\ bytes\ per\ second\ (e.g.
77 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 50K\ or\ 4.2M)
78 \-R,\ \-\-retries\ RETRIES\ \ \ \ \ \ number\ of\ retries\ (default\ is\ 10)
79 \-\-buffer\-size\ SIZE\ \ \ \ \ \ \ \ \ size\ of\ download\ buffer\ (e.g.\ 1024\ or\ 16K)
80 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (default\ is\ 1024)
81 \-\-no\-resize\-buffer\ \ \ \ \ \ \ \ \ do\ not\ automatically\ adjust\ the\ buffer\ size.\ By
82 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default,\ the\ buffer\ size\ is\ automatically\ resized
83 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ an\ initial\ value\ of\ SIZE.
84 \f[]
85 .fi
86 .SS Filesystem Options:
87 .IP
88 .nf
89 \f[C]
90 \-t,\ \-\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ title\ in\ file\ name\ (default)
91 \-\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ only\ video\ ID\ in\ file\ name
92 \-l,\ \-\-literal\ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated]\ alias\ of\ \-\-title
93 \-A,\ \-\-auto\-number\ \ \ \ \ \ \ \ \ \ number\ downloaded\ files\ starting\ from\ 00000
94 \-o,\ \-\-output\ TEMPLATE\ \ \ \ \ \ output\ filename\ template.\ Use\ %(title)s\ to\ get
95 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ title,\ %(uploader)s\ for\ the\ uploader\ name,
96 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(uploader_id)s\ for\ the\ uploader\ nickname\ if
97 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ different,\ %(autonumber)s\ to\ get\ an\ automatically
98 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incremented\ number,\ %(ext)s\ for\ the\ filename
99 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ extension,\ %(format)s\ for\ the\ format\ description
100 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (like\ "22\ \-\ 1280x720"\ or\ "HD"),%(format_id)s\ for
101 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ unique\ id\ of\ the\ format\ (like\ Youtube\[aq]s
102 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ itags:\ "137"),%(upload_date)s\ for\ the\ upload\ date
103 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (YYYYMMDD),\ %(extractor)s\ for\ the\ provider
104 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (youtube,\ metacafe,\ etc),\ %(id)s\ for\ the\ video\ id
105 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,\ %(playlist)s\ for\ the\ playlist\ the\ video\ is\ in,
106 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(playlist_index)s\ for\ the\ position\ in\ the
107 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ playlist\ and\ %%\ for\ a\ literal\ percent.\ Use\ \-\ to
108 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ output\ to\ stdout.\ Can\ also\ be\ used\ to\ download\ to
109 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ different\ directory,\ for\ example\ with\ \-o\ \[aq]/my/d
110 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ownloads/%(uploader)s/%(title)s\-%(id)s.%(ext)s\[aq]\ .
111 \-\-autonumber\-size\ NUMBER\ \ \ Specifies\ the\ number\ of\ digits\ in\ %(autonumber)s
112 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ when\ it\ is\ present\ in\ output\ filename\ template\ or
113 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \-\-auto\-number\ option\ is\ given
114 \-\-restrict\-filenames\ \ \ \ \ \ \ Restrict\ filenames\ to\ only\ ASCII\ characters,\ and
115 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ avoid\ "&"\ and\ spaces\ in\ filenames
116 \-a,\ \-\-batch\-file\ FILE\ \ \ \ \ \ file\ containing\ URLs\ to\ download\ (\[aq]\-\[aq]\ for\ stdin)
117 \-w,\ \-\-no\-overwrites\ \ \ \ \ \ \ \ do\ not\ overwrite\ files
118 \-c,\ \-\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ force\ resume\ of\ partially\ downloaded\ files.\ By
119 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default,\ youtube\-dl\ will\ resume\ downloads\ if
120 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ possible.
121 \-\-no\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ resume\ partially\ downloaded\ files\ (restart
122 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ beginning)
123 \-\-cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ file\ to\ read\ cookies\ from\ and\ dump\ cookie\ jar\ in
124 \-\-no\-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ .part\ files
125 \-\-no\-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ the\ Last\-modified\ header\ to\ set\ the
126 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file\ modification\ time
127 \-\-write\-description\ \ \ \ \ \ \ \ write\ video\ description\ to\ a\ .description\ file
128 \-\-write\-info\-json\ \ \ \ \ \ \ \ \ \ write\ video\ metadata\ to\ a\ .info.json\ file
129 \-\-write\-annotations\ \ \ \ \ \ \ \ write\ video\ annotations\ to\ a\ .annotation\ file
130 \-\-write\-thumbnail\ \ \ \ \ \ \ \ \ \ write\ thumbnail\ image\ to\ disk
131 \f[]
132 .fi
133 .SS Verbosity / Simulation Options:
134 .IP
135 .nf
136 \f[C]
137 \-q,\ \-\-quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ activates\ quiet\ mode
138 \-s,\ \-\-simulate\ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video\ and\ do\ not\ write
139 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ anything\ to\ disk
140 \-\-skip\-download\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video
141 \-g,\ \-\-get\-url\ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ URL
142 \-e,\ \-\-get\-title\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ title
143 \-\-get\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ id
144 \-\-get\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ thumbnail\ URL
145 \-\-get\-description\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ description
146 \-\-get\-filename\ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ filename
147 \-\-get\-format\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ format
148 \-j,\ \-\-dump\-json\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ JSON\ information
149 \-\-newline\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ output\ progress\ bar\ as\ new\ lines
150 \-\-no\-progress\ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ print\ progress\ bar
151 \-\-console\-title\ \ \ \ \ \ \ \ \ \ \ \ display\ progress\ in\ console\ titlebar
152 \-v,\ \-\-verbose\ \ \ \ \ \ \ \ \ \ \ \ \ \ print\ various\ debugging\ information
153 \-\-dump\-intermediate\-pages\ \ print\ downloaded\ pages\ to\ debug\ problems(very
154 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ verbose)
155 \-\-write\-pages\ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ downloaded\ intermediary\ pages\ to\ files\ in
156 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ current\ directory\ to\ debug\ problems
157 \f[]
158 .fi
159 .SS Video Format Options:
160 .IP
161 .nf
162 \f[C]
163 \-f,\ \-\-format\ FORMAT\ \ \ \ \ \ \ \ video\ format\ code,\ specify\ the\ order\ of
164 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ preference\ using\ slashes:\ "\-f\ 22/17/18".\ "\-f\ mp4"
165 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ and\ "\-f\ flv"\ are\ also\ supported
166 \-\-all\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ all\ available\ video\ formats
167 \-\-prefer\-free\-formats\ \ \ \ \ \ prefer\ free\ video\ formats\ unless\ a\ specific\ one
168 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ is\ requested
169 \-\-max\-quality\ FORMAT\ \ \ \ \ \ \ highest\ quality\ format\ to\ download
170 \-F,\ \-\-list\-formats\ \ \ \ \ \ \ \ \ list\ all\ available\ formats\ (currently\ youtube
171 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ only)
172 \f[]
173 .fi
174 .SS Subtitle Options:
175 .IP
176 .nf
177 \f[C]
178 \-\-write\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ subtitle\ file
179 \-\-write\-auto\-sub\ \ \ \ \ \ \ \ \ \ \ write\ automatic\ subtitle\ file\ (youtube\ only)
180 \-\-all\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ downloads\ all\ the\ available\ subtitles\ of\ the
181 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ video
182 \-\-list\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lists\ all\ available\ subtitles\ for\ the\ video
183 \-\-sub\-format\ FORMAT\ \ \ \ \ \ \ \ subtitle\ format\ (default=srt)\ ([sbv/vtt]\ youtube
184 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ only)
185 \-\-sub\-lang\ LANGS\ \ \ \ \ \ \ \ \ \ \ languages\ of\ the\ subtitles\ to\ download\ (optional)
186 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ separated\ by\ commas,\ use\ IETF\ language\ tags\ like
187 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[aq]en,pt\[aq]
188 \f[]
189 .fi
190 .SS Authentication Options:
191 .IP
192 .nf
193 \f[C]
194 \-u,\ \-\-username\ USERNAME\ \ \ \ account\ username
195 \-p,\ \-\-password\ PASSWORD\ \ \ \ account\ password
196 \-n,\ \-\-netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ .netrc\ authentication\ data
197 \-\-video\-password\ PASSWORD\ \ video\ password\ (vimeo\ only)
198 \f[]
199 .fi
200 .SS Post\-processing Options:
201 .IP
202 .nf
203 \f[C]
204 \-x,\ \-\-extract\-audio\ \ \ \ \ \ \ \ convert\ video\ files\ to\ audio\-only\ files\ (requires
205 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ffmpeg\ or\ avconv\ and\ ffprobe\ or\ avprobe)
206 \-\-audio\-format\ FORMAT\ \ \ \ \ \ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",\ "opus",\ or
207 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "wav";\ best\ by\ default
208 \-\-audio\-quality\ QUALITY\ \ \ \ ffmpeg/avconv\ audio\ quality\ specification,\ insert
209 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ value\ between\ 0\ (better)\ and\ 9\ (worse)\ for\ VBR
210 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ a\ specific\ bitrate\ like\ 128K\ (default\ 5)
211 \-\-recode\-video\ FORMAT\ \ \ \ \ \ Encode\ the\ video\ to\ another\ format\ if\ necessary
212 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (currently\ supported:\ mp4|flv|ogg|webm)
213 \-k,\ \-\-keep\-video\ \ \ \ \ \ \ \ \ \ \ keeps\ the\ video\ file\ on\ disk\ after\ the\ post\-
214 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processing;\ the\ video\ is\ erased\ by\ default
215 \-\-no\-post\-overwrites\ \ \ \ \ \ \ do\ not\ overwrite\ post\-processed\ files;\ the\ post\-
216 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processed\ files\ are\ overwritten\ by\ default
217 \-\-embed\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ embed\ subtitles\ in\ the\ video\ (only\ for\ mp4
218 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ videos)
219 \-\-add\-metadata\ \ \ \ \ \ \ \ \ \ \ \ \ add\ metadata\ to\ the\ files
220 \f[]
221 .fi
222 .SH CONFIGURATION
223 .PP
224 You can configure youtube\-dl by placing default arguments (such as
225 \f[C]\-\-extract\-audio\ \-\-no\-mtime\f[] to always extract the audio
226 and not copy the mtime) into \f[C]/etc/youtube\-dl.conf\f[] and/or
227 \f[C]~/.config/youtube\-dl.conf\f[].
228 On Windows, the configuration file locations are
229 \f[C]%APPDATA%\\youtube\-dl\\config.txt\f[] and
230 \f[C]C:\\Users\\<Yourname>\\youtube\-dl.conf\f[].
231 .SH OUTPUT TEMPLATE
232 .PP
233 The \f[C]\-o\f[] option allows users to indicate a template for the
234 output file names.
235 The basic usage is not to set any template arguments when downloading a
236 single file, like in
237 \f[C]youtube\-dl\ \-o\ funny_video.flv\ "http://some/video"\f[].
238 However, it may contain special sequences that will be replaced when
239 downloading each video.
240 The special sequences have the format \f[C]%(NAME)s\f[].
241 To clarify, that is a percent symbol followed by a name in parenthesis,
242 followed by a lowercase S.
243 Allowed names are:
244 .IP \[bu] 2
245 \f[C]id\f[]: The sequence will be replaced by the video identifier.
246 .IP \[bu] 2
247 \f[C]url\f[]: The sequence will be replaced by the video URL.
248 .IP \[bu] 2
249 \f[C]uploader\f[]: The sequence will be replaced by the nickname of the
250 person who uploaded the video.
251 .IP \[bu] 2
252 \f[C]upload_date\f[]: The sequence will be replaced by the upload date
253 in YYYYMMDD format.
254 .IP \[bu] 2
255 \f[C]title\f[]: The sequence will be replaced by the video title.
256 .IP \[bu] 2
257 \f[C]ext\f[]: The sequence will be replaced by the appropriate extension
258 (like flv or mp4).
259 .IP \[bu] 2
260 \f[C]epoch\f[]: The sequence will be replaced by the Unix epoch when
261 creating the file.
262 .IP \[bu] 2
263 \f[C]autonumber\f[]: The sequence will be replaced by a five\-digit
264 number that will be increased with each download, starting at zero.
265 .IP \[bu] 2
266 \f[C]playlist\f[]: The name or the id of the playlist that contains the
267 video.
268 .IP \[bu] 2
269 \f[C]playlist_index\f[]: The index of the video in the playlist, a
270 five\-digit number.
271 .PP
272 The current default template is \f[C]%(title)s\-%(id)s.%(ext)s\f[].
273 .PP
274 In some cases, you don\[aq]t want special characters such as 中, spaces,
275 or &, such as when transferring the downloaded filename to a Windows
276 system or the filename through an 8bit\-unsafe channel.
277 In these cases, add the \f[C]\-\-restrict\-filenames\f[] flag to get a
278 shorter title:
279 .IP
280 .nf
281 \f[C]
282 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc
283 youtube\-dl\ test\ video\ \[aq]\[aq]_ä↭𝕐.mp4\ \ \ \ #\ All\ kinds\ of\ weird\ characters
284 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc\ \-\-restrict\-filenames
285 youtube\-dl_test_video_.mp4\ \ \ \ \ \ \ \ \ \ #\ A\ simple\ file\ name
286 \f[]
287 .fi
288 .SH VIDEO SELECTION
289 .PP
290 Videos can be filtered by their upload date using the options
291 \f[C]\-\-date\f[], \f[C]\-\-datebefore\f[] or \f[C]\-\-dateafter\f[],
292 they accept dates in two formats:
293 .IP \[bu] 2
294 Absolute dates: Dates in the format \f[C]YYYYMMDD\f[].
295 .IP \[bu] 2
296 Relative dates: Dates in the format
297 \f[C](now|today)[+\-][0\-9](day|week|month|year)(s)?\f[]
298 .PP
299 Examples:
300 .IP
301 .nf
302 \f[C]
303 $\ youtube\-dl\ \-\-dateafter\ now\-6months\ #will\ only\ download\ the\ videos\ uploaded\ in\ the\ last\ 6\ months
304 $\ youtube\-dl\ \-\-date\ 19700101\ #will\ only\ download\ the\ videos\ uploaded\ in\ January\ 1,\ 1970
305 $\ youtube\-dl\ \-\-dateafter\ 20000101\ \-\-datebefore\ 20100101\ #will\ only\ download\ the\ videos\ uploaded\ between\ 2000\ and\ 2010
306 \f[]
307 .fi
308 .SH FAQ
309 .SS Can you please put the \-b option back?
310 .PP
311 Most people asking this question are not aware that youtube\-dl now
312 defaults to downloading the highest available quality as reported by
313 YouTube, which will be 1080p or 720p in some cases, so you no longer
314 need the \f[C]\-b\f[] option.
315 For some specific videos, maybe YouTube does not report them to be
316 available in a specific high quality format you\[aq]re interested in.
317 In that case, simply request it with the \f[C]\-f\f[] option and
318 youtube\-dl will try to download it.
319 .SS I get HTTP error 402 when trying to download a video. What\[aq]s
320 this?
321 .PP
322 Apparently YouTube requires you to pass a CAPTCHA test if you download
323 too much.
324 We\[aq]re considering to provide a way to let you solve the
325 CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
326 moment, your best course of action is pointing a webbrowser to the
327 youtube URL, solving the CAPTCHA, and restart youtube\-dl.
328 .SS I have downloaded a video but how can I play it?
329 .PP
330 Once the video is fully downloaded, use any video player, such as
331 vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
332 .SS The links provided by youtube\-dl \-g are not working anymore
333 .PP
334 The URLs youtube\-dl outputs require the downloader to have the correct
335 cookies.
336 Use the \f[C]\-\-cookies\f[] option to write the required cookies into a
337 file, and advise your downloader to read cookies from that file.
338 Some sites also require a common user agent to be used, use
339 \f[C]\-\-dump\-user\-agent\f[] to see the one in use by youtube\-dl.
340 .SS ERROR: no fmt_url_map or conn information found in video info
341 .PP
342 youtube has switched to a new video info format in July 2011 which is
343 not supported by old versions of youtube\-dl.
344 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
345 .SS ERROR: unable to download video
346 .PP
347 youtube requires an additional signature since September 2012 which is
348 not supported by old versions of youtube\-dl.
349 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
350 .SS SyntaxError: Non\-ASCII character
351 .PP
352 The error
353 .IP
354 .nf
355 \f[C]
356 File\ "youtube\-dl",\ line\ 2
357 SyntaxError:\ Non\-ASCII\ character\ \[aq]\\x93\[aq]\ ...
358 \f[]
359 .fi
360 .PP
361 means you\[aq]re using an outdated version of Python.
362 Please update to Python 2.6 or 2.7.
363 .SS What is this binary file? Where has the code gone?
364 .PP
365 Since June 2012 (#342) youtube\-dl is packed as an executable zipfile,
366 simply unzip it (might need renaming to \f[C]youtube\-dl.zip\f[] first
367 on some systems) or clone the git repository, as laid out above.
368 If you modify the code, you can run it by executing the
369 \f[C]__main__.py\f[] file.
370 To recompile the executable, run \f[C]make\ youtube\-dl\f[].
371 .SS The exe throws a \f[I]Runtime error from Visual C++\f[]
372 .PP
373 To run the exe you need to install first the Microsoft Visual C++ 2008
374 Redistributable
375 Package (http://www.microsoft.com/en-us/download/details.aspx?id=29).
376 .SH COPYRIGHT
377 .PP
378 youtube\-dl is released into the public domain by the copyright holders.
379 .PP
380 This README file was originally written by Daniel Bolton
381 (<https://github.com/dbbolton>) and is likewise released into the public
382 domain.
383 .SH BUGS
384 .PP
385 Bugs and suggestions should be reported at:
386 <https://github.com/rg3/youtube-dl/issues>
387 .PP
388 Please include:
389 .IP \[bu] 2
390 Your exact command line, like
391 \f[C]youtube\-dl\ \-t\ "http://www.youtube.com/watch?v=uHlDtZ6Oc3s&feature=channel_video_title"\f[].
392 A common mistake is not to escape the \f[C]&\f[].
393 Putting URLs in quotes should solve this problem.
394 .IP \[bu] 2
395 If possible re\-run the command with \f[C]\-\-verbose\f[], and include
396 the full output, it is really helpful to us.
397 .IP \[bu] 2
398 The output of \f[C]youtube\-dl\ \-\-version\f[]
399 .IP \[bu] 2
400 The output of \f[C]python\ \-\-version\f[]
401 .IP \[bu] 2
402 The name and version of your Operating System ("Ubuntu 11.04 x64" or
403 "Windows 7 x64" is usually enough).
404 .PP
405 For discussions, join us in the irc channel #youtube\-dl on freenode.