]> jfr.im git - yt-dlp.git/blame - youtube-dl.1
Merged, modified and compiled Dailymotion pull request #446 by @Steap
[yt-dlp.git] / youtube-dl.1
CommitLineData
cfcec693
FV
1.TH youtube-dl 1 ""
2.SH NAME
3.PP
4youtube-dl
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
11from YouTube.com and a few more sites.
12It requires the Python interpreter, version 2.x (x being at least 6),
13and it is not platform specific.
14It should work in your Unix box, in Windows or in Mac OS X.
15It is released to the public domain, which means you can modify it,
16redistribute 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
24-i,\ --ignore-errors\ \ \ \ \ \ continue\ on\ download\ errors
25-r,\ --rate-limit\ LIMIT\ \ \ download\ rate\ limit\ (e.g.\ 50k\ or\ 44.6m)
26-R,\ --retries\ RETRIES\ \ \ \ number\ of\ retries\ (default\ is\ 10)
27--dump-user-agent\ \ \ \ \ \ \ \ display\ the\ current\ browser\ identification
20326b8b 28--user-agent\ UA\ \ \ \ \ \ \ \ \ \ specify\ a\ custom\ user\ agent
cfcec693
FV
29--list-extractors\ \ \ \ \ \ \ \ List\ all\ supported\ extractors\ and\ the\ URLs\ they
30\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ would\ handle
31\f[]
32.fi
33.SS Video Selection:
34.IP
35.nf
36\f[C]
37--playlist-start\ NUMBER\ \ playlist\ video\ to\ start\ at\ (default\ is\ 1)
38--playlist-end\ NUMBER\ \ \ \ playlist\ video\ to\ end\ at\ (default\ is\ last)
39--match-title\ REGEX\ \ \ \ \ \ download\ only\ matching\ titles\ (regex\ or\ caseless
40\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub-string)
41--reject-title\ REGEX\ \ \ \ \ skip\ download\ for\ matching\ titles\ (regex\ or
42\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub-string)
43--max-downloads\ NUMBER\ \ \ Abort\ after\ downloading\ NUMBER\ files
44\f[]
45.fi
46.SS Filesystem Options:
47.IP
48.nf
49\f[C]
50-t,\ --title\ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ title\ in\ file\ name
51-l,\ --literal\ \ \ \ \ \ \ \ \ \ \ \ use\ literal\ title\ in\ file\ name
52-A,\ --auto-number\ \ \ \ \ \ \ \ number\ downloaded\ files\ starting\ from\ 00000
53-o,\ --output\ TEMPLATE\ \ \ \ output\ filename\ template.\ Use\ %(stitle)s\ to\ get\ the
54\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ title,\ %(uploader)s\ for\ the\ uploader\ name,
55\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(autonumber)s\ to\ get\ an\ automatically\ incremented
56\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ number,\ %(ext)s\ for\ the\ filename\ extension,
551fa9df
FV
57\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(upload_date)s\ for\ the\ upload\ date\ (YYYYMMDD),
58\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(provider)s\ for\ the\ provider\ (youtube,\ metacafe,
59\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ etc),\ %(id)s\ for\ the\ video\ id\ and\ %%\ for\ a\ literal
60\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ percent.\ Use\ -\ to\ output\ to\ stdout.
cfcec693
FV
61-a,\ --batch-file\ FILE\ \ \ \ file\ containing\ URLs\ to\ download\ (\[aq]-\[aq]\ for\ stdin)
62-w,\ --no-overwrites\ \ \ \ \ \ do\ not\ overwrite\ files
63-c,\ --continue\ \ \ \ \ \ \ \ \ \ \ resume\ partially\ downloaded\ files
64--no-continue\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ resume\ partially\ downloaded\ files\ (restart
65\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ beginning)
66--cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ file\ to\ read\ cookies\ from\ and\ dump\ cookie\ jar\ in
67--no-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ .part\ files
68--no-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ the\ Last-modified\ header\ to\ set\ the\ file
69\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modification\ time
70--write-description\ \ \ \ \ \ write\ video\ description\ to\ a\ .description\ file
71--write-info-json\ \ \ \ \ \ \ \ write\ video\ metadata\ to\ a\ .info.json\ file
72\f[]
73.fi
74.SS Verbosity / Simulation Options:
75.IP
76.nf
77\f[C]
78-q,\ --quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ activates\ quiet\ mode
79-s,\ --simulate\ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video\ and\ do\ not\ write\ anything
80\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ to\ disk
81--skip-download\ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video
82-g,\ --get-url\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ URL
83-e,\ --get-title\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ title
84--get-thumbnail\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ thumbnail\ URL
85--get-description\ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ description
86--get-filename\ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ filename
87--get-format\ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ format
88--no-progress\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ print\ progress\ bar
89--console-title\ \ \ \ \ \ \ \ \ \ display\ progress\ in\ console\ titlebar
90-v,\ --verbose\ \ \ \ \ \ \ \ \ \ \ \ print\ various\ debugging\ information
91\f[]
92.fi
93.SS Video Format Options:
94.IP
95.nf
96\f[C]
97-f,\ --format\ FORMAT\ \ \ \ \ \ video\ format\ code
98--all-formats\ \ \ \ \ \ \ \ \ \ \ \ download\ all\ available\ video\ formats
99--prefer-free-formats\ \ \ \ prefer\ free\ video\ formats\ unless\ a\ specific\ one\ is
100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ requested
101--max-quality\ FORMAT\ \ \ \ \ highest\ quality\ format\ to\ download
102-F,\ --list-formats\ \ \ \ \ \ \ list\ all\ available\ formats\ (currently\ youtube\ only)
103--write-srt\ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ video\ closed\ captions\ to\ a\ .srt\ file
104\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (currently\ youtube\ only)
105--srt-lang\ LANG\ \ \ \ \ \ \ \ \ \ language\ of\ the\ closed\ captions\ to\ download
106\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (optional)\ use\ IETF\ language\ tags\ like\ \[aq]en\[aq]
107\f[]
108.fi
109.SS Authentication Options:
110.IP
111.nf
112\f[C]
113-u,\ --username\ USERNAME\ \ account\ username
114-p,\ --password\ PASSWORD\ \ account\ password
115-n,\ --netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ .netrc\ authentication\ data
116\f[]
117.fi
118.SS Post-processing Options:
119.IP
120.nf
121\f[C]
122--extract-audio\ \ \ \ \ \ \ \ \ \ convert\ video\ files\ to\ audio-only\ files\ (requires
123\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ffmpeg\ or\ avconv\ and\ ffprobe\ or\ avprobe)
124--audio-format\ FORMAT\ \ \ \ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",\ or\ "wav";
125\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ best\ by\ default
234e230c
PH
126--audio-quality\ QUALITY\ \ ffmpeg/avconv\ audio\ quality\ specification,\ insert\ a
127\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value\ between\ 0\ (better)\ and\ 9\ (worse)\ for\ VBR\ or\ a
128\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ specific\ bitrate\ like\ 128K\ (default\ 5)
cfcec693
FV
129-k,\ --keep-video\ \ \ \ \ \ \ \ \ keeps\ the\ video\ file\ on\ disk\ after\ the\ post-
130\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processing;\ the\ video\ is\ erased\ by\ default
131\f[]
132.fi
133.SH FAQ
134.SS Can you please put the -b option back?
135.PP
136Most people asking this question are not aware that youtube-dl now
137defaults to downloading the highest available quality as reported by
138YouTube, which will be 1080p or 720p in some cases, so you no longer
139need the -b option.
140For some specific videos, maybe YouTube does not report them to be
141available in a specific high quality format you\[aq]\[aq]re interested
142in.
143In that case, simply request it with the -f option and youtube-dl will
144try to download it.
145.SS I get HTTP error 402 when trying to download a video. What\[aq]s
146this?
147.PP
148Apparently YouTube requires you to pass a CAPTCHA test if you download
149too much.
150We\[aq]\[aq]re considering to provide a way to let you solve the
151CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
152moment, your best course of action is pointing a webbrowser to the
153youtube URL, solving the CAPTCHA, and restart youtube-dl.
154.SS I have downloaded a video but how can I play it?
155.PP
156Once the video is fully downloaded, use any video player, such as
157vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
158.SS The links provided by youtube-dl -g are not working anymore
159.PP
160The URLs youtube-dl outputs require the downloader to have the correct
161cookies.
162Use the \f[C]--cookies\f[] option to write the required cookies into a
163file, and advise your downloader to read cookies from that file.
164Some sites also require a common user agent to be used, use
165\f[C]--dump-user-agent\f[] to see the one in use by youtube-dl.
166.SS ERROR: no fmt_url_map or conn information found in video info
167.PP
168youtube has switched to a new video info format in July 2011 which is
169not supported by old versions of youtube-dl.
170You can update youtube-dl with \f[C]sudo\ youtube-dl\ --update\f[].
6c5b442a
PH
171.SS ERROR: unable to download video
172.PP
173youtube requires an additional signature since September 2012 which is
174not supported by old versions of youtube-dl.
175You can update youtube-dl with \f[C]sudo\ youtube-dl\ --update\f[].
551fa9df 176.SS SyntaxError: Non-ASCII character
6c5b442a
PH
177.PP
178The error
179.IP
180.nf
181\f[C]
182File\ "youtube-dl",\ line\ 2
183SyntaxError:\ Non-ASCII\ character\ \[aq]\\x93\[aq]\ ...
184\f[]
185.fi
186.PP
187means you\[aq]re using an outdated version of Python.
188Please update to Python 2.6 or 2.7.
189.PP
190To run youtube-dl under Python 2.5, you\[aq]ll have to manually check it
191out like this:
192.IP
193.nf
194\f[C]
195git\ clone\ git://github.com/rg3/youtube-dl.git
196cd\ youtube-dl
551fa9df 197python\ -m\ youtube_dl\ --help
6c5b442a
PH
198\f[]
199.fi
200.PP
201Please note that Python 2.5 is not supported anymore.
551fa9df
FV
202.SS What is this binary file? Where has the code gone?
203.PP
204Since June 2012 (#342) youtube-dl is packed as an executable zipfile,
205simply unzip it (might need renaming to \f[C]youtube-dl.zip\f[] first on
206some systems) or clone the git repo to see the code.
207If you modify the code, you can run it by executing the
208\f[C]__main__.py\f[] file.
209To recompile the executable, run \f[C]make\ compile\f[].
210.SS The exe throws a \f[I]Runtime error from Visual C++\f[]
211.PP
212To run the exe you need to install first the Microsoft Visual C++ 2008
213Redistributable
214Package (http://www.microsoft.com/en-us/download/details.aspx?id=29).
cfcec693
FV
215.SH COPYRIGHT
216.PP
217youtube-dl is released into the public domain by the copyright holders.
218.PP
219This README file was originally written by Daniel Bolton
220(<https://github.com/dbbolton>) and is likewise released into the public
221domain.
222.SH BUGS
223.PP
224Bugs and suggestions should be reported at:
225<https://github.com/rg3/youtube-dl/issues>
226.PP
227Please include:
228.IP \[bu] 2
229Your exact command line, like
230\f[C]youtube-dl\ -t\ "http://www.youtube.com/watch?v=uHlDtZ6Oc3s&feature=channel_video_title"\f[].
231A common mistake is not to escape the \f[C]&\f[].
232Putting URLs in quotes should solve this problem.
233.IP \[bu] 2
234The output of \f[C]youtube-dl\ --version\f[]
235.IP \[bu] 2
236The output of \f[C]python\ --version\f[]
237.IP \[bu] 2
238The name and version of your Operating System ("Ubuntu 11.04 x64" or
239"Windows 7 x64" is usually enough).