You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

192 lines
8.8 KiB

  1. .TH youtube-dl 1 ""
  2. .SH NAME
  3. .PP
  4. youtube-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
  11. from YouTube.com and a few more sites.
  12. It requires the Python interpreter, version 2.x (x being at least 6),
  13. and it is not platform specific.
  14. It should work in your Unix box, in Windows or in 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
  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
  28. --list-extractors\ \ \ \ \ \ \ \ List\ all\ supported\ extractors\ and\ the\ URLs\ they
  29. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ would\ handle
  30. \f[]
  31. .fi
  32. .SS Video Selection:
  33. .IP
  34. .nf
  35. \f[C]
  36. --playlist-start\ NUMBER\ \ playlist\ video\ to\ start\ at\ (default\ is\ 1)
  37. --playlist-end\ NUMBER\ \ \ \ playlist\ video\ to\ end\ at\ (default\ is\ last)
  38. --match-title\ REGEX\ \ \ \ \ \ download\ only\ matching\ titles\ (regex\ or\ caseless
  39. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sub-string)
  40. --reject-title\ REGEX\ \ \ \ \ skip\ download\ for\ matching\ titles\ (regex\ or
  41. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ caseless\ sub-string)
  42. --max-downloads\ NUMBER\ \ \ Abort\ after\ downloading\ NUMBER\ files
  43. \f[]
  44. .fi
  45. .SS Filesystem Options:
  46. .IP
  47. .nf
  48. \f[C]
  49. -t,\ --title\ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ title\ in\ file\ name
  50. -l,\ --literal\ \ \ \ \ \ \ \ \ \ \ \ use\ literal\ title\ in\ file\ name
  51. -A,\ --auto-number\ \ \ \ \ \ \ \ number\ downloaded\ files\ starting\ from\ 00000
  52. -o,\ --output\ TEMPLATE\ \ \ \ output\ filename\ template.\ Use\ %(stitle)s\ to\ get\ the
  53. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ title,\ %(uploader)s\ for\ the\ uploader\ name,
  54. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(autonumber)s\ to\ get\ an\ automatically\ incremented
  55. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ number,\ %(ext)s\ for\ the\ filename\ extension,
  56. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %(upload_date)s\ for\ the\ upload\ date\ (YYYYMMDD),\ and
  57. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %%\ for\ a\ literal\ percent.\ Use\ -\ to\ output\ to
  58. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stdout.
  59. -a,\ --batch-file\ FILE\ \ \ \ file\ containing\ URLs\ to\ download\ (\[aq]-\[aq]\ for\ stdin)
  60. -w,\ --no-overwrites\ \ \ \ \ \ do\ not\ overwrite\ files
  61. -c,\ --continue\ \ \ \ \ \ \ \ \ \ \ resume\ partially\ downloaded\ files
  62. --no-continue\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ resume\ partially\ downloaded\ files\ (restart
  63. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ from\ beginning)
  64. --cookies\ FILE\ \ \ \ \ \ \ \ \ \ \ file\ to\ read\ cookies\ from\ and\ dump\ cookie\ jar\ in
  65. --no-part\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ .part\ files
  66. --no-mtime\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ do\ not\ use\ the\ Last-modified\ header\ to\ set\ the\ file
  67. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ modification\ time
  68. --write-description\ \ \ \ \ \ write\ video\ description\ to\ a\ .description\ file
  69. --write-info-json\ \ \ \ \ \ \ \ write\ video\ metadata\ to\ a\ .info.json\ file
  70. \f[]
  71. .fi
  72. .SS Verbosity / Simulation Options:
  73. .IP
  74. .nf
  75. \f[C]
  76. -q,\ --quiet\ \ \ \ \ \ \ \ \ \ \ \ \ \ activates\ quiet\ mode
  77. -s,\ --simulate\ \ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video\ and\ do\ not\ write\ anything
  78. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ to\ disk
  79. --skip-download\ \ \ \ \ \ \ \ \ \ do\ not\ download\ the\ video
  80. -g,\ --get-url\ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ URL
  81. -e,\ --get-title\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ title
  82. --get-thumbnail\ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ thumbnail\ URL
  83. --get-description\ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ video\ description
  84. --get-filename\ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ filename
  85. --get-format\ \ \ \ \ \ \ \ \ \ \ \ \ simulate,\ quiet\ but\ print\ output\ format
  86. --no-progress\ \ \ \ \ \ \ \ \ \ \ \ do\ not\ print\ progress\ bar
  87. --console-title\ \ \ \ \ \ \ \ \ \ display\ progress\ in\ console\ titlebar
  88. -v,\ --verbose\ \ \ \ \ \ \ \ \ \ \ \ print\ various\ debugging\ information
  89. \f[]
  90. .fi
  91. .SS Video Format Options:
  92. .IP
  93. .nf
  94. \f[C]
  95. -f,\ --format\ FORMAT\ \ \ \ \ \ video\ format\ code
  96. --all-formats\ \ \ \ \ \ \ \ \ \ \ \ download\ all\ available\ video\ formats
  97. --prefer-free-formats\ \ \ \ prefer\ free\ video\ formats\ unless\ a\ specific\ one\ is
  98. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ requested
  99. --max-quality\ FORMAT\ \ \ \ \ highest\ quality\ format\ to\ download
  100. -F,\ --list-formats\ \ \ \ \ \ \ list\ all\ available\ formats\ (currently\ youtube\ only)
  101. --write-srt\ \ \ \ \ \ \ \ \ \ \ \ \ \ write\ video\ closed\ captions\ to\ a\ .srt\ file
  102. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (currently\ youtube\ only)
  103. --srt-lang\ LANG\ \ \ \ \ \ \ \ \ \ language\ of\ the\ closed\ captions\ to\ download
  104. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (optional)\ use\ IETF\ language\ tags\ like\ \[aq]en\[aq]
  105. \f[]
  106. .fi
  107. .SS Authentication Options:
  108. .IP
  109. .nf
  110. \f[C]
  111. -u,\ --username\ USERNAME\ \ account\ username
  112. -p,\ --password\ PASSWORD\ \ account\ password
  113. -n,\ --netrc\ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ .netrc\ authentication\ data
  114. \f[]
  115. .fi
  116. .SS Post-processing Options:
  117. .IP
  118. .nf
  119. \f[C]
  120. --extract-audio\ \ \ \ \ \ \ \ \ \ convert\ video\ files\ to\ audio-only\ files\ (requires
  121. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ffmpeg\ or\ avconv\ and\ ffprobe\ or\ avprobe)
  122. --audio-format\ FORMAT\ \ \ \ "best",\ "aac",\ "vorbis",\ "mp3",\ "m4a",\ or\ "wav";
  123. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ best\ by\ default
  124. --audio-quality\ QUALITY\ \ ffmpeg/avconv\ audio\ bitrate\ specification,\ 128k\ by
  125. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default
  126. -k,\ --keep-video\ \ \ \ \ \ \ \ \ keeps\ the\ video\ file\ on\ disk\ after\ the\ post-
  127. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ processing;\ the\ video\ is\ erased\ by\ default
  128. \f[]
  129. .fi
  130. .SH FAQ
  131. .SS Can you please put the -b option back?
  132. .PP
  133. Most people asking this question are not aware that youtube-dl now
  134. defaults to downloading the highest available quality as reported by
  135. YouTube, which will be 1080p or 720p in some cases, so you no longer
  136. need the -b option.
  137. For some specific videos, maybe YouTube does not report them to be
  138. available in a specific high quality format you\[aq]\[aq]re interested
  139. in.
  140. In that case, simply request it with the -f option and youtube-dl will
  141. try to download it.
  142. .SS I get HTTP error 402 when trying to download a video. What\[aq]s
  143. this?
  144. .PP
  145. Apparently YouTube requires you to pass a CAPTCHA test if you download
  146. too much.
  147. We\[aq]\[aq]re considering to provide a way to let you solve the
  148. CAPTCHA (https://github.com/rg3/youtube-dl/issues/154), but at the
  149. moment, your best course of action is pointing a webbrowser to the
  150. youtube URL, solving the CAPTCHA, and restart youtube-dl.
  151. .SS I have downloaded a video but how can I play it?
  152. .PP
  153. Once the video is fully downloaded, use any video player, such as
  154. vlc (http://www.videolan.org) or mplayer (http://www.mplayerhq.hu/).
  155. .SS The links provided by youtube-dl -g are not working anymore
  156. .PP
  157. The URLs youtube-dl outputs require the downloader to have the correct
  158. cookies.
  159. Use the \f[C]--cookies\f[] option to write the required cookies into a
  160. file, and advise your downloader to read cookies from that file.
  161. Some sites also require a common user agent to be used, use
  162. \f[C]--dump-user-agent\f[] to see the one in use by youtube-dl.
  163. .SS ERROR: no fmt_url_map or conn information found in video info
  164. .PP
  165. youtube has switched to a new video info format in July 2011 which is
  166. not supported by old versions of youtube-dl.
  167. You can update youtube-dl with \f[C]sudo\ youtube-dl\ --update\f[].
  168. .SH COPYRIGHT
  169. .PP
  170. youtube-dl is released into the public domain by the copyright holders.
  171. .PP
  172. This README file was originally written by Daniel Bolton
  173. (<https://github.com/dbbolton>) and is likewise released into the public
  174. domain.
  175. .SH BUGS
  176. .PP
  177. Bugs and suggestions should be reported at:
  178. <https://github.com/rg3/youtube-dl/issues>
  179. .PP
  180. Please include:
  181. .IP \[bu] 2
  182. Your exact command line, like
  183. \f[C]youtube-dl\ -t\ "http://www.youtube.com/watch?v=uHlDtZ6Oc3s&feature=channel_video_title"\f[].
  184. A common mistake is not to escape the \f[C]&\f[].
  185. Putting URLs in quotes should solve this problem.
  186. .IP \[bu] 2
  187. The output of \f[C]youtube-dl\ --version\f[]
  188. .IP \[bu] 2
  189. The output of \f[C]python\ --version\f[]
  190. .IP \[bu] 2
  191. The name and version of your Operating System ("Ubuntu 11.04 x64" or
  192. "Windows 7 x64" is usually enough).