]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube-dl.1
26833e8f082276b9a1f8f0de3fbdc4ccf49242d6
[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
24 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sure\ that\ you\ have\ sufficient\ permissions
25 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (run\ with\ sudo\ if\ needed)
26 \-i,\ \-\-ignore\-errors\ \ \ \ \ \ \ \ \ \ \ \ \ \ continue\ on\ download\ errors,\ for\ example\ 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
30 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ occurs
31 \-\-dump\-user\-agent\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ display\ the\ current\ browser\ identification
32 \-\-user\-agent\ UA\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ specify\ a\ custom\ user\ agent
33 \-\-referer\ REF\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ specify\ a\ custom\ referer,\ use\ if\ the\ video
34 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ access\ is\ restricted\ to\ one\ domain
35 \-\-add\-header\ FIELD:VALUE\ \ \ \ \ \ \ \ \ specify\ a\ custom\ HTTP\ header\ and\ its\ value,
36 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ separated\ by\ a\ colon\ \[aq]:\[aq].\ You\ can\ use\ this
37 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ option\ multiple\ times
38 \-\-list\-extractors\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ List\ all\ supported\ extractors\ and\ the\ URLs
39 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ they\ would\ handle
40 \-\-extractor\-descriptions\ \ \ \ \ \ \ \ \ Output\ descriptions\ of\ all\ supported
41 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ extractors
42 \-\-proxy\ URL\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ the\ specified\ HTTP/HTTPS\ proxy.\ Pass\ in
43 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ an\ empty\ string\ (\-\-proxy\ "")\ for\ direct
44 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ connection
45 \-\-no\-check\-certificate\ \ \ \ \ \ \ \ \ \ \ Suppress\ HTTPS\ certificate\ validation.
46 \-\-prefer\-insecure\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ an\ unencrypted\ connection\ to\ retrieve
47 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ information\ about\ the\ video.\ (Currently
48 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supported\ only\ for\ YouTube)
49 \-\-cache\-dir\ DIR\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Location\ in\ the\ filesystem\ where\ youtube\-dl
50 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ can\ store\ some\ downloaded\ information
51 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ permanently.\ By\ default\ $XDG_CACHE_HOME
52 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ /youtube\-dl\ or\ ~/.cache/youtube\-dl\ .\ At\ the
53 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ moment,\ only\ YouTube\ player\ files\ (for
54 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ videos\ with\ obfuscated\ signatures)\ are
55 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cached,\ but\ that\ may\ change.
56 \-\-no\-cache\-dir\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Disable\ filesystem\ caching
57 \-\-socket\-timeout\ None\ \ \ \ \ \ \ \ \ \ \ \ Time\ to\ wait\ before\ giving\ up,\ in\ seconds
58 \-\-bidi\-workaround\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Work\ around\ terminals\ that\ lack
59 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ bidirectional\ text\ support.\ Requires\ bidiv
60 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ fribidi\ executable\ in\ PATH
61 \-\-default\-search\ PREFIX\ \ \ \ \ \ \ \ \ \ Use\ this\ prefix\ for\ unqualified\ URLs.\ For
62 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ example\ "gvsearch2:"\ downloads\ two\ videos
63 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ google\ videos\ for\ \ youtube\-dl\ "large
64 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ apple".\ Use\ the\ value\ "auto"\ to\ let
65 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ youtube\-dl\ guess.\ The\ default\ value\ "error"
66 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ just\ throws\ an\ error.
67 \-\-ignore\-config\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ read\ configuration\ files.\ When\ given
68 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ in\ the\ global\ configuration\ file\ /etc
69 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ /youtube\-dl.conf:\ do\ not\ read\ the\ user
70 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ configuration\ in\ ~/.config/youtube\-dl.conf
71 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (%APPDATA%/youtube\-dl/config.txt\ on
72 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Windows)
73 \-\-encoding\ ENCODING\ \ \ \ \ \ \ \ \ \ \ \ \ \ Force\ the\ specified\ encoding\ (experimental)
74 \f[]
75 .fi
76 .SS Video Selection:
77 .IP
78 .nf
79 \f[C]
80 \-\-playlist\-start\ NUMBER\ \ \ \ \ \ \ \ \ \ playlist\ video\ to\ start\ at\ (default\ is\ 1)
81 \-\-playlist\-end\ NUMBER\ \ \ \ \ \ \ \ \ \ \ \ playlist\ video\ to\ end\ at\ (default\ is\ last)
82 \-\-match\-title\ REGEX\ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ matching\ titles\ (regex\ or
83 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub\-string)
84 \-\-reject\-title\ REGEX\ \ \ \ \ \ \ \ \ \ \ \ \ skip\ download\ for\ matching\ titles\ (regex\ or
85 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub\-string)
86 \-\-max\-downloads\ NUMBER\ \ \ \ \ \ \ \ \ \ \ Abort\ after\ downloading\ NUMBER\ files
87 \-\-min\-filesize\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ smaller\ than
88 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SIZE\ (e.g.\ 50k\ or\ 44.6m)
89 \-\-max\-filesize\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ larger\ than\ SIZE
90 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (e.g.\ 50k\ or\ 44.6m)
91 \-\-date\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ in\ this\ date
92 \-\-datebefore\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ on\ or\ before
93 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this\ date\ (i.e.\ inclusive)
94 \-\-dateafter\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ uploaded\ on\ or\ after
95 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this\ date\ (i.e.\ inclusive)
96 \-\-min\-views\ COUNT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ less\ than
97 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ COUNT\ views
98 \-\-max\-views\ COUNT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ more\ than
99 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ COUNT\ views
100 \-\-no\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ the\ currently\ playing\ video
101 \-\-age\-limit\ YEARS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ only\ videos\ suitable\ for\ the\ given
102 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ age
103 \-\-download\-archive\ FILE\ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ not\ listed\ in\ the
104 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ archive\ file.\ Record\ the\ IDs\ of\ all
105 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ downloaded\ videos\ in\ it.
106 \-\-include\-ads\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ advertisements\ as\ well
107 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (experimental)
108 \-\-youtube\-include\-dash\-manifest\ \ Try\ to\ download\ the\ DASH\ manifest\ on
109 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ YouTube\ videos\ (experimental)
110 \f[]
111 .fi
112 .SS Download Options:
113 .IP
114 .nf
115 \f[C]
116 \-r,\ \-\-rate\-limit\ LIMIT\ \ \ \ \ \ \ \ \ \ \ maximum\ download\ rate\ in\ bytes\ per\ second
117 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (e.g.\ 50K\ or\ 4.2M)
118 \-R,\ \-\-retries\ RETRIES\ \ \ \ \ \ \ \ \ \ \ \ number\ of\ retries\ (default\ is\ 10)
119 \-\-buffer\-size\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ size\ of\ download\ buffer\ (e.g.\ 1024\ or\ 16K)
120 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (default\ is\ 1024)
121 \-\-no\-resize\-buffer\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ automatically\ adjust\ the\ buffer
122 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ size.\ By\ default,\ the\ buffer\ size\ is
123 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ automatically\ resized\ from\ an\ initial\ value
124 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ of\ SIZE.
125 \f[]
126 .fi
127 .SS Filesystem Options:
128 .IP
129 .nf
130 \f[C]
131 \-t,\ \-\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ title\ in\ file\ name\ (default)
132 \-\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ only\ video\ ID\ in\ file\ name
133 \-l,\ \-\-literal\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated]\ alias\ of\ \-\-title
134 \-A,\ \-\-auto\-number\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ number\ downloaded\ files\ starting\ from\ 00000
135 \-o,\ \-\-output\ TEMPLATE\ \ \ \ \ \ \ \ \ \ \ \ output\ filename\ template.\ Use\ %(title)s\ to
136 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ get\ the\ title,\ %(uploader)s\ for\ the
137 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uploader\ name,\ %(uploader_id)s\ for\ the
138 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uploader\ nickname\ if\ different,
139 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(autonumber)s\ to\ get\ an\ automatically
140 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incremented\ number,\ %(ext)s\ for\ the
141 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ filename\ extension,\ %(format)s\ for\ the
142 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ format\ description\ (like\ "22\ \-\ 1280x720"\ or
143 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "HD"),\ %(format_id)s\ for\ the\ unique\ id\ of
144 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ format\ (like\ Youtube\[aq]s\ itags:\ "137"),
145 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(upload_date)s\ for\ the\ upload\ date
146 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (YYYYMMDD),\ %(extractor)s\ for\ the\ provider
147 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (youtube,\ metacafe,\ etc),\ %(id)s\ for\ the
148 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ video\ id,\ %(playlist)s\ for\ the\ playlist\ the
149 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ video\ is\ in,\ %(playlist_index)s\ for\ the
150 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ position\ in\ the\ playlist\ and\ %%\ for\ a
151 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ literal\ percent.\ %(height)s\ and\ %(width)s
152 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ for\ the\ width\ and\ height\ of\ the\ video
153 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ format.\ %(resolution)s\ for\ a\ textual
154 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ description\ of\ the\ resolution\ of\ the\ video
155 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ format.\ Use\ \-\ to\ output\ to\ stdout.\ Can\ also
156 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ be\ used\ to\ download\ to\ a\ different
157 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ directory,\ for\ example\ with\ \-o\ \[aq]/my/downloa
158 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ds/%(uploader)s/%(title)s\-%(id)s.%(ext)s\[aq]\ .
159 \-\-autonumber\-size\ NUMBER\ \ \ \ \ \ \ \ \ Specifies\ the\ number\ of\ digits\ in
160 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(autonumber)s\ when\ it\ is\ present\ in\ output
161 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ filename\ template\ or\ \-\-auto\-number\ option
162 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ is\ given
163 \-\-restrict\-filenames\ \ \ \ \ \ \ \ \ \ \ \ \ Restrict\ filenames\ to\ only\ ASCII
164 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ characters,\ and\ avoid\ "&"\ and\ spaces\ in
165 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ filenames
166 \-a,\ \-\-batch\-file\ FILE\ \ \ \ \ \ \ \ \ \ \ \ file\ containing\ URLs\ to\ download\ (\[aq]\-\[aq]\ for
167 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stdin)
168 \-\-load\-info\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ json\ file\ containing\ the\ video\ information
169 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (created\ with\ the\ "\-\-write\-json"\ option)
170 \-w,\ \-\-no\-overwrites\ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ overwrite\ files
171 \-c,\ \-\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ force\ resume\ of\ partially\ downloaded\ files.
172 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ By\ default,\ youtube\-dl\ will\ resume
173 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ downloads\ if\ possible.
174 \-\-no\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ resume\ partially\ downloaded\ files
175 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (restart\ from\ beginning)
176 \-\-cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file\ to\ read\ cookies\ from\ and\ dump\ cookie
177 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ jar\ in
178 \-\-no\-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ .part\ files
179 \-\-no\-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ the\ Last\-modified\ header\ to\ set
180 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ file\ modification\ time
181 \-\-write\-description\ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ video\ description\ to\ a\ .description
182 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file
183 \-\-write\-info\-json\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ video\ metadata\ to\ a\ .info.json\ file
184 \-\-write\-annotations\ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ video\ annotations\ to\ a\ .annotation
185 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file
186 \-\-write\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ thumbnail\ image\ to\ disk
187 \f[]
188 .fi
189 .SS Verbosity / Simulation Options:
190 .IP
191 .nf
192 \f[C]
193 \-q,\ \-\-quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ activates\ quiet\ mode
194 \-\-no\-warnings\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ignore\ warnings
195 \-s,\ \-\-simulate\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video\ and\ do\ not\ write
196 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ anything\ to\ disk
197 \-\-skip\-download\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video
198 \-g,\ \-\-get\-url\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ URL
199 \-e,\ \-\-get\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ title
200 \-\-get\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ id
201 \-\-get\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ thumbnail\ URL
202 \-\-get\-description\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ description
203 \-\-get\-duration\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ length
204 \-\-get\-filename\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ filename
205 \-\-get\-format\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ format
206 \-j,\ \-\-dump\-json\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ JSON\ information.
207 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ See\ \-\-output\ for\ a\ description\ of\ available
208 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ keys.
209 \-\-newline\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ output\ progress\ bar\ as\ new\ lines
210 \-\-no\-progress\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ print\ progress\ bar
211 \-\-console\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ display\ progress\ in\ console\ titlebar
212 \-v,\ \-\-verbose\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ print\ various\ debugging\ information
213 \-\-dump\-intermediate\-pages\ \ \ \ \ \ \ \ print\ downloaded\ pages\ to\ debug\ problems
214 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (very\ verbose)
215 \-\-write\-pages\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ downloaded\ intermediary\ pages\ to
216 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ files\ in\ the\ current\ directory\ to\ debug
217 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ problems
218 \-\-print\-traffic\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Display\ sent\ and\ read\ HTTP\ traffic
219 \f[]
220 .fi
221 .SS Video Format Options:
222 .IP
223 .nf
224 \f[C]
225 \-f,\ \-\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ \ \ video\ format\ code,\ specify\ the\ order\ of
226 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ preference\ using\ slashes:\ "\-f\ 22/17/18".
227 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "\-f\ mp4"\ and\ "\-f\ flv"\ are\ also\ supported.
228 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ You\ can\ also\ use\ the\ special\ names\ "best",
229 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "bestvideo",\ "bestaudio",\ "worst",
230 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "worstvideo"\ and\ "worstaudio".\ By\ default,
231 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ youtube\-dl\ will\ pick\ the\ best\ quality.
232 \-\-all\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ all\ available\ video\ formats
233 \-\-prefer\-free\-formats\ \ \ \ \ \ \ \ \ \ \ \ prefer\ free\ video\ formats\ unless\ a\ specific
234 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ one\ is\ requested
235 \-\-max\-quality\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ \ highest\ quality\ format\ to\ download
236 \-F,\ \-\-list\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ list\ all\ available\ formats
237 \f[]
238 .fi
239 .SS Subtitle Options:
240 .IP
241 .nf
242 \f[C]
243 \-\-write\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ subtitle\ file
244 \-\-write\-auto\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ automatic\ subtitle\ file\ (youtube
245 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ only)
246 \-\-all\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ downloads\ all\ the\ available\ subtitles\ of
247 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ video
248 \-\-list\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lists\ all\ available\ subtitles\ for\ the\ video
249 \-\-sub\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ \ \ subtitle\ format\ (default=srt)\ ([sbv/vtt]
250 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ youtube\ only)
251 \-\-sub\-lang\ LANGS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ languages\ of\ the\ subtitles\ to\ download
252 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (optional)\ separated\ by\ commas,\ use\ IETF
253 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ language\ tags\ like\ \[aq]en,pt\[aq]
254 \f[]
255 .fi
256 .SS Authentication Options:
257 .IP
258 .nf
259 \f[C]
260 \-u,\ \-\-username\ USERNAME\ \ \ \ \ \ \ \ \ \ account\ username
261 \-p,\ \-\-password\ PASSWORD\ \ \ \ \ \ \ \ \ \ account\ password
262 \-n,\ \-\-netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ .netrc\ authentication\ data
263 \-\-video\-password\ PASSWORD\ \ \ \ \ \ \ \ video\ password\ (vimeo,\ smotri)
264 \f[]
265 .fi
266 .SS Post\-processing Options:
267 .IP
268 .nf
269 \f[C]
270 \-x,\ \-\-extract\-audio\ \ \ \ \ \ \ \ \ \ \ \ \ \ convert\ video\ files\ to\ audio\-only\ files
271 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (requires\ ffmpeg\ or\ avconv\ and\ ffprobe\ or
272 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ avprobe)
273 \-\-audio\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",
274 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "opus",\ or\ "wav";\ best\ by\ default
275 \-\-audio\-quality\ QUALITY\ \ \ \ \ \ \ \ \ \ ffmpeg/avconv\ audio\ quality\ specification,
276 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ insert\ a\ value\ between\ 0\ (better)\ and\ 9
277 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (worse)\ for\ VBR\ or\ a\ specific\ bitrate\ like
278 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 128K\ (default\ 5)
279 \-\-recode\-video\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ Encode\ the\ video\ to\ another\ format\ if
280 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ necessary\ (currently\ supported:
281 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mp4|flv|ogg|webm|mkv)
282 \-k,\ \-\-keep\-video\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ keeps\ the\ video\ file\ on\ disk\ after\ the
283 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ post\-processing;\ the\ video\ is\ erased\ by
284 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default
285 \-\-no\-post\-overwrites\ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ overwrite\ post\-processed\ files;\ the
286 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ post\-processed\ files\ are\ overwritten\ by
287 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default
288 \-\-embed\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ embed\ subtitles\ in\ the\ video\ (only\ for\ mp4
289 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ videos)
290 \-\-embed\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ embed\ thumbnail\ in\ the\ audio\ as\ cover\ art
291 \-\-add\-metadata\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ metadata\ to\ the\ video\ file
292 \-\-xattrs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ metadata\ to\ the\ video\ file\[aq]s\ xattrs
293 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (using\ dublin\ core\ and\ xdg\ standards)
294 \-\-prefer\-avconv\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Prefer\ avconv\ over\ ffmpeg\ for\ running\ the
295 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ postprocessors\ (default)
296 \-\-prefer\-ffmpeg\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Prefer\ ffmpeg\ over\ avconv\ for\ running\ the
297 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ postprocessors
298 \f[]
299 .fi
300 .SH CONFIGURATION
301 .PP
302 You can configure youtube\-dl by placing default arguments (such as
303 \f[C]\-\-extract\-audio\ \-\-no\-mtime\f[] to always extract the audio
304 and not copy the mtime) into \f[C]/etc/youtube\-dl.conf\f[] and/or
305 \f[C]~/.config/youtube\-dl/config\f[].
306 On Windows, the configuration file locations are
307 \f[C]%APPDATA%\\youtube\-dl\\config.txt\f[] and
308 \f[C]C:\\Users\\<Yourname>\\youtube\-dl.conf\f[].
309 .SH OUTPUT TEMPLATE
310 .PP
311 The \f[C]\-o\f[] option allows users to indicate a template for the
312 output file names.
313 The basic usage is not to set any template arguments when downloading a
314 single file, like in
315 \f[C]youtube\-dl\ \-o\ funny_video.flv\ "http://some/video"\f[].
316 However, it may contain special sequences that will be replaced when
317 downloading each video.
318 The special sequences have the format \f[C]%(NAME)s\f[].
319 To clarify, that is a percent symbol followed by a name in parenthesis,
320 followed by a lowercase S.
321 Allowed names are:
322 .IP \[bu] 2
323 \f[C]id\f[]: The sequence will be replaced by the video identifier.
324 .IP \[bu] 2
325 \f[C]url\f[]: The sequence will be replaced by the video URL.
326 .IP \[bu] 2
327 \f[C]uploader\f[]: The sequence will be replaced by the nickname of the
328 person who uploaded the video.
329 .IP \[bu] 2
330 \f[C]upload_date\f[]: The sequence will be replaced by the upload date
331 in YYYYMMDD format.
332 .IP \[bu] 2
333 \f[C]title\f[]: The sequence will be replaced by the video title.
334 .IP \[bu] 2
335 \f[C]ext\f[]: The sequence will be replaced by the appropriate extension
336 (like flv or mp4).
337 .IP \[bu] 2
338 \f[C]epoch\f[]: The sequence will be replaced by the Unix epoch when
339 creating the file.
340 .IP \[bu] 2
341 \f[C]autonumber\f[]: The sequence will be replaced by a five\-digit
342 number that will be increased with each download, starting at zero.
343 .IP \[bu] 2
344 \f[C]playlist\f[]: The name or the id of the playlist that contains the
345 video.
346 .IP \[bu] 2
347 \f[C]playlist_index\f[]: The index of the video in the playlist, a
348 five\-digit number.
349 .PP
350 The current default template is \f[C]%(title)s\-%(id)s.%(ext)s\f[].
351 .PP
352 In some cases, you don\[aq]t want special characters such as äø­, spaces,
353 or &, such as when transferring the downloaded filename to a Windows
354 system or the filename through an 8bit\-unsafe channel.
355 In these cases, add the \f[C]\-\-restrict\-filenames\f[] flag to get a
356 shorter title:
357 .IP
358 .nf
359 \f[C]
360 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc
361 youtube\-dl\ test\ video\ \[aq]\[aq]_Ƥā†­š•.mp4\ \ \ \ #\ All\ kinds\ of\ weird\ characters
362 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc\ \-\-restrict\-filenames
363 youtube\-dl_test_video_.mp4\ \ \ \ \ \ \ \ \ \ #\ A\ simple\ file\ name
364 \f[]
365 .fi
366 .SH VIDEO SELECTION
367 .PP
368 Videos can be filtered by their upload date using the options
369 \f[C]\-\-date\f[], \f[C]\-\-datebefore\f[] or \f[C]\-\-dateafter\f[],
370 they accept dates in two formats:
371 .IP \[bu] 2
372 Absolute dates: Dates in the format \f[C]YYYYMMDD\f[].
373 .IP \[bu] 2
374 Relative dates: Dates in the format
375 \f[C](now|today)[+\-][0\-9](day|week|month|year)(s)?\f[]
376 .PP
377 Examples:
378 .IP
379 .nf
380 \f[C]
381 #\ Download\ only\ the\ videos\ uploaded\ in\ the\ last\ 6\ months
382 $\ youtube\-dl\ \-\-dateafter\ now\-6months
383
384 #\ Download\ only\ the\ videos\ uploaded\ on\ January\ 1,\ 1970
385 $\ youtube\-dl\ \-\-date\ 19700101
386
387 $\ #\ will\ only\ download\ the\ videos\ uploaded\ in\ the\ 200x\ decade
388 $\ youtube\-dl\ \-\-dateafter\ 20000101\ \-\-datebefore\ 20091231
389 \f[]
390 .fi
391 .SH FAQ
392 .SS Can you please put the \-b option back?
393 .PP
394 Most people asking this question are not aware that youtube\-dl now
395 defaults to downloading the highest available quality as reported by
396 YouTube, which will be 1080p or 720p in some cases, so you no longer
397 need the \f[C]\-b\f[] option.
398 For some specific videos, maybe YouTube does not report them to be
399 available in a specific high quality format you\[aq]re interested in.
400 In that case, simply request it with the \f[C]\-f\f[] option and
401 youtube\-dl will try to download it.
402 .SS I get HTTP error 402 when trying to download a video. What\[aq]s
403 this?
404 .PP
405 Apparently YouTube requires you to pass a CAPTCHA test if you download
406 too much.
407 We\[aq]re considering to provide a way to let you solve the
408 CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
409 moment, your best course of action is pointing a webbrowser to the
410 youtube URL, solving the CAPTCHA, and restart youtube\-dl.
411 .SS I have downloaded a video but how can I play it?
412 .PP
413 Once the video is fully downloaded, use any video player, such as
414 vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
415 .SS The links provided by youtube\-dl \-g are not working anymore
416 .PP
417 The URLs youtube\-dl outputs require the downloader to have the correct
418 cookies.
419 Use the \f[C]\-\-cookies\f[] option to write the required cookies into a
420 file, and advise your downloader to read cookies from that file.
421 Some sites also require a common user agent to be used, use
422 \f[C]\-\-dump\-user\-agent\f[] to see the one in use by youtube\-dl.
423 .SS ERROR: no fmt_url_map or conn information found in video info
424 .PP
425 youtube has switched to a new video info format in July 2011 which is
426 not supported by old versions of youtube\-dl.
427 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
428 .SS ERROR: unable to download video
429 .PP
430 youtube requires an additional signature since September 2012 which is
431 not supported by old versions of youtube\-dl.
432 You can update youtube\-dl with \f[C]sudo\ youtube\-dl\ \-\-update\f[].
433 .SS SyntaxError: Non\-ASCII character
434 .PP
435 The error
436 .IP
437 .nf
438 \f[C]
439 File\ "youtube\-dl",\ line\ 2
440 SyntaxError:\ Non\-ASCII\ character\ \[aq]\\x93\[aq]\ ...
441 \f[]
442 .fi
443 .PP
444 means you\[aq]re using an outdated version of Python.
445 Please update to Python 2.6 or 2.7.
446 .SS What is this binary file? Where has the code gone?
447 .PP
448 Since June 2012 (#342) youtube\-dl is packed as an executable zipfile,
449 simply unzip it (might need renaming to \f[C]youtube\-dl.zip\f[] first
450 on some systems) or clone the git repository, as laid out above.
451 If you modify the code, you can run it by executing the
452 \f[C]__main__.py\f[] file.
453 To recompile the executable, run \f[C]make\ youtube\-dl\f[].
454 .SS The exe throws a \f[I]Runtime error from Visual C++\f[]
455 .PP
456 To run the exe you need to install first the Microsoft Visual C++ 2008
457 Redistributable
458 Package (http://www.microsoft.com/en-us/download/details.aspx?id=29).
459 .SH DEVELOPER INSTRUCTIONS
460 .PP
461 Most users do not need to build youtube\-dl and can download the
462 builds (http://rg3.github.io/youtube-dl/download.html) or get them from
463 their distribution.
464 .PP
465 To run youtube\-dl as a developer, you don\[aq]t need to build anything
466 either.
467 Simply execute
468 .IP
469 .nf
470 \f[C]
471 python\ \-m\ youtube_dl
472 \f[]
473 .fi
474 .PP
475 To run the test, simply invoke your favorite test runner, or execute a
476 test file directly; any of the following work:
477 .IP
478 .nf
479 \f[C]
480 python\ \-m\ unittest\ discover
481 python\ test/test_download.py
482 nosetests
483 \f[]
484 .fi
485 .PP
486 If you want to create a build of youtube\-dl yourself, you\[aq]ll need
487 .IP \[bu] 2
488 python
489 .IP \[bu] 2
490 make
491 .IP \[bu] 2
492 pandoc
493 .IP \[bu] 2
494 zip
495 .IP \[bu] 2
496 nosetests
497 .SS Adding support for a new site
498 .PP
499 If you want to add support for a new site, you can follow this quick
500 list (assuming your service is called \f[C]yourextractor\f[]):
501 .IP " 1." 4
502 Fork this repository (https://github.com/rg3/youtube-dl/fork)
503 .IP " 2." 4
504 Check out the source code with
505 \f[C]git\ clone\ git\@github.com:YOUR_GITHUB_USERNAME/youtube\-dl.git\f[]
506 .IP " 3." 4
507 Start a new git branch with
508 \f[C]cd\ youtube\-dl;\ git\ checkout\ \-b\ yourextractor\f[]
509 .IP " 4." 4
510 Start with this simple template and save it to
511 \f[C]youtube_dl/extractor/yourextractor.py\f[]:
512 .RS 4
513 .IP
514 .nf
515 \f[C]
516 #\ coding:\ utf\-8
517 from\ __future__\ import\ unicode_literals
518
519 import\ re
520
521 from\ .common\ import\ InfoExtractor
522
523
524 class\ YourExtractorIE(InfoExtractor):
525 \ \ \ \ _VALID_URL\ =\ r\[aq]https?://(?:www\\.)?yourextractor\\.com/watch/(?P<id>[0\-9]+)\[aq]
526 \ \ \ \ _TEST\ =\ {
527 \ \ \ \ \ \ \ \ \[aq]url\[aq]:\ \[aq]http://yourextractor.com/watch/42\[aq],
528 \ \ \ \ \ \ \ \ \[aq]md5\[aq]:\ \[aq]TODO:\ md5\ sum\ of\ the\ first\ 10KiB\ of\ the\ video\ file\[aq],
529 \ \ \ \ \ \ \ \ \[aq]info_dict\[aq]:\ {
530 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]id\[aq]:\ \[aq]42\[aq],
531 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]ext\[aq]:\ \[aq]mp4\[aq],
532 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]title\[aq]:\ \[aq]Video\ title\ goes\ here\[aq],
533 \ \ \ \ \ \ \ \ \ \ \ \ #\ TODO\ more\ properties,\ either\ as:
534 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ A\ value
535 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ MD5\ checksum;\ start\ the\ string\ with\ md5:
536 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ A\ regular\ expression;\ start\ the\ string\ with\ re:
537 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ Any\ Python\ type\ (for\ example\ int\ or\ float)
538 \ \ \ \ \ \ \ \ }
539 \ \ \ \ }
540
541 \ \ \ \ def\ _real_extract(self,\ url):
542 \ \ \ \ \ \ \ \ mobj\ =\ re.match(self._VALID_URL,\ url)
543 \ \ \ \ \ \ \ \ video_id\ =\ mobj.group(\[aq]id\[aq])
544
545 \ \ \ \ \ \ \ \ #\ TODO\ more\ code\ goes\ here,\ for\ example\ ...
546 \ \ \ \ \ \ \ \ webpage\ =\ self._download_webpage(url,\ video_id)
547 \ \ \ \ \ \ \ \ title\ =\ self._html_search_regex(r\[aq]<h1>(.*?)</h1>\[aq],\ webpage,\ \[aq]title\[aq])
548
549 \ \ \ \ \ \ \ \ return\ {
550 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]id\[aq]:\ video_id,
551 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]title\[aq]:\ title,
552 \ \ \ \ \ \ \ \ \ \ \ \ #\ TODO\ more\ properties\ (see\ youtube_dl/extractor/common.py)
553 \ \ \ \ \ \ \ \ }
554 \f[]
555 .fi
556 .RE
557 .IP " 5." 4
558 Add an import in
559 \f[C]youtube_dl/extractor/__init__.py\f[] (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/__init__.py).
560 .IP " 6." 4
561 Run
562 \f[C]python\ test/test_download.py\ TestDownload.test_YourExtractor\f[].
563 This \f[I]should fail\f[] at first, but you can continually re\-run it
564 until you\[aq]re done.
565 .IP " 7." 4
566 Have a look at
567 \f[C]youtube_dl/common/extractor/common.py\f[] (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py)
568 for possible helper methods and a detailed description of what your
569 extractor should
570 return (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py#L38).
571 Add tests and code for as many as you want.
572 .IP " 8." 4
573 If you can, check the code with
574 pyflakes (https://pypi.python.org/pypi/pyflakes) (a good idea) and
575 pep8 (https://pypi.python.org/pypi/pep8) (optional, ignore E501).
576 .IP " 9." 4
577 When the tests pass,
578 add (https://www.kernel.org/pub/software/scm/git/docs/git-add.html) the
579 new files and
580 commit (https://www.kernel.org/pub/software/scm/git/docs/git-commit.html)
581 them and
582 push (https://www.kernel.org/pub/software/scm/git/docs/git-push.html)
583 the result, like this:
584 .RS 4
585 .IP
586 .nf
587 \f[C]
588 $\ git\ add\ youtube_dl/extractor/__init__.py
589 $\ git\ add\ youtube_dl/extractor/yourextractor.py
590 $\ git\ commit\ \-m\ \[aq][yourextractor]\ Add\ new\ extractor\[aq]
591 $\ git\ push\ origin\ yourextractor
592 \f[]
593 .fi
594 .RE
595 .IP "10." 4
596 Finally, create a pull
597 request (https://help.github.com/articles/creating-a-pull-request).
598 We\[aq]ll then review and merge it.
599 .PP
600 In any case, thank you very much for your contributions!
601 .SH BUGS
602 .PP
603 Bugs and suggestions should be reported at:
604 <https://github.com/rg3/youtube-dl/issues> .
605 Unless you were prompted so or there is another pertinent reason (e.g.
606 GitHub fails to accept the bug report), please do not send bug reports
607 via personal email.
608 .PP
609 Please include the full output of the command when run with
610 \f[C]\-\-verbose\f[].
611 The output (including the first lines) contain important debugging
612 information.
613 Issues without the full output are often not reproducible and therefore
614 do not get solved in short order, if ever.
615 .PP
616 For discussions, join us in the irc channel #youtube\-dl on freenode.
617 .PP
618 When you submit a request, please re\-read it once to avoid a couple of
619 mistakes (you can and should use this as a checklist):
620 .SS Is the description of the issue itself sufficient?
621 .PP
622 We often get issue reports that we cannot really decipher.
623 While in most cases we eventually get the required information after
624 asking back multiple times, this poses an unnecessary drain on our
625 resources.
626 Many contributors, including myself, are also not native speakers, so we
627 may misread some parts.
628 .PP
629 So please elaborate on what feature you are requesting, or what bug you
630 want to be fixed.
631 Make sure that it\[aq]s obvious
632 .IP \[bu] 2
633 What the problem is
634 .IP \[bu] 2
635 How it could be fixed
636 .IP \[bu] 2
637 How your proposed solution would look like
638 .PP
639 If your report is shorter than two lines, it is almost certainly missing
640 some of these, which makes it hard for us to respond to it.
641 We\[aq]re often too polite to close the issue outright, but the missing
642 info makes misinterpretation likely.
643 As a commiter myself, I often get frustrated by these issues, since the
644 only possible way for me to move forward on them is to ask for
645 clarification over and over.
646 .PP
647 For bug reports, this means that your report should contain the
648 \f[I]complete\f[] output of youtube\-dl when called with the \-v flag.
649 The error message you get for (most) bugs even says so, but you would
650 not believe how many of our bug reports do not contain this information.
651 .PP
652 Site support requests \f[B]must contain an example URL\f[].
653 An example URL is a URL you might want to download, like
654 http://www.youtube.com/watch?v=BaW_jenozKc .
655 There should be an obvious video present.
656 Except under very special circumstances, the main page of a video
657 service (e.g.
658 http://www.youtube.com/ ) is \f[I]not\f[] an example URL.
659 .SS Are you using the latest version?
660 .PP
661 Before reporting any issue, type youtube\-dl \-U.
662 This should report that you\[aq]re up\-to\-date.
663 About 20% of the reports we receive are already fixed, but people are
664 using outdated versions.
665 This goes for feature requests as well.
666 .SS Is the issue already documented?
667 .PP
668 Make sure that someone has not already opened the issue you\[aq]re
669 trying to open.
670 Search at the top of the window or at
671 https://github.com/rg3/youtube\-dl/search?type=Issues .
672 If there is an issue, feel free to write something along the lines of
673 "This affects me as well, with version 2015.01.01.
674 Here is some more information on the issue: ...".
675 While some issues may be old, a new post into them often spurs rapid
676 activity.
677 .SS Why are existing options not enough?
678 .PP
679 Before requesting a new feature, please have a quick peek at the list of
680 supported
681 options (https://github.com/rg3/youtube-dl/blob/master/README.md#synopsis).
682 Many feature requests are for features that actually exist already!
683 Please, absolutely do show off your work in the issue report and detail
684 how the existing similar options do \f[I]not\f[] solve your problem.
685 .SS Is there enough context in your bug report?
686 .PP
687 People want to solve problems, and often think they do us a favor by
688 breaking down their larger problems (e.g.
689 wanting to skip already downloaded files) to a specific request (e.g.
690 requesting us to look whether the file exists before downloading the
691 info page).
692 However, what often happens is that they break down the problem into two
693 steps: One simple, and one impossible (or extremely complicated one).
694 .PP
695 We are then presented with a very complicated request when the original
696 problem could be solved far easier, e.g.
697 by recording the downloaded video IDs in a separate file.
698 To avoid this, you must include the greater context where it is
699 non\-obvious.
700 In particular, every feature request that does not consist of adding
701 support for a new site should contain a use case scenario that explains
702 in what situation the missing feature would be useful.
703 .SS Does the issue involve one problem, and one problem only?
704 .PP
705 Some of our users seem to think there is a limit of issues they can or
706 should open.
707 There is no limit of issues they can or should open.
708 While it may seem appealing to be able to dump all your issues into one
709 ticket, that means that someone who solves one of your issues cannot
710 mark the issue as closed.
711 Typically, reporting a bunch of issues leads to the ticket lingering
712 since nobody wants to attack that behemoth, until someone mercifully
713 splits the issue into multiple ones.
714 .PP
715 In particular, every site support request issue should only pertain to
716 services at one site (generally under a common domain, but always using
717 the same backend technology).
718 Do not request support for vimeo user videos, Whitehouse podcasts, and
719 Google Plus pages in the same issue.
720 Also, make sure that you don\[aq]t post bug reports alongside feature
721 requests.
722 As a rule of thumb, a feature request does not include outputs of
723 youtube\-dl that are not immediately related to the feature at hand.
724 Do not post reports of a network error alongside the request for a new
725 video service.
726 .SS Is anyone going to need the feature?
727 .PP
728 Only post features that you (or an incapicated friend you can personally
729 talk to) require.
730 Do not post features because they seem like a good idea.
731 If they are really useful, they will be requested by someone who
732 requires them.
733 .SS Is your question about youtube\-dl?
734 .PP
735 It may sound strange, but some bug reports we receive are completely
736 unrelated to youtube\-dl and relate to a different or even the
737 reporter\[aq]s own application.
738 Please make sure that you are actually using youtube\-dl.
739 If you are using a UI for youtube\-dl, report the bug to the maintainer
740 of the actual application providing the UI.
741 On the other hand, if your UI for youtube\-dl fails in some way you
742 believe is related to youtube\-dl, by all means, go ahead and report the
743 bug.
744 .SH COPYRIGHT
745 .PP
746 youtube\-dl is released into the public domain by the copyright holders.
747 .PP
748 This README file was originally written by Daniel Bolton
749 (<https://github.com/dbbolton>) and is likewise released into the public
750 domain.