]> Raphaël G. Git Repositories - youtubedl/blob - youtube-dl.1
ce1c4f926282db80cf04c743dfd5e2232a11b32e
[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\ some\ downloaded\ information\ permanently.\ By
42 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default\ $XDG_CACHE_HOME/youtube\-dl\ or\ ~/.cache
43 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ /youtube\-dl\ .\ At\ the\ moment,\ only\ YouTube\ player
44 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ files\ (for\ videos\ with\ obfuscated\ signatures)\ are
45 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cached,\ but\ that\ may\ change.
46 \-\-no\-cache\-dir\ \ \ \ \ \ \ \ \ \ \ \ \ Disable\ filesystem\ caching
47 \-\-socket\-timeout\ None\ \ \ \ \ \ Time\ to\ wait\ before\ giving\ up,\ in\ seconds
48 \-\-bidi\-workaround\ \ \ \ \ \ \ \ \ \ Work\ around\ terminals\ that\ lack\ bidirectional
49 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ text\ support.\ Requires\ bidiv\ or\ fribidi
50 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ executable\ in\ PATH
51 \f[]
52 .fi
53 .SS Video Selection:
54 .IP
55 .nf
56 \f[C]
57 \-\-playlist\-start\ NUMBER\ \ \ \ playlist\ video\ to\ start\ at\ (default\ is\ 1)
58 \-\-playlist\-end\ NUMBER\ \ \ \ \ \ playlist\ video\ to\ end\ at\ (default\ is\ last)
59 \-\-match\-title\ REGEX\ \ \ \ \ \ \ \ download\ only\ matching\ titles\ (regex\ or\ caseless
60 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub\-string)
61 \-\-reject\-title\ REGEX\ \ \ \ \ \ \ skip\ download\ for\ matching\ titles\ (regex\ or
62 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub\-string)
63 \-\-max\-downloads\ NUMBER\ \ \ \ \ Abort\ after\ downloading\ NUMBER\ files
64 \-\-min\-filesize\ SIZE\ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ smaller\ than\ SIZE
65 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (e.g.\ 50k\ or\ 44.6m)
66 \-\-max\-filesize\ SIZE\ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ larger\ than\ SIZE\ (e.g.
67 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 50k\ or\ 44.6m)
68 \-\-date\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ in\ this\ date
69 \-\-datebefore\ DATE\ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ on\ or\ before\ this
70 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ date\ (i.e.\ inclusive)
71 \-\-dateafter\ DATE\ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ on\ or\ after\ this
72 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ date\ (i.e.\ inclusive)
73 \-\-min\-views\ COUNT\ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ less\ than\ COUNT
74 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ views
75 \-\-max\-views\ COUNT\ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ more\ than\ COUNT
76 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ views
77 \-\-no\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ the\ currently\ playing\ video
78 \-\-age\-limit\ YEARS\ \ \ \ \ \ \ \ \ \ download\ only\ videos\ suitable\ for\ the\ given\ age
79 \-\-download\-archive\ FILE\ \ \ \ Download\ only\ videos\ not\ listed\ in\ the\ archive
80 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file.\ Record\ the\ IDs\ of\ all\ downloaded\ videos\ in
81 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ it.
82 \f[]
83 .fi
84 .SS Download Options:
85 .IP
86 .nf
87 \f[C]
88 \-r,\ \-\-rate\-limit\ LIMIT\ \ \ \ \ maximum\ download\ rate\ in\ bytes\ per\ second\ (e.g.
89 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 50K\ or\ 4.2M)
90 \-R,\ \-\-retries\ RETRIES\ \ \ \ \ \ number\ of\ retries\ (default\ is\ 10)
91 \-\-buffer\-size\ SIZE\ \ \ \ \ \ \ \ \ size\ of\ download\ buffer\ (e.g.\ 1024\ or\ 16K)
92 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (default\ is\ 1024)
93 \-\-no\-resize\-buffer\ \ \ \ \ \ \ \ \ do\ not\ automatically\ adjust\ the\ buffer\ size.\ By
94 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default,\ the\ buffer\ size\ is\ automatically\ resized
95 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ an\ initial\ value\ of\ SIZE.
96 \f[]
97 .fi
98 .SS Filesystem Options:
99 .IP
100 .nf
101 \f[C]
102 \-t,\ \-\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ title\ in\ file\ name\ (default)
103 \-\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ only\ video\ ID\ in\ file\ name
104 \-l,\ \-\-literal\ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated]\ alias\ of\ \-\-title
105 \-A,\ \-\-auto\-number\ \ \ \ \ \ \ \ \ \ number\ downloaded\ files\ starting\ from\ 00000
106 \-o,\ \-\-output\ TEMPLATE\ \ \ \ \ \ output\ filename\ template.\ Use\ %(title)s\ to\ get
107 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ title,\ %(uploader)s\ for\ the\ uploader\ name,
108 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(uploader_id)s\ for\ the\ uploader\ nickname\ if
109 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ different,\ %(autonumber)s\ to\ get\ an\ automatically
110 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incremented\ number,\ %(ext)s\ for\ the\ filename
111 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ extension,\ %(format)s\ for\ the\ format\ description
112 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (like\ "22\ \-\ 1280x720"\ or\ "HD"),\ %(format_id)s\ for
113 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ unique\ id\ of\ the\ format\ (like\ Youtube\[aq]s
114 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ itags:\ "137"),\ %(upload_date)s\ for\ the\ upload
115 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ date\ (YYYYMMDD),\ %(extractor)s\ for\ the\ provider
116 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (youtube,\ metacafe,\ etc),\ %(id)s\ for\ the\ video
117 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ id,\ %(playlist)s\ for\ the\ playlist\ the\ video\ is
118 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ in,\ %(playlist_index)s\ for\ the\ position\ in\ the
119 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ playlist\ and\ %%\ for\ a\ literal\ percent.\ Use\ \-\ to
120 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ output\ to\ stdout.\ Can\ also\ be\ used\ to\ download\ to
121 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ different\ directory,\ for\ example\ with\ \-o\ \[aq]/my/d
122 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ownloads/%(uploader)s/%(title)s\-%(id)s.%(ext)s\[aq]\ .
123 \-\-autonumber\-size\ NUMBER\ \ \ Specifies\ the\ number\ of\ digits\ in\ %(autonumber)s
124 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ when\ it\ is\ present\ in\ output\ filename\ template\ or
125 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \-\-auto\-number\ option\ is\ given
126 \-\-restrict\-filenames\ \ \ \ \ \ \ Restrict\ filenames\ to\ only\ ASCII\ characters,\ and
127 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ avoid\ "&"\ and\ spaces\ in\ filenames
128 \-a,\ \-\-batch\-file\ FILE\ \ \ \ \ \ file\ containing\ URLs\ to\ download\ (\[aq]\-\[aq]\ for\ stdin)
129 \-\-load\-info\ FILE\ \ \ \ \ \ \ \ \ \ \ json\ file\ containing\ the\ video\ information
130 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (created\ with\ the\ "\-\-write\-json"\ option)
131 \-w,\ \-\-no\-overwrites\ \ \ \ \ \ \ \ do\ not\ overwrite\ files
132 \-c,\ \-\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ force\ resume\ of\ partially\ downloaded\ files.\ By
133 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default,\ youtube\-dl\ will\ resume\ downloads\ if
134 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ possible.
135 \-\-no\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ resume\ partially\ downloaded\ files\ (restart
136 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ beginning)
137 \-\-cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ file\ to\ read\ cookies\ from\ and\ dump\ cookie\ jar\ in
138 \-\-no\-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ .part\ files
139 \-\-no\-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ the\ Last\-modified\ header\ to\ set\ the
140 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file\ modification\ time
141 \-\-write\-description\ \ \ \ \ \ \ \ write\ video\ description\ to\ a\ .description\ file
142 \-\-write\-info\-json\ \ \ \ \ \ \ \ \ \ write\ video\ metadata\ to\ a\ .info.json\ file
143 \-\-write\-annotations\ \ \ \ \ \ \ \ write\ video\ annotations\ to\ a\ .annotation\ file
144 \-\-write\-thumbnail\ \ \ \ \ \ \ \ \ \ write\ thumbnail\ image\ to\ disk
145 \f[]
146 .fi
147 .SS Verbosity / Simulation Options:
148 .IP
149 .nf
150 \f[C]
151 \-q,\ \-\-quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ activates\ quiet\ mode
152 \-s,\ \-\-simulate\ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video\ and\ do\ not\ write
153 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ anything\ to\ disk
154 \-\-skip\-download\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video
155 \-g,\ \-\-get\-url\ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ URL
156 \-e,\ \-\-get\-title\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ title
157 \-\-get\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ id
158 \-\-get\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ thumbnail\ URL
159 \-\-get\-description\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ description
160 \-\-get\-duration\ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ length
161 \-\-get\-filename\ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ filename
162 \-\-get\-format\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ format
163 \-j,\ \-\-dump\-json\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ JSON\ information
164 \-\-newline\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ output\ progress\ bar\ as\ new\ lines
165 \-\-no\-progress\ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ print\ progress\ bar
166 \-\-console\-title\ \ \ \ \ \ \ \ \ \ \ \ display\ progress\ in\ console\ titlebar
167 \-v,\ \-\-verbose\ \ \ \ \ \ \ \ \ \ \ \ \ \ print\ various\ debugging\ information
168 \-\-dump\-intermediate\-pages\ \ print\ downloaded\ pages\ to\ debug\ problems\ (very
169 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ verbose)
170 \-\-write\-pages\ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ downloaded\ intermediary\ pages\ to\ files\ in
171 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ current\ directory\ to\ debug\ problems
172 \f[]
173 .fi
174 .SS Video Format Options:
175 .IP
176 .nf
177 \f[C]
178 \-f,\ \-\-format\ FORMAT\ \ \ \ \ \ \ \ video\ format\ code,\ specify\ the\ order\ of
179 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ preference\ using\ slashes:\ "\-f\ 22/17/18".\ "\-f\ mp4"
180 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ and\ "\-f\ flv"\ are\ also\ supported
181 \-\-all\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ all\ available\ video\ formats
182 \-\-prefer\-free\-formats\ \ \ \ \ \ prefer\ free\ video\ formats\ unless\ a\ specific\ one
183 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ is\ requested
184 \-\-max\-quality\ FORMAT\ \ \ \ \ \ \ highest\ quality\ format\ to\ download
185 \-F,\ \-\-list\-formats\ \ \ \ \ \ \ \ \ list\ all\ available\ formats
186 \f[]
187 .fi
188 .SS Subtitle Options:
189 .IP
190 .nf
191 \f[C]
192 \-\-write\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ subtitle\ file
193 \-\-write\-auto\-sub\ \ \ \ \ \ \ \ \ \ \ write\ automatic\ subtitle\ file\ (youtube\ only)
194 \-\-all\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ downloads\ all\ the\ available\ subtitles\ of\ the
195 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ video
196 \-\-list\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lists\ all\ available\ subtitles\ for\ the\ video
197 \-\-sub\-format\ FORMAT\ \ \ \ \ \ \ \ subtitle\ format\ (default=srt)\ ([sbv/vtt]\ youtube
198 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ only)
199 \-\-sub\-lang\ LANGS\ \ \ \ \ \ \ \ \ \ \ languages\ of\ the\ subtitles\ to\ download\ (optional)
200 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ separated\ by\ commas,\ use\ IETF\ language\ tags\ like
201 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[aq]en,pt\[aq]
202 \f[]
203 .fi
204 .SS Authentication Options:
205 .IP
206 .nf
207 \f[C]
208 \-u,\ \-\-username\ USERNAME\ \ \ \ account\ username
209 \-p,\ \-\-password\ PASSWORD\ \ \ \ account\ password
210 \-n,\ \-\-netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ .netrc\ authentication\ data
211 \-\-video\-password\ PASSWORD\ \ video\ password\ (vimeo,\ smotri)
212 \f[]
213 .fi
214 .SS Post\-processing Options:
215 .IP
216 .nf
217 \f[C]
218 \-x,\ \-\-extract\-audio\ \ \ \ \ \ \ \ convert\ video\ files\ to\ audio\-only\ files\ (requires
219 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ffmpeg\ or\ avconv\ and\ ffprobe\ or\ avprobe)
220 \-\-audio\-format\ FORMAT\ \ \ \ \ \ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",\ "opus",\ or
221 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "wav";\ best\ by\ default
222 \-\-audio\-quality\ QUALITY\ \ \ \ ffmpeg/avconv\ audio\ quality\ specification,\ insert
223 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ value\ between\ 0\ (better)\ and\ 9\ (worse)\ for\ VBR
224 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ a\ specific\ bitrate\ like\ 128K\ (default\ 5)
225 \-\-recode\-video\ FORMAT\ \ \ \ \ \ Encode\ the\ video\ to\ another\ format\ if\ necessary
226 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (currently\ supported:\ mp4|flv|ogg|webm)
227 \-k,\ \-\-keep\-video\ \ \ \ \ \ \ \ \ \ \ keeps\ the\ video\ file\ on\ disk\ after\ the\ post\-
228 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processing;\ the\ video\ is\ erased\ by\ default
229 \-\-no\-post\-overwrites\ \ \ \ \ \ \ do\ not\ overwrite\ post\-processed\ files;\ the\ post\-
230 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processed\ files\ are\ overwritten\ by\ default
231 \-\-embed\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ embed\ subtitles\ in\ the\ video\ (only\ for\ mp4
232 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ videos)
233 \-\-add\-metadata\ \ \ \ \ \ \ \ \ \ \ \ \ write\ metadata\ to\ the\ video\ file
234 \-\-xattrs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ metadata\ to\ the\ video\ file\[aq]s\ xattrs\ (using
235 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dublin\ core\ and\ xdg\ standards)
236 \-\-prefer\-avconv\ \ \ \ \ \ \ \ \ \ \ \ Prefer\ avconv\ over\ ffmpeg\ for\ running\ the
237 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ postprocessors\ (default)
238 \-\-prefer\-ffmpeg\ \ \ \ \ \ \ \ \ \ \ \ Prefer\ ffmpeg\ over\ avconv\ for\ running\ the
239 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ postprocessors
240 \f[]
241 .fi
242 .SH CONFIGURATION
243 .PP
244 You can configure youtube\-dl by placing default arguments (such as
245 \f[C]\-\-extract\-audio\ \-\-no\-mtime\f[] to always extract the audio
246 and not copy the mtime) into \f[C]/etc/youtube\-dl.conf\f[] and/or
247 \f[C]~/.config/youtube\-dl.conf\f[].
248 On Windows, the configuration file locations are
249 \f[C]%APPDATA%\\youtube\-dl\\config.txt\f[] and
250 \f[C]C:\\Users\\<Yourname>\\youtube\-dl.conf\f[].
251 .SH OUTPUT TEMPLATE
252 .PP
253 The \f[C]\-o\f[] option allows users to indicate a template for the
254 output file names.
255 The basic usage is not to set any template arguments when downloading a
256 single file, like in
257 \f[C]youtube\-dl\ \-o\ funny_video.flv\ "http://some/video"\f[].
258 However, it may contain special sequences that will be replaced when
259 downloading each video.
260 The special sequences have the format \f[C]%(NAME)s\f[].
261 To clarify, that is a percent symbol followed by a name in parenthesis,
262 followed by a lowercase S.
263 Allowed names are:
264 .IP \[bu] 2
265 \f[C]id\f[]: The sequence will be replaced by the video identifier.
266 .IP \[bu] 2
267 \f[C]url\f[]: The sequence will be replaced by the video URL.
268 .IP \[bu] 2
269 \f[C]uploader\f[]: The sequence will be replaced by the nickname of the
270 person who uploaded the video.
271 .IP \[bu] 2
272 \f[C]upload_date\f[]: The sequence will be replaced by the upload date
273 in YYYYMMDD format.
274 .IP \[bu] 2
275 \f[C]title\f[]: The sequence will be replaced by the video title.
276 .IP \[bu] 2
277 \f[C]ext\f[]: The sequence will be replaced by the appropriate extension
278 (like flv or mp4).
279 .IP \[bu] 2
280 \f[C]epoch\f[]: The sequence will be replaced by the Unix epoch when
281 creating the file.
282 .IP \[bu] 2
283 \f[C]autonumber\f[]: The sequence will be replaced by a five\-digit
284 number that will be increased with each download, starting at zero.
285 .IP \[bu] 2
286 \f[C]playlist\f[]: The name or the id of the playlist that contains the
287 video.
288 .IP \[bu] 2
289 \f[C]playlist_index\f[]: The index of the video in the playlist, a
290 five\-digit number.
291 .PP
292 The current default template is \f[C]%(title)s\-%(id)s.%(ext)s\f[].
293 .PP
294 In some cases, you don\[aq]t want special characters such as 中, spaces,
295 or &, such as when transferring the downloaded filename to a Windows
296 system or the filename through an 8bit\-unsafe channel.
297 In these cases, add the \f[C]\-\-restrict\-filenames\f[] flag to get a
298 shorter title:
299 .IP
300 .nf
301 \f[C]
302 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc
303 youtube\-dl\ test\ video\ \[aq]\[aq]_ä↭𝕐.mp4\ \ \ \ #\ All\ kinds\ of\ weird\ characters
304 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc\ \-\-restrict\-filenames
305 youtube\-dl_test_video_.mp4\ \ \ \ \ \ \ \ \ \ #\ A\ simple\ file\ name
306 \f[]
307 .fi
308 .SH VIDEO SELECTION
309 .PP
310 Videos can be filtered by their upload date using the options
311 \f[C]\-\-date\f[], \f[C]\-\-datebefore\f[] or \f[C]\-\-dateafter\f[],
312 they accept dates in two formats:
313 .IP \[bu] 2
314 Absolute dates: Dates in the format \f[C]YYYYMMDD\f[].
315 .IP \[bu] 2
316 Relative dates: Dates in the format
317 \f[C](now|today)[+\-][0\-9](day|week|month|year)(s)?\f[]
318 .PP
319 Examples:
320 .PP
321 $ # Download only the videos uploaded in the last 6 months $ youtube\-dl
322 \-\-dateafter now\-6months $ # Download only the videos uploaded on
323 January 1, 1970 $ youtube\-dl \-\-date 19700101 $ # will only download
324 the videos uploaded in the 200x decade $ youtube\-dl \-\-dateafter
325 20000101 \-\-datebefore 20091231
326 .SH FAQ
327 .SS Can you please put the \-b option back?
328 .PP
329 Most people asking this question are not aware that youtube\-dl now
330 defaults to downloading the highest available quality as reported by
331 YouTube, which will be 1080p or 720p in some cases, so you no longer
332 need the \f[C]\-b\f[] option.
333 For some specific videos, maybe YouTube does not report them to be
334 available in a specific high quality format you\[aq]re interested in.
335 In that case, simply request it with the \f[C]\-f\f[] option and
336 youtube\-dl will try to download it.
337 .SS I get HTTP error 402 when trying to download a video. What\[aq]s
338 this?
339 .PP
340 Apparently YouTube requires you to pass a CAPTCHA test if you download
341 too much.
342 We\[aq]re considering to provide a way to let you solve the
343 CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
344 moment, your best course of action is pointing a webbrowser to the
345 youtube URL, solving the CAPTCHA, and restart youtube\-dl.
346 .SS I have downloaded a video but how can I play it?
347 .PP
348 Once the video is fully downloaded, use any video player, such as
349 vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
350 .SS The links provided by youtube\-dl \-g are not working anymore
351 .PP
352 The URLs youtube\-dl outputs require the downloader to have the correct
353 cookies.
354 Use the \f[C]\-\-cookies\f[] option to write the required cookies into a
355 file, and advise your downloader to read cookies from that file.
356 Some sites also require a common user agent to be used, use
357 \f[C]\-\-dump\-user\-agent\f[] to see the one in use by youtube\-dl.
358 .SS ERROR: no fmt_url_map or conn information found in video info
359 .PP
360 youtube has switched to a new video info format in July 2011 which is
361 not supported by old versions of youtube\-dl.
362 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
363 .SS ERROR: unable to download video
364 .PP
365 youtube requires an additional signature since September 2012 which is
366 not supported by old versions of youtube\-dl.
367 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
368 .SS SyntaxError: Non\-ASCII character
369 .PP
370 The error
371 .IP
372 .nf
373 \f[C]
374 File\ "youtube\-dl",\ line\ 2
375 SyntaxError:\ Non\-ASCII\ character\ \[aq]\\x93\[aq]\ ...
376 \f[]
377 .fi
378 .PP
379 means you\[aq]re using an outdated version of Python.
380 Please update to Python 2.6 or 2.7.
381 .SS What is this binary file? Where has the code gone?
382 .PP
383 Since June 2012 (#342) youtube\-dl is packed as an executable zipfile,
384 simply unzip it (might need renaming to \f[C]youtube\-dl.zip\f[] first
385 on some systems) or clone the git repository, as laid out above.
386 If you modify the code, you can run it by executing the
387 \f[C]__main__.py\f[] file.
388 To recompile the executable, run \f[C]make\ youtube\-dl\f[].
389 .SS The exe throws a \f[I]Runtime error from Visual C++\f[]
390 .PP
391 To run the exe you need to install first the Microsoft Visual C++ 2008
392 Redistributable
393 Package (http://www.microsoft.com/en-us/download/details.aspx?id=29).
394 .SH COPYRIGHT
395 .PP
396 youtube\-dl is released into the public domain by the copyright holders.
397 .PP
398 This README file was originally written by Daniel Bolton
399 (<https://github.com/dbbolton>) and is likewise released into the public
400 domain.
401 .SH BUGS
402 .PP
403 Bugs and suggestions should be reported at:
404 <https://github.com/rg3/youtube-dl/issues> .
405 Unless you were prompted so or there is another pertinent reason (e.g.
406 GitHub fails to accept the bug report), please do not send bug reports
407 via personal email.
408 .PP
409 Please include the full output of the command when run with
410 \f[C]\-\-verbose\f[].
411 The output (including the first lines) contain important debugging
412 information.
413 Issues without the full output are often not reproducible and therefore
414 do not get solved in short order, if ever.
415 .PP
416 For discussions, join us in the irc channel #youtube\-dl on freenode.
417 .PP
418 When you submit a request, please re\-read it once to avoid a couple of
419 mistakes (you can and should use this as a checklist):
420 .SS Is the description of the issue itself sufficient?
421 .PP
422 We often get issue reports that we cannot really decipher.
423 While in most cases we eventually get the required information after
424 asking back multiple times, this poses an unnecessary drain on our
425 resources.
426 Many contributors, including myself, are also not native speakers, so we
427 may misread some parts.
428 .PP
429 So please elaborate on what feature you are requesting, or what bug you
430 want to be fixed.
431 Make sure that it\[aq]s obvious
432 .IP \[bu] 2
433 What the problem is
434 .IP \[bu] 2
435 How it could be fixed
436 .IP \[bu] 2
437 How your proposed solution would look like
438 .PP
439 If your report is shorter than two lines, it is almost certainly missing
440 some of these, which makes it hard for us to respond to it.
441 We\[aq]re often too polite to close the issue outright, but the missing
442 info makes misinterpretation likely.
443 As a commiter myself, I often get frustrated by these issues, since the
444 only possible way for me to move forward on them is to ask for
445 clarification over and over.
446 .PP
447 For bug reports, this means that your report should contain the
448 \f[I]complete\f[] output of youtube\-dl when called with the \-v flag.
449 The error message you get for (most) bugs even says so, but you would
450 not believe how many of our bug reports do not contain this information.
451 .PP
452 Site support requests must contain an example URL.
453 An example URL is a URL you might want to download, like
454 http://www.youtube.com/watch?v=BaW_jenozKc .
455 There should be an obvious video present.
456 Except under very special circumstances, the main page of a video
457 service (e.g.
458 http://www.youtube.com/ ) is \f[I]not\f[] an example URL.
459 .SS Are you using the latest version?
460 .PP
461 Before reporting any issue, type youtube\-dl \-U.
462 This should report that you\[aq]re up\-to\-date.
463 About 20% of the reports we receive are already fixed, but people are
464 using outdated versions.
465 This goes for feature requests as well.
466 .SS Is the issue already documented?
467 .PP
468 Make sure that someone has not already opened the issue you\[aq]re
469 trying to open.
470 Search at the top of the window or at
471 https://github.com/rg3/youtube\-dl/search?type=Issues .
472 If there is an issue, feel free to write something along the lines of
473 "This affects me as well, with version 2015.01.01.
474 Here is some more information on the issue: ...".
475 While some issues may be old, a new post into them often spurs rapid
476 activity.
477 .SS Why are existing options not enough?
478 .PP
479 Before requesting a new feature, please have a quick peek at the list of
480 supported
481 options (https://github.com/rg3/youtube-dl/blob/master/README.md#synopsis).
482 Many feature requests are for features that actually exist already!
483 Please, absolutely do show off your work in the issue report and detail
484 how the existing similar options do \f[I]not\f[] solve your problem.
485 .SS Is there enough context in your bug report?
486 .PP
487 People want to solve problems, and often think they do us a favor by
488 breaking down their larger problems (e.g.
489 wanting to skip already downloaded files) to a specific request (e.g.
490 requesting us to look whether the file exists before downloading the
491 info page).
492 However, what often happens is that they break down the problem into two
493 steps: One simple, and one impossible (or extremely complicated one).
494 .PP
495 We are then presented with a very complicated request when the original
496 problem could be solved far easier, e.g.
497 by recording the downloaded video IDs in a separate file.
498 To avoid this, you must include the greater context where it is
499 non\-obvious.
500 In particular, every feature request that does not consist of adding
501 support for a new site should contain a use case scenario that explains
502 in what situation the missing feature would be useful.
503 .SS Does the issue involve one problem, and one problem only?
504 .PP
505 Some of our users seem to think there is a limit of issues they can or
506 should open.
507 There is no limit of issues they can or should open.
508 While it may seem appealing to be able to dump all your issues into one
509 ticket, that means that someone who solves one of your issues cannot
510 mark the issue as closed.
511 Typically, reporting a bunch of issues leads to the ticket lingering
512 since nobody wants to attack that behemoth, until someone mercifully
513 splits the issue into multiple ones.
514 .PP
515 In particular, every site support request issue should only pertain to
516 services at one site (generally under a common domain, but always using
517 the same backend technology).
518 Do not request support for vimeo user videos, Whitehouse podcasts, and
519 Google Plus pages in the same issue.
520 Also, make sure that you don\[aq]t post bug reports alongside feature
521 requests.
522 As a rule of thumb, a feature request does not include outputs of
523 youtube\-dl that are not immediately related to the feature at hand.
524 Do not post reports of a network error alongside the request for a new
525 video service.
526 .SS Is anyone going to need the feature?
527 .PP
528 Only post features that you (or an incapicated friend you can personally
529 talk to) require.
530 Do not post features because they seem like a good idea.
531 If they are really useful, they will be requested by someone who
532 requires them.
533 .SS Is your question about youtube\-dl?
534 .PP
535 It may sound strange, but some bug reports we receive are completely
536 unrelated to youtube\-dl and relate to a different or even the
537 reporter\[aq]s own application.
538 Please make sure that you are actually using youtube\-dl.
539 If you are using a UI for youtube\-dl, report the bug to the maintainer
540 of the actual application providing the UI.
541 On the other hand, if your UI for youtube\-dl fails in some way you
542 believe is related to youtube\-dl, by all means, go ahead and report the
543 bug.