]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube-dl.1
debian/control: Prefer ffmpeg to libav-tools in Recommends.
[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] 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.2+, 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\ that\ you\ have\ sufficient\ permissions\ (run\ with\ sudo\ if\ needed)
24 \-i,\ \-\-ignore\-errors\ \ \ \ \ \ \ \ \ \ \ \ \ \ Continue\ on\ download\ errors,\ for\ example\ to\ skip\ unavailable\ videos\ in\ a\ playlist
25 \-\-abort\-on\-error\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Abort\ downloading\ of\ further\ videos\ (in\ the\ playlist\ or\ the\ command\ line)\ if\ an\ error\ occurs
26 \-\-dump\-user\-agent\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Display\ the\ current\ browser\ identification
27 \-\-list\-extractors\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ List\ all\ supported\ extractors
28 \-\-extractor\-descriptions\ \ \ \ \ \ \ \ \ Output\ descriptions\ of\ all\ supported\ extractors
29 \-\-force\-generic\-extractor\ \ \ \ \ \ \ \ Force\ extraction\ to\ use\ the\ generic\ extractor
30 \-\-default\-search\ PREFIX\ \ \ \ \ \ \ \ \ \ Use\ this\ prefix\ for\ unqualified\ URLs.\ For\ example\ "gvsearch2:"\ downloads\ two\ videos\ from\ google\ videos\ for\ youtube\-dl\ "large\ apple".
31 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ the\ value\ "auto"\ to\ let\ youtube\-dl\ guess\ ("auto_warning"\ to\ emit\ a\ warning\ when\ guessing).\ "error"\ just\ throws\ an\ error.\ The
32 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default\ value\ "fixup_error"\ repairs\ broken\ URLs,\ but\ emits\ an\ error\ if\ this\ is\ not\ possible\ instead\ of\ searching.
33 \-\-ignore\-config\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ read\ configuration\ files.\ When\ given\ in\ the\ global\ configuration\ file\ /etc/youtube\-dl.conf:\ Do\ not\ read\ the\ user\ configuration
34 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ in\ ~/.config/youtube\-dl/config\ (%APPDATA%/youtube\-dl/config.txt\ on\ Windows)
35 \-\-flat\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ extract\ the\ videos\ of\ a\ playlist,\ only\ list\ them.
36 \-\-no\-color\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ emit\ color\ codes\ in\ output
37 \f[]
38 .fi
39 .SS Network Options:
40 .IP
41 .nf
42 \f[C]
43 \-\-proxy\ URL\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ the\ specified\ HTTP/HTTPS\ proxy.\ Pass\ in\ an\ empty\ string\ (\-\-proxy\ "")\ for\ direct\ connection
44 \-\-socket\-timeout\ SECONDS\ \ \ \ \ \ \ \ \ Time\ to\ wait\ before\ giving\ up,\ in\ seconds
45 \-\-source\-address\ IP\ \ \ \ \ \ \ \ \ \ \ \ \ \ Client\-side\ IP\ address\ to\ bind\ to\ (experimental)
46 \-4,\ \-\-force\-ipv4\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Make\ all\ connections\ via\ IPv4\ (experimental)
47 \-6,\ \-\-force\-ipv6\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Make\ all\ connections\ via\ IPv6\ (experimental)
48 \-\-cn\-verification\-proxy\ URL\ \ \ \ \ \ Use\ this\ proxy\ to\ verify\ the\ IP\ address\ for\ some\ Chinese\ sites.\ The\ default\ proxy\ specified\ by\ \-\-proxy\ (or\ none,\ if\ the\ options\ is
49 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ not\ present)\ is\ used\ for\ the\ actual\ downloading.\ (experimental)
50 \f[]
51 .fi
52 .SS Video Selection:
53 .IP
54 .nf
55 \f[C]
56 \-\-playlist\-start\ NUMBER\ \ \ \ \ \ \ \ \ \ Playlist\ video\ to\ start\ at\ (default\ is\ 1)
57 \-\-playlist\-end\ NUMBER\ \ \ \ \ \ \ \ \ \ \ \ Playlist\ video\ to\ end\ at\ (default\ is\ last)
58 \-\-playlist\-items\ ITEM_SPEC\ \ \ \ \ \ \ Playlist\ video\ items\ to\ download.\ Specify\ indices\ of\ the\ videos\ in\ the\ playlist\ separated\ by\ commas\ like:\ "\-\-playlist\-items\ 1,2,5,8"
59 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ you\ want\ to\ download\ videos\ indexed\ 1,\ 2,\ 5,\ 8\ in\ the\ playlist.\ You\ can\ specify\ range:\ "\-\-playlist\-items\ 1\-3,7,10\-13",\ it\ will
60 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ download\ the\ videos\ at\ index\ 1,\ 2,\ 3,\ 7,\ 10,\ 11,\ 12\ and\ 13.
61 \-\-match\-title\ REGEX\ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ matching\ titles\ (regex\ or\ caseless\ sub\-string)
62 \-\-reject\-title\ REGEX\ \ \ \ \ \ \ \ \ \ \ \ \ Skip\ download\ for\ matching\ titles\ (regex\ or\ caseless\ sub\-string)
63 \-\-max\-downloads\ NUMBER\ \ \ \ \ \ \ \ \ \ \ Abort\ after\ downloading\ NUMBER\ files
64 \-\-min\-filesize\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ smaller\ than\ SIZE\ (e.g.\ 50k\ or\ 44.6m)
65 \-\-max\-filesize\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ larger\ than\ SIZE\ (e.g.\ 50k\ or\ 44.6m)
66 \-\-date\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ uploaded\ in\ this\ date
67 \-\-datebefore\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ uploaded\ on\ or\ before\ this\ date\ (i.e.\ inclusive)
68 \-\-dateafter\ DATE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ uploaded\ on\ or\ after\ this\ date\ (i.e.\ inclusive)
69 \-\-min\-views\ COUNT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ less\ than\ COUNT\ views
70 \-\-max\-views\ COUNT\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ any\ videos\ with\ more\ than\ COUNT\ views
71 \-\-match\-filter\ FILTER\ \ \ \ \ \ \ \ \ \ \ \ Generic\ video\ filter\ (experimental).\ Specify\ any\ key\ (see\ help\ for\ \-o\ for\ a\ list\ of\ available\ keys)\ to\ match\ if\ the\ key\ is\ present,
72 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ !key\ to\ check\ if\ the\ key\ is\ not\ present,key\ >\ NUMBER\ (like\ "comment_count\ >\ 12",\ also\ works\ with\ >=,\ <,\ <=,\ !=,\ =)\ to\ compare\ against
73 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ number,\ and\ &\ to\ require\ multiple\ matches.\ Values\ which\ are\ not\ known\ are\ excluded\ unless\ you\ put\ a\ question\ mark\ (?)\ after\ the
74 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ operator.For\ example,\ to\ only\ match\ videos\ that\ have\ been\ liked\ more\ than\ 100\ times\ and\ disliked\ less\ than\ 50\ times\ (or\ the\ dislike
75 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ functionality\ is\ not\ available\ at\ the\ given\ service),\ but\ who\ also\ have\ a\ description,\ use\ \ \-\-match\-filter\ "like_count\ >\ 100\ &
76 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dislike_count\ <?\ 50\ &\ description"\ .
77 \-\-no\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ the\ video,\ if\ the\ URL\ refers\ to\ a\ video\ and\ a\ playlist.
78 \-\-yes\-playlist\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ the\ playlist,\ if\ the\ URL\ refers\ to\ a\ video\ and\ a\ playlist.
79 \-\-age\-limit\ YEARS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ suitable\ for\ the\ given\ age
80 \-\-download\-archive\ FILE\ \ \ \ \ \ \ \ \ \ Download\ only\ videos\ not\ listed\ in\ the\ archive\ file.\ Record\ the\ IDs\ of\ all\ downloaded\ videos\ in\ it.
81 \-\-include\-ads\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ advertisements\ as\ well\ (experimental)
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.\ 50K\ or\ 4.2M)
89 \-R,\ \-\-retries\ RETRIES\ \ \ \ \ \ \ \ \ \ \ \ Number\ of\ retries\ (default\ is\ 10),\ or\ "infinite".
90 \-\-buffer\-size\ SIZE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Size\ of\ download\ buffer\ (e.g.\ 1024\ or\ 16K)\ (default\ is\ 1024)
91 \-\-no\-resize\-buffer\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ automatically\ adjust\ the\ buffer\ size.\ By\ default,\ the\ buffer\ size\ is\ automatically\ resized\ from\ an\ initial\ value\ of\ SIZE.
92 \-\-playlist\-reverse\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ playlist\ videos\ in\ reverse\ order
93 \-\-xattr\-set\-filesize\ \ \ \ \ \ \ \ \ \ \ \ \ Set\ file\ xattribute\ ytdl.filesize\ with\ expected\ filesize\ (experimental)
94 \-\-hls\-prefer\-native\ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ the\ native\ HLS\ downloader\ instead\ of\ ffmpeg\ (experimental)
95 \-\-external\-downloader\ COMMAND\ \ \ \ Use\ the\ specified\ external\ downloader.\ Currently\ supports\ aria2c,curl,httpie,wget
96 \-\-external\-downloader\-args\ ARGS\ \ Give\ these\ arguments\ to\ the\ external\ downloader
97 \f[]
98 .fi
99 .SS Filesystem Options:
100 .IP
101 .nf
102 \f[C]
103 \-a,\ \-\-batch\-file\ FILE\ \ \ \ \ \ \ \ \ \ \ \ File\ containing\ URLs\ to\ download\ (\[aq]\-\[aq]\ for\ stdin)
104 \-\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ only\ video\ ID\ in\ file\ name
105 \-o,\ \-\-output\ TEMPLATE\ \ \ \ \ \ \ \ \ \ \ \ Output\ filename\ template.\ Use\ %(title)s\ to\ get\ the\ title,\ %(uploader)s\ for\ the\ uploader\ name,\ %(uploader_id)s\ for\ the\ uploader
106 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ nickname\ if\ different,\ %(autonumber)s\ to\ get\ an\ automatically\ incremented\ number,\ %(ext)s\ for\ the\ filename\ extension,\ %(format)s\ for
107 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ format\ description\ (like\ "22\ \-\ 1280x720"\ or\ "HD"),\ %(format_id)s\ for\ the\ unique\ id\ of\ the\ format\ (like\ YouTube\[aq]s\ itags:\ "137"),
108 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(upload_date)s\ for\ the\ upload\ date\ (YYYYMMDD),\ %(extractor)s\ for\ the\ provider\ (youtube,\ metacafe,\ etc),\ %(id)s\ for\ the\ video\ id,
109 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(playlist_title)s,\ %(playlist_id)s,\ or\ %(playlist)s\ (=title\ if\ present,\ ID\ otherwise)\ for\ the\ playlist\ the\ video\ is\ in,
110 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(playlist_index)s\ for\ the\ position\ in\ the\ playlist.\ %(height)s\ and\ %(width)s\ for\ the\ width\ and\ height\ of\ the\ video\ format.
111 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(resolution)s\ for\ a\ textual\ description\ of\ the\ resolution\ of\ the\ video\ format.\ %%\ for\ a\ literal\ percent.\ Use\ \-\ to\ output\ to\ stdout.
112 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Can\ also\ be\ used\ to\ download\ to\ a\ different\ directory,\ for\ example\ with\ \-o\ \[aq]/my/downloads/%(uploader)s/%(title)s\-%(id)s.%(ext)s\[aq]\ .
113 \-\-autonumber\-size\ NUMBER\ \ \ \ \ \ \ \ \ Specify\ the\ number\ of\ digits\ in\ %(autonumber)s\ when\ it\ is\ present\ in\ output\ filename\ template\ or\ \-\-auto\-number\ option\ is\ given
114 \-\-restrict\-filenames\ \ \ \ \ \ \ \ \ \ \ \ \ Restrict\ filenames\ to\ only\ ASCII\ characters,\ and\ avoid\ "&"\ and\ spaces\ in\ filenames
115 \-A,\ \-\-auto\-number\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated;\ use\ \ \-o\ "%(autonumber)s\-%(title)s.%(ext)s"\ ]\ Number\ downloaded\ files\ starting\ from\ 00000
116 \-t,\ \-\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated]\ Use\ title\ in\ file\ name\ (default)
117 \-l,\ \-\-literal\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [deprecated]\ Alias\ of\ \-\-title
118 \-w,\ \-\-no\-overwrites\ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ overwrite\ files
119 \-c,\ \-\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Force\ resume\ of\ partially\ downloaded\ files.\ By\ default,\ youtube\-dl\ will\ resume\ downloads\ if\ possible.
120 \-\-no\-continue\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ resume\ partially\ downloaded\ files\ (restart\ from\ beginning)
121 \-\-no\-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ use\ .part\ files\ \-\ write\ directly\ into\ output\ file
122 \-\-no\-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ use\ the\ Last\-modified\ header\ to\ set\ the\ file\ modification\ time
123 \-\-write\-description\ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ video\ description\ to\ a\ .description\ file
124 \-\-write\-info\-json\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ video\ metadata\ to\ a\ .info.json\ file
125 \-\-write\-annotations\ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ video\ annotations\ to\ a\ .annotations.xml\ file
126 \-\-load\-info\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JSON\ file\ containing\ the\ video\ information\ (created\ with\ the\ "\-\-write\-info\-json"\ option)
127 \-\-cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ File\ to\ read\ cookies\ from\ and\ dump\ cookie\ jar\ in
128 \-\-cache\-dir\ DIR\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Location\ in\ the\ filesystem\ where\ youtube\-dl\ can\ store\ some\ downloaded\ information\ permanently.\ By\ default\ $XDG_CACHE_HOME/youtube\-dl
129 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ or\ ~/.cache/youtube\-dl\ .\ At\ the\ moment,\ only\ YouTube\ player\ files\ (for\ videos\ with\ obfuscated\ signatures)\ are\ cached,\ but\ that\ may
130 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ change.
131 \-\-no\-cache\-dir\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Disable\ filesystem\ caching
132 \-\-rm\-cache\-dir\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Delete\ all\ filesystem\ cache\ files
133 \f[]
134 .fi
135 .SS Thumbnail images:
136 .IP
137 .nf
138 \f[C]
139 \-\-write\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ thumbnail\ image\ to\ disk
140 \-\-write\-all\-thumbnails\ \ \ \ \ \ \ \ \ \ \ Write\ all\ thumbnail\ image\ formats\ to\ disk
141 \-\-list\-thumbnails\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate\ and\ list\ all\ available\ thumbnail\ formats
142 \f[]
143 .fi
144 .SS Verbosity / Simulation Options:
145 .IP
146 .nf
147 \f[C]
148 \-q,\ \-\-quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Activate\ quiet\ mode
149 \-\-no\-warnings\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Ignore\ warnings
150 \-s,\ \-\-simulate\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ the\ video\ and\ do\ not\ write\ anything\ to\ disk
151 \-\-skip\-download\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ download\ the\ video
152 \-g,\ \-\-get\-url\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ URL
153 \-e,\ \-\-get\-title\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ title
154 \-\-get\-id\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ id
155 \-\-get\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ thumbnail\ URL
156 \-\-get\-description\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ video\ description
157 \-\-get\-duration\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ video\ length
158 \-\-get\-filename\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ output\ filename
159 \-\-get\-format\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ output\ format
160 \-j,\ \-\-dump\-json\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ JSON\ information.\ See\ \-\-output\ for\ a\ description\ of\ available\ keys.
161 \-J,\ \-\-dump\-single\-json\ \ \ \ \ \ \ \ \ \ \ Simulate,\ quiet\ but\ print\ JSON\ information\ for\ each\ command\-line\ argument.\ If\ the\ URL\ refers\ to\ a\ playlist,\ dump\ the\ whole\ playlist
162 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ information\ in\ a\ single\ line.
163 \-\-print\-json\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Be\ quiet\ and\ print\ the\ video\ information\ as\ JSON\ (video\ is\ still\ being\ downloaded).
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\-pages\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Print\ downloaded\ pages\ encoded\ using\ base64\ to\ debug\ problems\ (very\ verbose)
169 \-\-write\-pages\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ downloaded\ intermediary\ pages\ to\ files\ in\ the\ current\ directory\ to\ debug\ problems
170 \-\-print\-traffic\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Display\ sent\ and\ read\ HTTP\ traffic
171 \-C,\ \-\-call\-home\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Contact\ the\ youtube\-dl\ server\ for\ debugging
172 \-\-no\-call\-home\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Do\ NOT\ contact\ the\ youtube\-dl\ server\ for\ debugging
173 \f[]
174 .fi
175 .SS Workarounds:
176 .IP
177 .nf
178 \f[C]
179 \-\-encoding\ ENCODING\ \ \ \ \ \ \ \ \ \ \ \ \ \ Force\ the\ specified\ encoding\ (experimental)
180 \-\-no\-check\-certificate\ \ \ \ \ \ \ \ \ \ \ Suppress\ HTTPS\ certificate\ validation
181 \-\-prefer\-insecure\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ an\ unencrypted\ connection\ to\ retrieve\ information\ about\ the\ video.\ (Currently\ supported\ only\ for\ YouTube)
182 \-\-user\-agent\ UA\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Specify\ a\ custom\ user\ agent
183 \-\-referer\ URL\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Specify\ a\ custom\ referer,\ use\ if\ the\ video\ access\ is\ restricted\ to\ one\ domain
184 \-\-add\-header\ FIELD:VALUE\ \ \ \ \ \ \ \ \ Specify\ a\ custom\ HTTP\ header\ and\ its\ value,\ separated\ by\ a\ colon\ \[aq]:\[aq].\ You\ can\ use\ this\ option\ multiple\ times
185 \-\-bidi\-workaround\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Work\ around\ terminals\ that\ lack\ bidirectional\ text\ support.\ Requires\ bidiv\ or\ fribidi\ executable\ in\ PATH
186 \-\-sleep\-interval\ SECONDS\ \ \ \ \ \ \ \ \ Number\ of\ seconds\ to\ sleep\ before\ each\ download.
187 \f[]
188 .fi
189 .SS Video Format Options:
190 .IP
191 .nf
192 \f[C]
193 \-f,\ \-\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ \ \ Video\ format\ code,\ see\ the\ "FORMAT\ SELECTION"\ for\ all\ the\ info
194 \-\-all\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ all\ available\ video\ formats
195 \-\-prefer\-free\-formats\ \ \ \ \ \ \ \ \ \ \ \ Prefer\ free\ video\ formats\ unless\ a\ specific\ one\ is\ requested
196 \-F,\ \-\-list\-formats\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ List\ all\ available\ formats
197 \-\-youtube\-skip\-dash\-manifest\ \ \ \ \ Do\ not\ download\ the\ DASH\ manifests\ and\ related\ data\ on\ YouTube\ videos
198 \-\-merge\-output\-format\ FORMAT\ \ \ \ \ If\ a\ merge\ is\ required\ (e.g.\ bestvideo+bestaudio),\ output\ to\ given\ container\ format.\ One\ of\ mkv,\ mp4,\ ogg,\ webm,\ flv.\ Ignored\ if\ no
199 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ merge\ is\ required
200 \f[]
201 .fi
202 .SS Subtitle Options:
203 .IP
204 .nf
205 \f[C]
206 \-\-write\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ subtitle\ file
207 \-\-write\-auto\-sub\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ automatic\ subtitle\ file\ (YouTube\ only)
208 \-\-all\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Download\ all\ the\ available\ subtitles\ of\ the\ video
209 \-\-list\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ List\ all\ available\ subtitles\ for\ the\ video
210 \-\-sub\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ \ \ Subtitle\ format,\ accepts\ formats\ preference,\ for\ example:\ "srt"\ or\ "ass/srt/best"
211 \-\-sub\-lang\ LANGS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Languages\ of\ the\ subtitles\ to\ download\ (optional)\ separated\ by\ commas,\ use\ IETF\ language\ tags\ like\ \[aq]en,pt\[aq]
212 \f[]
213 .fi
214 .SS Authentication Options:
215 .IP
216 .nf
217 \f[C]
218 \-u,\ \-\-username\ USERNAME\ \ \ \ \ \ \ \ \ \ Login\ with\ this\ account\ ID
219 \-p,\ \-\-password\ PASSWORD\ \ \ \ \ \ \ \ \ \ Account\ password.\ If\ this\ option\ is\ left\ out,\ youtube\-dl\ will\ ask\ interactively.
220 \-2,\ \-\-twofactor\ TWOFACTOR\ \ \ \ \ \ \ \ Two\-factor\ auth\ code
221 \-n,\ \-\-netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Use\ .netrc\ authentication\ data
222 \-\-video\-password\ PASSWORD\ \ \ \ \ \ \ \ Video\ password\ (vimeo,\ smotri)
223 \f[]
224 .fi
225 .SS Post\-processing Options:
226 .IP
227 .nf
228 \f[C]
229 \-x,\ \-\-extract\-audio\ \ \ \ \ \ \ \ \ \ \ \ \ \ Convert\ video\ files\ to\ audio\-only\ files\ (requires\ ffmpeg\ or\ avconv\ and\ ffprobe\ or\ avprobe)
230 \-\-audio\-format\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ Specify\ audio\ format:\ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",\ "opus",\ or\ "wav";\ "best"\ by\ default
231 \-\-audio\-quality\ QUALITY\ \ \ \ \ \ \ \ \ \ Specify\ ffmpeg/avconv\ audio\ quality,\ insert\ a\ value\ between\ 0\ (better)\ and\ 9\ (worse)\ for\ VBR\ or\ a\ specific\ bitrate\ like\ 128K\ (default
232 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5)
233 \-\-recode\-video\ FORMAT\ \ \ \ \ \ \ \ \ \ \ \ Encode\ the\ video\ to\ another\ format\ if\ necessary\ (currently\ supported:\ mp4|flv|ogg|webm|mkv|avi)
234 \-\-postprocessor\-args\ ARGS\ \ \ \ \ \ \ \ Give\ these\ arguments\ to\ the\ postprocessor
235 \-k,\ \-\-keep\-video\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Keep\ the\ video\ file\ on\ disk\ after\ the\ post\-processing;\ the\ video\ is\ erased\ by\ default
236 \-\-no\-post\-overwrites\ \ \ \ \ \ \ \ \ \ \ \ \ Do\ not\ overwrite\ post\-processed\ files;\ the\ post\-processed\ files\ are\ overwritten\ by\ default
237 \-\-embed\-subs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Embed\ subtitles\ in\ the\ video\ (only\ for\ mkv\ and\ mp4\ videos)
238 \-\-embed\-thumbnail\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Embed\ thumbnail\ in\ the\ audio\ as\ cover\ art
239 \-\-add\-metadata\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ metadata\ to\ the\ video\ file
240 \-\-metadata\-from\-title\ FORMAT\ \ \ \ \ Parse\ additional\ metadata\ like\ song\ title\ /\ artist\ from\ the\ video\ title.\ The\ format\ syntax\ is\ the\ same\ as\ \-\-output,\ the\ parsed
241 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ parameters\ replace\ existing\ values.\ Additional\ templates:\ %(album)s,\ %(artist)s.\ Example:\ \-\-metadata\-from\-title\ "%(artist)s\ \-
242 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(title)s"\ matches\ a\ title\ like\ "Coldplay\ \-\ Paradise"
243 \-\-xattrs\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Write\ metadata\ to\ the\ video\ file\[aq]s\ xattrs\ (using\ dublin\ core\ and\ xdg\ standards)
244 \-\-fixup\ POLICY\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Automatically\ correct\ known\ faults\ of\ the\ file.\ One\ of\ never\ (do\ nothing),\ warn\ (only\ emit\ a\ warning),\ detect_or_warn\ (the\ default;
245 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fix\ file\ if\ we\ can,\ warn\ otherwise)
246 \-\-prefer\-avconv\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Prefer\ avconv\ over\ ffmpeg\ for\ running\ the\ postprocessors\ (default)
247 \-\-prefer\-ffmpeg\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Prefer\ ffmpeg\ over\ avconv\ for\ running\ the\ postprocessors
248 \-\-ffmpeg\-location\ PATH\ \ \ \ \ \ \ \ \ \ \ Location\ of\ the\ ffmpeg/avconv\ binary;\ either\ the\ path\ to\ the\ binary\ or\ its\ containing\ directory.
249 \-\-exec\ CMD\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Execute\ a\ command\ on\ the\ file\ after\ downloading,\ similar\ to\ find\[aq]s\ \-exec\ syntax.\ Example:\ \-\-exec\ \[aq]adb\ push\ {}\ /sdcard/Music/\ &&\ rm
250 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {}\[aq]
251 \-\-convert\-subtitles\ FORMAT\ \ \ \ \ \ \ Convert\ the\ subtitles\ to\ other\ format\ (currently\ supported:\ srt|ass|vtt)
252 \f[]
253 .fi
254 .SH CONFIGURATION
255 .PP
256 You can configure youtube\-dl by placing default arguments (such as
257 \f[C]\-\-extract\-audio\ \-\-no\-mtime\f[] to always extract the audio
258 and not copy the mtime) into \f[C]/etc/youtube\-dl.conf\f[] and/or
259 \f[C]~/.config/youtube\-dl/config\f[].
260 On Windows, the configuration file locations are
261 \f[C]%APPDATA%\\youtube\-dl\\config.txt\f[] and
262 \f[C]C:\\Users\\<user\ name>\\youtube\-dl.conf\f[].
263 .SS Authentication with \f[C]\&.netrc\f[] file
264 .PP
265 You may also want to configure automatic credentials storage for
266 extractors that support authentication (by providing login and password
267 with \f[C]\-\-username\f[] and \f[C]\-\-password\f[]) in order not to
268 pass credentials as command line arguments on every youtube\-dl
269 execution and prevent tracking plain text passwords in shell command
270 history.
271 You can achieve this using \f[C]\&.netrc\f[]
272 file (http://stackoverflow.com/tags/.netrc/info) on per extractor basis.
273 For that you will need to create \f[C]\&.netrc\f[] file in your
274 \f[C]$HOME\f[] and restrict permissions to read/write by you only:
275 .IP
276 .nf
277 \f[C]
278 touch\ $HOME/.netrc
279 chmod\ a\-rwx,u+rw\ $HOME/.netrc
280 \f[]
281 .fi
282 .PP
283 After that you can add credentials for extractor in the following
284 format, where \f[I]extractor\f[] is the name of extractor in lowercase:
285 .IP
286 .nf
287 \f[C]
288 machine\ <extractor>\ login\ <login>\ password\ <password>
289 \f[]
290 .fi
291 .PP
292 For example:
293 .IP
294 .nf
295 \f[C]
296 machine\ youtube\ login\ myaccount\@gmail.com\ password\ my_youtube_password
297 machine\ twitch\ login\ my_twitch_account_name\ password\ my_twitch_password
298 \f[]
299 .fi
300 .PP
301 To activate authentication with \f[C]\&.netrc\f[] file you should pass
302 \f[C]\-\-netrc\f[] to youtube\-dl or to place it in configuration
303 file (#configuration).
304 .PP
305 On Windows you may also need to setup \f[C]%HOME%\f[] environment
306 variable manually.
307 .SH OUTPUT TEMPLATE
308 .PP
309 The \f[C]\-o\f[] option allows users to indicate a template for the
310 output file names.
311 The basic usage is not to set any template arguments when downloading a
312 single file, like in
313 \f[C]youtube\-dl\ \-o\ funny_video.flv\ "http://some/video"\f[].
314 However, it may contain special sequences that will be replaced when
315 downloading each video.
316 The special sequences have the format \f[C]%(NAME)s\f[].
317 To clarify, that is a percent symbol followed by a name in parenthesis,
318 followed by a lowercase S.
319 Allowed names are:
320 .IP \[bu] 2
321 \f[C]id\f[]: The sequence will be replaced by the video identifier.
322 .IP \[bu] 2
323 \f[C]url\f[]: The sequence will be replaced by the video URL.
324 .IP \[bu] 2
325 \f[C]uploader\f[]: The sequence will be replaced by the nickname of the
326 person who uploaded the video.
327 .IP \[bu] 2
328 \f[C]upload_date\f[]: The sequence will be replaced by the upload date
329 in YYYYMMDD format.
330 .IP \[bu] 2
331 \f[C]title\f[]: The sequence will be replaced by the video title.
332 .IP \[bu] 2
333 \f[C]ext\f[]: The sequence will be replaced by the appropriate extension
334 (like flv or mp4).
335 .IP \[bu] 2
336 \f[C]epoch\f[]: The sequence will be replaced by the Unix epoch when
337 creating the file.
338 .IP \[bu] 2
339 \f[C]autonumber\f[]: The sequence will be replaced by a five\-digit
340 number that will be increased with each download, starting at zero.
341 .IP \[bu] 2
342 \f[C]playlist\f[]: The name or the id of the playlist that contains the
343 video.
344 .IP \[bu] 2
345 \f[C]playlist_index\f[]: The index of the video in the playlist, a
346 five\-digit number.
347 .PP
348 The current default template is \f[C]%(title)s\-%(id)s.%(ext)s\f[].
349 .PP
350 In some cases, you don\[aq]t want special characters such as äø­, spaces,
351 or &, such as when transferring the downloaded filename to a Windows
352 system or the filename through an 8bit\-unsafe channel.
353 In these cases, add the \f[C]\-\-restrict\-filenames\f[] flag to get a
354 shorter title:
355 .IP
356 .nf
357 \f[C]
358 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc
359 youtube\-dl\ test\ video\ \[aq]\[aq]_Ƥā†­š•.mp4\ \ \ \ #\ All\ kinds\ of\ weird\ characters
360 $\ youtube\-dl\ \-\-get\-filename\ \-o\ "%(title)s.%(ext)s"\ BaW_jenozKc\ \-\-restrict\-filenames
361 youtube\-dl_test_video_.mp4\ \ \ \ \ \ \ \ \ \ #\ A\ simple\ file\ name
362 \f[]
363 .fi
364 .SH FORMAT SELECTION
365 .PP
366 By default youtube\-dl tries to download the best quality, but sometimes
367 you may want to download other format.
368 The simplest case is requesting a specific format, for example
369 \f[C]\-f\ 22\f[].
370 You can get the list of available formats using
371 \f[C]\-\-list\-formats\f[], you can also use a file extension (currently
372 it supports aac, m4a, mp3, mp4, ogg, wav, webm) or the special names
373 \f[C]best\f[], \f[C]bestvideo\f[], \f[C]bestaudio\f[] and
374 \f[C]worst\f[].
375 .PP
376 If you want to download multiple videos and they don\[aq]t have the same
377 formats available, you can specify the order of preference using
378 slashes, as in \f[C]\-f\ 22/17/18\f[].
379 You can also filter the video results by putting a condition in
380 brackets, as in \f[C]\-f\ "best[height=720]"\f[] (or
381 \f[C]\-f\ "[filesize>10M]"\f[]).
382 This works for filesize, height, width, tbr, abr, vbr, asr, and fps and
383 the comparisons <, <=, >, >=, =, != and for ext, acodec, vcodec,
384 container, and protocol and the comparisons =, != .
385 Formats for which the value is not known are excluded unless you put a
386 question mark (?) after the operator.
387 You can combine format filters, so
388 \f[C]\-f\ "[height\ <=?\ 720][tbr>500]"\f[] selects up to 720p videos
389 (or videos where the height is not known) with a bitrate of at least 500
390 KBit/s.
391 Use commas to download multiple formats, such as
392 \f[C]\-f\ 136/137/mp4/bestvideo,140/m4a/bestaudio\f[].
393 You can merge the video and audio of two formats into a single file
394 using \f[C]\-f\ <video\-format>+<audio\-format>\f[] (requires ffmpeg or
395 avconv), for example \f[C]\-f\ bestvideo+bestaudio\f[].
396 .PP
397 Since the end of April 2015 and version 2015.04.26 youtube\-dl uses
398 \f[C]\-f\ bestvideo+bestaudio/best\f[] as default format selection (see
399 #5447, #5456).
400 If ffmpeg or avconv are installed this results in downloading
401 \f[C]bestvideo\f[] and \f[C]bestaudio\f[] separately and muxing them
402 together into a single file giving the best overall quality available.
403 Otherwise it falls back to \f[C]best\f[] and results in downloading best
404 available quality served as a single file.
405 \f[C]best\f[] is also needed for videos that don\[aq]t come from YouTube
406 because they don\[aq]t provide the audio and video in two different
407 files.
408 If you want to only download some dash formats (for example if you are
409 not interested in getting videos with a resolution higher than 1080p),
410 you can add \f[C]\-f\ bestvideo[height<=?1080]+bestaudio/best\f[] to
411 your configuration file.
412 Note that if you use youtube\-dl to stream to \f[C]stdout\f[] (and most
413 likely to pipe it to your media player then), i.e.
414 you explicitly specify output template as \f[C]\-o\ \-\f[], youtube\-dl
415 still uses \f[C]\-f\ best\f[] format selection in order to start content
416 delivery immediately to your player and not to wait until
417 \f[C]bestvideo\f[] and \f[C]bestaudio\f[] are downloaded and muxed.
418 .PP
419 If you want to preserve the old format selection behavior (prior to
420 youtube\-dl 2015.04.26), i.e.
421 you want to download best available quality media served as a single
422 file, you should explicitly specify your choice with \f[C]\-f\ best\f[].
423 You may want to add it to the configuration file (#configuration) in
424 order not to type it every time you run youtube\-dl.
425 .SH VIDEO SELECTION
426 .PP
427 Videos can be filtered by their upload date using the options
428 \f[C]\-\-date\f[], \f[C]\-\-datebefore\f[] or \f[C]\-\-dateafter\f[],
429 they accept dates in two formats:
430 .IP \[bu] 2
431 Absolute dates: Dates in the format \f[C]YYYYMMDD\f[].
432 .IP \[bu] 2
433 Relative dates: Dates in the format
434 \f[C](now|today)[+\-][0\-9](day|week|month|year)(s)?\f[]
435 .PP
436 Examples:
437 .IP
438 .nf
439 \f[C]
440 #\ Download\ only\ the\ videos\ uploaded\ in\ the\ last\ 6\ months
441 $\ youtube\-dl\ \-\-dateafter\ now\-6months
442
443 #\ Download\ only\ the\ videos\ uploaded\ on\ January\ 1,\ 1970
444 $\ youtube\-dl\ \-\-date\ 19700101
445
446 $\ #\ will\ only\ download\ the\ videos\ uploaded\ in\ the\ 200x\ decade
447 $\ youtube\-dl\ \-\-dateafter\ 20000101\ \-\-datebefore\ 20091231
448 \f[]
449 .fi
450 .SH FAQ
451 .SS How do I update youtube\-dl?
452 .PP
453 If you\[aq]ve followed our manual installation
454 instructions (http://rg3.github.io/youtube-dl/download.html), you can
455 simply run \f[C]youtube\-dl\ \-U\f[] (or, on Linux,
456 \f[C]sudo\ youtube\-dl\ \-U\f[]).
457 .PP
458 If you have used pip, a simple
459 \f[C]sudo\ pip\ install\ \-U\ youtube\-dl\f[] is sufficient to update.
460 .PP
461 If you have installed youtube\-dl using a package manager like
462 \f[I]apt\-get\f[] or \f[I]yum\f[], use the standard system update
463 mechanism to update.
464 Note that distribution packages are often outdated.
465 As a rule of thumb, youtube\-dl releases at least once a month, and
466 often weekly or even daily.
467 Simply go to http://yt\-dl.org/ to find out the current version.
468 Unfortunately, there is nothing we youtube\-dl developers can do if your
469 distributions serves a really outdated version.
470 You can (and should) complain to your distribution in their bugtracker
471 or support forum.
472 .PP
473 As a last resort, you can also uninstall the version installed by your
474 package manager and follow our manual installation instructions.
475 For that, remove the distribution\[aq]s package, with a line like
476 .IP
477 .nf
478 \f[C]
479 sudo\ apt\-get\ remove\ \-y\ youtube\-dl
480 \f[]
481 .fi
482 .PP
483 Afterwards, simply follow our manual installation
484 instructions (http://rg3.github.io/youtube-dl/download.html):
485 .IP
486 .nf
487 \f[C]
488 sudo\ wget\ https://yt\-dl.org/latest/youtube\-dl\ \-O\ /usr/local/bin/youtube\-dl
489 sudo\ chmod\ a+x\ /usr/local/bin/youtube\-dl
490 hash\ \-r
491 \f[]
492 .fi
493 .PP
494 Again, from then on you\[aq]ll be able to update with
495 \f[C]sudo\ youtube\-dl\ \-U\f[].
496 .SS I\[aq]m getting an error
497 \f[C]Unable\ to\ extract\ OpenGraph\ title\f[] on YouTube playlists
498 .PP
499 YouTube changed their playlist format in March 2014 and later on, so
500 you\[aq]ll need at least youtube\-dl 2014.07.25 to download all YouTube
501 videos.
502 .PP
503 If you have installed youtube\-dl with a package manager, pip, setup.py
504 or a tarball, please use that to update.
505 Note that Ubuntu packages do not seem to get updated anymore.
506 Since we are not affiliated with Ubuntu, there is little we can do.
507 Feel free to report
508 bugs (https://bugs.launchpad.net/ubuntu/+source/youtube-dl/+filebug) to
509 the Ubuntu packaging
510 guys (mailto:ubuntu-motu@lists.ubuntu.com?subject=outdated%20version%20of%20youtube-dl)
511 \- all they have to do is update the package to a somewhat recent
512 version.
513 See above for a way to update.
514 .SS Do I always have to pass \f[C]\-citw\f[]?
515 .PP
516 By default, youtube\-dl intends to have the best options (incidentally,
517 if you have a convincing case that these should be different, please
518 file an issue where you explain that (https://yt-dl.org/bug)).
519 Therefore, it is unnecessary and sometimes harmful to copy long option
520 strings from webpages.
521 In particular, the only option out of \f[C]\-citw\f[] that is regularly
522 useful is \f[C]\-i\f[].
523 .SS Can you please put the \-b option back?
524 .PP
525 Most people asking this question are not aware that youtube\-dl now
526 defaults to downloading the highest available quality as reported by
527 YouTube, which will be 1080p or 720p in some cases, so you no longer
528 need the \f[C]\-b\f[] option.
529 For some specific videos, maybe YouTube does not report them to be
530 available in a specific high quality format you\[aq]re interested in.
531 In that case, simply request it with the \f[C]\-f\f[] option and
532 youtube\-dl will try to download it.
533 .SS I get HTTP error 402 when trying to download a video. What\[aq]s
534 this?
535 .PP
536 Apparently YouTube requires you to pass a CAPTCHA test if you download
537 too much.
538 We\[aq]re considering to provide a way to let you solve the
539 CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
540 moment, your best course of action is pointing a webbrowser to the
541 youtube URL, solving the CAPTCHA, and restart youtube\-dl.
542 .SS I have downloaded a video but how can I play it?
543 .PP
544 Once the video is fully downloaded, use any video player, such as
545 vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
546 .SS I extracted a video URL with \-g, but it does not play on another
547 machine / in my webbrowser.
548 .PP
549 It depends a lot on the service.
550 In many cases, requests for the video (to download/play it) must come
551 from the same IP address and with the same cookies.
552 Use the \f[C]\-\-cookies\f[] option to write the required cookies into a
553 file, and advise your downloader to read cookies from that file.
554 Some sites also require a common user agent to be used, use
555 \f[C]\-\-dump\-user\-agent\f[] to see the one in use by youtube\-dl.
556 .PP
557 It may be beneficial to use IPv6; in some cases, the restrictions are
558 only applied to IPv4.
559 Some services (sometimes only for a subset of videos) do not restrict
560 the video URL by IP address, cookie, or user\-agent, but these are the
561 exception rather than the rule.
562 .PP
563 Please bear in mind that some URL protocols are \f[B]not\f[] supported
564 by browsers out of the box, including RTMP.
565 If you are using \-g, your own downloader must support these as well.
566 .PP
567 If you want to play the video on a machine that is not running
568 youtube\-dl, you can relay the video content from the machine that runs
569 youtube\-dl.
570 You can use \f[C]\-o\ \-\f[] to let youtube\-dl stream a video to
571 stdout, or simply allow the player to download the files written by
572 youtube\-dl in turn.
573 .SS ERROR: no fmt_url_map or conn information found in video info
574 .PP
575 YouTube has switched to a new video info format in July 2011 which is
576 not supported by old versions of youtube\-dl.
577 See above (#how-do-i-update-youtube-dl) for how to update youtube\-dl.
578 .SS ERROR: unable to download video
579 .PP
580 YouTube requires an additional signature since September 2012 which is
581 not supported by old versions of youtube\-dl.
582 See above (#how-do-i-update-youtube-dl) for how to update youtube\-dl.
583 .SS Video URL contains an ampersand and I\[aq]m getting some strange
584 output \f[C][1]\ 2839\f[] or
585 \f[C]\[aq]v\[aq]\ is\ not\ recognized\ as\ an\ internal\ or\ external\ command\f[]
586 .PP
587 That\[aq]s actually the output from your shell.
588 Since ampersand is one of the special shell characters it\[aq]s
589 interpreted by shell preventing you from passing the whole URL to
590 youtube\-dl.
591 To disable your shell from interpreting the ampersands (or any other
592 special characters) you have to either put the whole URL in quotes or
593 escape them with a backslash (which approach will work depends on your
594 shell).
595 .PP
596 For example if your URL is
597 https://www.youtube.com/watch?t=4&v=BaW_jenozKc you should end up with
598 following command:
599 .PP
600 \f[C]youtube\-dl\ \[aq]https://www.youtube.com/watch?t=4&v=BaW_jenozKc\[aq]\f[]
601 .PP
602 or
603 .PP
604 \f[C]youtube\-dl\ https://www.youtube.com/watch?t=4\\&v=BaW_jenozKc\f[]
605 .PP
606 For Windows you have to use the double quotes:
607 .PP
608 \f[C]youtube\-dl\ "https://www.youtube.com/watch?t=4&v=BaW_jenozKc"\f[]
609 .SS ExtractorError: Could not find JS function u\[aq]OF\[aq]
610 .PP
611 In February 2015, the new YouTube player contained a character sequence
612 in a string that was misinterpreted by old versions of youtube\-dl.
613 See above (#how-do-i-update-youtube-dl) for how to update youtube\-dl.
614 .SS HTTP Error 429: Too Many Requests or 402: Payment Required
615 .PP
616 These two error codes indicate that the service is blocking your IP
617 address because of overuse.
618 Contact the service and ask them to unblock your IP address, or \- if
619 you have acquired a whitelisted IP address already \- use the
620 \f[C]\-\-proxy\f[] or \f[C]\-\-source\-address\f[]
621 options (#network-options) to select another IP address.
622 .SS SyntaxError: Non\-ASCII character
623 .PP
624 The error
625 .IP
626 .nf
627 \f[C]
628 File\ "youtube\-dl",\ line\ 2
629 SyntaxError:\ Non\-ASCII\ character\ \[aq]\\x93\[aq]\ ...
630 \f[]
631 .fi
632 .PP
633 means you\[aq]re using an outdated version of Python.
634 Please update to Python 2.6 or 2.7.
635 .SS What is this binary file? Where has the code gone?
636 .PP
637 Since June 2012 (#342) youtube\-dl is packed as an executable zipfile,
638 simply unzip it (might need renaming to \f[C]youtube\-dl.zip\f[] first
639 on some systems) or clone the git repository, as laid out above.
640 If you modify the code, you can run it by executing the
641 \f[C]__main__.py\f[] file.
642 To recompile the executable, run \f[C]make\ youtube\-dl\f[].
643 .SS The exe throws a \f[I]Runtime error from Visual C++\f[]
644 .PP
645 To run the exe you need to install first the Microsoft Visual C++ 2008
646 Redistributable
647 Package (http://www.microsoft.com/en-us/download/details.aspx?id=29).
648 .SS On Windows, how should I set up ffmpeg and youtube\-dl? Where should
649 I put the exe files?
650 .PP
651 If you put youtube\-dl and ffmpeg in the same directory that you\[aq]re
652 running the command from, it will work, but that\[aq]s rather
653 cumbersome.
654 .PP
655 To make a different directory work \- either for ffmpeg, or for
656 youtube\-dl, or for both \- simply create the directory (say,
657 \f[C]C:\\bin\f[], or \f[C]C:\\Users\\<User\ name>\\bin\f[]), put all the
658 executables directly in there, and then set your PATH environment
659 variable (https://www.java.com/en/download/help/path.xml) to include
660 that directory.
661 .PP
662 From then on, after restarting your shell, you will be able to access
663 both youtube\-dl and ffmpeg (and youtube\-dl will be able to find
664 ffmpeg) by simply typing \f[C]youtube\-dl\f[] or \f[C]ffmpeg\f[], no
665 matter what directory you\[aq]re in.
666 .SS How do I put downloads into a specific folder?
667 .PP
668 Use the \f[C]\-o\f[] to specify an output template (#output-template),
669 for example \f[C]\-o\ "/home/user/videos/%(title)s\-%(id)s.%(ext)s"\f[].
670 If you want this for all of your downloads, put the option into your
671 configuration file (#configuration).
672 .SS How do I download a video starting with a \f[C]\-\f[] ?
673 .PP
674 Either prepend \f[C]http://www.youtube.com/watch?v=\f[] or separate the
675 ID from the options with \f[C]\-\-\f[]:
676 .IP
677 .nf
678 \f[C]
679 youtube\-dl\ \-\-\ \-wNyEUrxzFU
680 youtube\-dl\ "http://www.youtube.com/watch?v=\-wNyEUrxzFU"
681 \f[]
682 .fi
683 .SS Can you add support for this anime video site, or site which shows
684 current movies for free?
685 .PP
686 As a matter of policy (as well as legality), youtube\-dl does not
687 include support for services that specialize in infringing copyright.
688 As a rule of thumb, if you cannot easily find a video that the service
689 is quite obviously allowed to distribute (i.e.
690 that has been uploaded by the creator, the creator\[aq]s distributor, or
691 is published under a free license), the service is probably unfit for
692 inclusion to youtube\-dl.
693 .PP
694 A note on the service that they don\[aq]t host the infringing content,
695 but just link to those who do, is evidence that the service should
696 \f[B]not\f[] be included into youtube\-dl.
697 The same goes for any DMCA note when the whole front page of the service
698 is filled with videos they are not allowed to distribute.
699 A "fair use" note is equally unconvincing if the service shows
700 copyright\-protected videos in full without authorization.
701 .PP
702 Support requests for services that \f[B]do\f[] purchase the rights to
703 distribute their content are perfectly fine though.
704 If in doubt, you can simply include a source that mentions the
705 legitimate purchase of content.
706 .SS How can I speed up work on my issue?
707 .PP
708 (Also known as: Help, my important issue not being solved!) The
709 youtube\-dl core developer team is quite small.
710 While we do our best to solve as many issues as possible, sometimes that
711 can take quite a while.
712 To speed up your issue, here\[aq]s what you can do:
713 .PP
714 First of all, please do report the issue at our issue
715 tracker (https://yt-dl.org/bugs).
716 That allows us to coordinate all efforts by users and developers, and
717 serves as a unified point.
718 Unfortunately, the youtube\-dl project has grown too large to use
719 personal email as an effective communication channel.
720 .PP
721 Please read the bug reporting instructions (#bugs) below.
722 A lot of bugs lack all the necessary information.
723 If you can, offer proxy, VPN, or shell access to the youtube\-dl
724 developers.
725 If you are able to, test the issue from multiple computers in multiple
726 countries to exclude local censorship or misconfiguration issues.
727 .PP
728 If nobody is interested in solving your issue, you are welcome to take
729 matters into your own hands and submit a pull request (or coerce/pay
730 somebody else to do so).
731 .PP
732 Feel free to bump the issue from time to time by writing a small comment
733 ("Issue is still present in youtube\-dl version ...from France, but
734 fixed from Belgium"), but please not more than once a month.
735 Please do not declare your issue as \f[C]important\f[] or
736 \f[C]urgent\f[].
737 .SS How can I detect whether a given URL is supported by youtube\-dl?
738 .PP
739 For one, have a look at the list of supported
740 sites (docs/supportedsites.md).
741 Note that it can sometimes happen that the site changes its URL scheme
742 (say, from http://example.com/video/1234567 to
743 http://example.com/v/1234567 ) and youtube\-dl reports an URL of a
744 service in that list as unsupported.
745 In that case, simply report a bug.
746 .PP
747 It is \f[I]not\f[] possible to detect whether a URL is supported or not.
748 That\[aq]s because youtube\-dl contains a generic extractor which
749 matches \f[B]all\f[] URLs.
750 You may be tempted to disable, exclude, or remove the generic extractor,
751 but the generic extractor not only allows users to extract videos from
752 lots of websites that embed a video from another service, but may also
753 be used to extract video from a service that it\[aq]s hosting itself.
754 Therefore, we neither recommend nor support disabling, excluding, or
755 removing the generic extractor.
756 .PP
757 If you want to find out whether a given URL is supported, simply call
758 youtube\-dl with it.
759 If you get no videos back, chances are the URL is either not referring
760 to a video or unsupported.
761 You can find out which by examining the output (if you run youtube\-dl
762 on the console) or catching an \f[C]UnsupportedError\f[] exception if
763 you run it from a Python program.
764 .SH DEVELOPER INSTRUCTIONS
765 .PP
766 Most users do not need to build youtube\-dl and can download the
767 builds (http://rg3.github.io/youtube-dl/download.html) or get them from
768 their distribution.
769 .PP
770 To run youtube\-dl as a developer, you don\[aq]t need to build anything
771 either.
772 Simply execute
773 .IP
774 .nf
775 \f[C]
776 python\ \-m\ youtube_dl
777 \f[]
778 .fi
779 .PP
780 To run the test, simply invoke your favorite test runner, or execute a
781 test file directly; any of the following work:
782 .IP
783 .nf
784 \f[C]
785 python\ \-m\ unittest\ discover
786 python\ test/test_download.py
787 nosetests
788 \f[]
789 .fi
790 .PP
791 If you want to create a build of youtube\-dl yourself, you\[aq]ll need
792 .IP \[bu] 2
793 python
794 .IP \[bu] 2
795 make
796 .IP \[bu] 2
797 pandoc
798 .IP \[bu] 2
799 zip
800 .IP \[bu] 2
801 nosetests
802 .SS Adding support for a new site
803 .PP
804 If you want to add support for a new site, you can follow this quick
805 list (assuming your service is called \f[C]yourextractor\f[]):
806 .IP " 1." 4
807 Fork this repository (https://github.com/rg3/youtube-dl/fork)
808 .IP " 2." 4
809 Check out the source code with
810 \f[C]git\ clone\ git\@github.com:YOUR_GITHUB_USERNAME/youtube\-dl.git\f[]
811 .IP " 3." 4
812 Start a new git branch with
813 \f[C]cd\ youtube\-dl;\ git\ checkout\ \-b\ yourextractor\f[]
814 .IP " 4." 4
815 Start with this simple template and save it to
816 \f[C]youtube_dl/extractor/yourextractor.py\f[]:
817 .RS 4
818 .IP
819 .nf
820 \f[C]
821 #\ coding:\ utf\-8
822 from\ __future__\ import\ unicode_literals
823
824 from\ .common\ import\ InfoExtractor
825
826
827 class\ YourExtractorIE(InfoExtractor):
828 \ \ \ \ _VALID_URL\ =\ r\[aq]https?://(?:www\\.)?yourextractor\\.com/watch/(?P<id>[0\-9]+)\[aq]
829 \ \ \ \ _TEST\ =\ {
830 \ \ \ \ \ \ \ \ \[aq]url\[aq]:\ \[aq]http://yourextractor.com/watch/42\[aq],
831 \ \ \ \ \ \ \ \ \[aq]md5\[aq]:\ \[aq]TODO:\ md5\ sum\ of\ the\ first\ 10241\ bytes\ of\ the\ video\ file\ (use\ \-\-test)\[aq],
832 \ \ \ \ \ \ \ \ \[aq]info_dict\[aq]:\ {
833 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]id\[aq]:\ \[aq]42\[aq],
834 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]ext\[aq]:\ \[aq]mp4\[aq],
835 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]title\[aq]:\ \[aq]Video\ title\ goes\ here\[aq],
836 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]thumbnail\[aq]:\ \[aq]re:^https?://.*\\.jpg$\[aq],
837 \ \ \ \ \ \ \ \ \ \ \ \ #\ TODO\ more\ properties,\ either\ as:
838 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ A\ value
839 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ MD5\ checksum;\ start\ the\ string\ with\ md5:
840 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ A\ regular\ expression;\ start\ the\ string\ with\ re:
841 \ \ \ \ \ \ \ \ \ \ \ \ #\ *\ Any\ Python\ type\ (for\ example\ int\ or\ float)
842 \ \ \ \ \ \ \ \ }
843 \ \ \ \ }
844
845 \ \ \ \ def\ _real_extract(self,\ url):
846 \ \ \ \ \ \ \ \ video_id\ =\ self._match_id(url)
847 \ \ \ \ \ \ \ \ webpage\ =\ self._download_webpage(url,\ video_id)
848
849 \ \ \ \ \ \ \ \ #\ TODO\ more\ code\ goes\ here,\ for\ example\ ...
850 \ \ \ \ \ \ \ \ title\ =\ self._html_search_regex(r\[aq]<h1>(.*?)</h1>\[aq],\ webpage,\ \[aq]title\[aq])
851
852 \ \ \ \ \ \ \ \ return\ {
853 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]id\[aq]:\ video_id,
854 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]title\[aq]:\ title,
855 \ \ \ \ \ \ \ \ \ \ \ \ \[aq]description\[aq]:\ self._og_search_description(webpage),
856 \ \ \ \ \ \ \ \ \ \ \ \ #\ TODO\ more\ properties\ (see\ youtube_dl/extractor/common.py)
857 \ \ \ \ \ \ \ \ }
858 \f[]
859 .fi
860 .RE
861 .IP " 5." 4
862 Add an import in
863 \f[C]youtube_dl/extractor/__init__.py\f[] (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/__init__.py).
864 .IP " 6." 4
865 Run
866 \f[C]python\ test/test_download.py\ TestDownload.test_YourExtractor\f[].
867 This \f[I]should fail\f[] at first, but you can continually re\-run it
868 until you\[aq]re done.
869 If you decide to add more than one test, then rename \f[C]_TEST\f[] to
870 \f[C]_TESTS\f[] and make it into a list of dictionaries.
871 The tests will be then be named
872 \f[C]TestDownload.test_YourExtractor\f[],
873 \f[C]TestDownload.test_YourExtractor_1\f[],
874 \f[C]TestDownload.test_YourExtractor_2\f[], etc.
875 .IP " 7." 4
876 Have a look at
877 \f[C]youtube_dl/common/extractor/common.py\f[] (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py)
878 for possible helper methods and a detailed description of what your
879 extractor should
880 return (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py#L38).
881 Add tests and code for as many as you want.
882 .IP " 8." 4
883 If you can, check the code with
884 flake8 (https://pypi.python.org/pypi/flake8).
885 .IP " 9." 4
886 When the tests pass, add (http://git-scm.com/docs/git-add) the new files
887 and commit (http://git-scm.com/docs/git-commit) them and
888 push (http://git-scm.com/docs/git-push) the result, like this:
889 .RS 4
890 .IP
891 .nf
892 \f[C]
893 $\ git\ add\ youtube_dl/extractor/__init__.py
894 $\ git\ add\ youtube_dl/extractor/yourextractor.py
895 $\ git\ commit\ \-m\ \[aq][yourextractor]\ Add\ new\ extractor\[aq]
896 $\ git\ push\ origin\ yourextractor
897 \f[]
898 .fi
899 .RE
900 .IP "10." 4
901 Finally, create a pull
902 request (https://help.github.com/articles/creating-a-pull-request).
903 We\[aq]ll then review and merge it.
904 .PP
905 In any case, thank you very much for your contributions!
906 .SH EMBEDDING YOUTUBE\-DL
907 .PP
908 youtube\-dl makes the best effort to be a good command\-line program,
909 and thus should be callable from any programming language.
910 If you encounter any problems parsing its output, feel free to create a
911 report (https://github.com/rg3/youtube-dl/issues/new).
912 .PP
913 From a Python program, you can embed youtube\-dl in a more powerful
914 fashion, like this:
915 .IP
916 .nf
917 \f[C]
918 from\ __future__\ import\ unicode_literals
919 import\ youtube_dl
920
921 ydl_opts\ =\ {}
922 with\ youtube_dl.YoutubeDL(ydl_opts)\ as\ ydl:
923 \ \ \ \ ydl.download([\[aq]http://www.youtube.com/watch?v=BaW_jenozKc\[aq]])
924 \f[]
925 .fi
926 .PP
927 Most likely, you\[aq]ll want to use various options.
928 For a list of what can be done, have a look at
929 youtube_dl/YoutubeDL.py (https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L69).
930 For a start, if you want to intercept youtube\-dl\[aq]s output, set a
931 \f[C]logger\f[] object.
932 .PP
933 Here\[aq]s a more complete example of a program that outputs only errors
934 (and a short message after the download is finished), and
935 downloads/converts the video to an mp3 file:
936 .IP
937 .nf
938 \f[C]
939 from\ __future__\ import\ unicode_literals
940 import\ youtube_dl
941
942
943 class\ MyLogger(object):
944 \ \ \ \ def\ debug(self,\ msg):
945 \ \ \ \ \ \ \ \ pass
946
947 \ \ \ \ def\ warning(self,\ msg):
948 \ \ \ \ \ \ \ \ pass
949
950 \ \ \ \ def\ error(self,\ msg):
951 \ \ \ \ \ \ \ \ print(msg)
952
953
954 def\ my_hook(d):
955 \ \ \ \ if\ d[\[aq]status\[aq]]\ ==\ \[aq]finished\[aq]:
956 \ \ \ \ \ \ \ \ print(\[aq]Done\ downloading,\ now\ converting\ ...\[aq])
957
958
959 ydl_opts\ =\ {
960 \ \ \ \ \[aq]format\[aq]:\ \[aq]bestaudio/best\[aq],
961 \ \ \ \ \[aq]postprocessors\[aq]:\ [{
962 \ \ \ \ \ \ \ \ \[aq]key\[aq]:\ \[aq]FFmpegExtractAudio\[aq],
963 \ \ \ \ \ \ \ \ \[aq]preferredcodec\[aq]:\ \[aq]mp3\[aq],
964 \ \ \ \ \ \ \ \ \[aq]preferredquality\[aq]:\ \[aq]192\[aq],
965 \ \ \ \ }],
966 \ \ \ \ \[aq]logger\[aq]:\ MyLogger(),
967 \ \ \ \ \[aq]progress_hooks\[aq]:\ [my_hook],
968 }
969 with\ youtube_dl.YoutubeDL(ydl_opts)\ as\ ydl:
970 \ \ \ \ ydl.download([\[aq]http://www.youtube.com/watch?v=BaW_jenozKc\[aq]])
971 \f[]
972 .fi
973 .SH BUGS
974 .PP
975 Bugs and suggestions should be reported at:
976 <https://github.com/rg3/youtube-dl/issues> .
977 Unless you were prompted so or there is another pertinent reason (e.g.
978 GitHub fails to accept the bug report), please do not send bug reports
979 via personal email.
980 For discussions, join us in the irc channel #youtube\-dl on freenode.
981 .PP
982 \f[B]Please include the full output of youtube\-dl when run with
983 \f[C]\-v\f[]\f[].
984 .PP
985 The output (including the first lines) contain important debugging
986 information.
987 Issues without the full output are often not reproducible and therefore
988 do not get solved in short order, if ever.
989 .PP
990 Please re\-read your issue once again to avoid a couple of common
991 mistakes (you can and should use this as a checklist):
992 .SS Is the description of the issue itself sufficient?
993 .PP
994 We often get issue reports that we cannot really decipher.
995 While in most cases we eventually get the required information after
996 asking back multiple times, this poses an unnecessary drain on our
997 resources.
998 Many contributors, including myself, are also not native speakers, so we
999 may misread some parts.
1000 .PP
1001 So please elaborate on what feature you are requesting, or what bug you
1002 want to be fixed.
1003 Make sure that it\[aq]s obvious
1004 .IP \[bu] 2
1005 What the problem is
1006 .IP \[bu] 2
1007 How it could be fixed
1008 .IP \[bu] 2
1009 How your proposed solution would look like
1010 .PP
1011 If your report is shorter than two lines, it is almost certainly missing
1012 some of these, which makes it hard for us to respond to it.
1013 We\[aq]re often too polite to close the issue outright, but the missing
1014 info makes misinterpretation likely.
1015 As a commiter myself, I often get frustrated by these issues, since the
1016 only possible way for me to move forward on them is to ask for
1017 clarification over and over.
1018 .PP
1019 For bug reports, this means that your report should contain the
1020 \f[I]complete\f[] output of youtube\-dl when called with the \-v flag.
1021 The error message you get for (most) bugs even says so, but you would
1022 not believe how many of our bug reports do not contain this information.
1023 .PP
1024 If your server has multiple IPs or you suspect censorship, adding
1025 \-\-call\-home may be a good idea to get more diagnostics.
1026 If the error is \f[C]ERROR:\ Unable\ to\ extract\ ...\f[] and you cannot
1027 reproduce it from multiple countries, add \f[C]\-\-dump\-pages\f[]
1028 (warning: this will yield a rather large output, redirect it to the file
1029 \f[C]log.txt\f[] by adding \f[C]>log.txt\ 2>&1\f[] to your
1030 command\-line) or upload the \f[C]\&.dump\f[] files you get when you add
1031 \f[C]\-\-write\-pages\f[] somewhere (https://gist.github.com/).
1032 .PP
1033 \f[B]Site support requests must contain an example URL\f[].
1034 An example URL is a URL you might want to download, like
1035 http://www.youtube.com/watch?v=BaW_jenozKc .
1036 There should be an obvious video present.
1037 Except under very special circumstances, the main page of a video
1038 service (e.g.
1039 http://www.youtube.com/ ) is \f[I]not\f[] an example URL.
1040 .SS Are you using the latest version?
1041 .PP
1042 Before reporting any issue, type youtube\-dl \-U.
1043 This should report that you\[aq]re up\-to\-date.
1044 About 20% of the reports we receive are already fixed, but people are
1045 using outdated versions.
1046 This goes for feature requests as well.
1047 .SS Is the issue already documented?
1048 .PP
1049 Make sure that someone has not already opened the issue you\[aq]re
1050 trying to open.
1051 Search at the top of the window or at
1052 https://github.com/rg3/youtube\-dl/search?type=Issues .
1053 If there is an issue, feel free to write something along the lines of
1054 "This affects me as well, with version 2015.01.01.
1055 Here is some more information on the issue: ...".
1056 While some issues may be old, a new post into them often spurs rapid
1057 activity.
1058 .SS Why are existing options not enough?
1059 .PP
1060 Before requesting a new feature, please have a quick peek at the list of
1061 supported
1062 options (https://github.com/rg3/youtube-dl/blob/master/README.md#synopsis).
1063 Many feature requests are for features that actually exist already!
1064 Please, absolutely do show off your work in the issue report and detail
1065 how the existing similar options do \f[I]not\f[] solve your problem.
1066 .SS Is there enough context in your bug report?
1067 .PP
1068 People want to solve problems, and often think they do us a favor by
1069 breaking down their larger problems (e.g.
1070 wanting to skip already downloaded files) to a specific request (e.g.
1071 requesting us to look whether the file exists before downloading the
1072 info page).
1073 However, what often happens is that they break down the problem into two
1074 steps: One simple, and one impossible (or extremely complicated one).
1075 .PP
1076 We are then presented with a very complicated request when the original
1077 problem could be solved far easier, e.g.
1078 by recording the downloaded video IDs in a separate file.
1079 To avoid this, you must include the greater context where it is
1080 non\-obvious.
1081 In particular, every feature request that does not consist of adding
1082 support for a new site should contain a use case scenario that explains
1083 in what situation the missing feature would be useful.
1084 .SS Does the issue involve one problem, and one problem only?
1085 .PP
1086 Some of our users seem to think there is a limit of issues they can or
1087 should open.
1088 There is no limit of issues they can or should open.
1089 While it may seem appealing to be able to dump all your issues into one
1090 ticket, that means that someone who solves one of your issues cannot
1091 mark the issue as closed.
1092 Typically, reporting a bunch of issues leads to the ticket lingering
1093 since nobody wants to attack that behemoth, until someone mercifully
1094 splits the issue into multiple ones.
1095 .PP
1096 In particular, every site support request issue should only pertain to
1097 services at one site (generally under a common domain, but always using
1098 the same backend technology).
1099 Do not request support for vimeo user videos, Whitehouse podcasts, and
1100 Google Plus pages in the same issue.
1101 Also, make sure that you don\[aq]t post bug reports alongside feature
1102 requests.
1103 As a rule of thumb, a feature request does not include outputs of
1104 youtube\-dl that are not immediately related to the feature at hand.
1105 Do not post reports of a network error alongside the request for a new
1106 video service.
1107 .SS Is anyone going to need the feature?
1108 .PP
1109 Only post features that you (or an incapacitated friend you can
1110 personally talk to) require.
1111 Do not post features because they seem like a good idea.
1112 If they are really useful, they will be requested by someone who
1113 requires them.
1114 .SS Is your question about youtube\-dl?
1115 .PP
1116 It may sound strange, but some bug reports we receive are completely
1117 unrelated to youtube\-dl and relate to a different or even the
1118 reporter\[aq]s own application.
1119 Please make sure that you are actually using youtube\-dl.
1120 If you are using a UI for youtube\-dl, report the bug to the maintainer
1121 of the actual application providing the UI.
1122 On the other hand, if your UI for youtube\-dl fails in some way you
1123 believe is related to youtube\-dl, by all means, go ahead and report the
1124 bug.
1125 .SH COPYRIGHT
1126 .PP
1127 youtube\-dl is released into the public domain by the copyright holders.
1128 .PP
1129 This README file was originally written by Daniel Bolton
1130 (<https://github.com/dbbolton>) and is likewise released into the public
1131 domain.