Guest User

Youtube-DL Commands

a guest
Jan 21st, 2018
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.17 KB | None | 0 0
  1. Options:
  2. General Options:
  3. -h, --help Print this help text and exit
  4. --version Print program version and exit
  5. -U, --update Update this program to latest version. Make
  6. sure that you have sufficient permissions
  7. (run with sudo if needed)
  8. -i, --ignore-errors Continue on download errors, for example to
  9. skip unavailable videos in a playlist
  10. --abort-on-error Abort downloading of further videos (in the
  11. playlist or the command line) if an error
  12. occurs
  13. --dump-user-agent Display the current browser identification
  14. --list-extractors List all supported extractors
  15. --extractor-descriptions Output descriptions of all supported
  16. extractors
  17. --force-generic-extractor Force extraction to use the generic
  18. extractor
  19. --default-search PREFIX Use this prefix for unqualified URLs. For
  20. example "gvsearch2:" downloads two videos
  21. from google videos for youtube-dl "large
  22. apple". Use the value "auto" to let
  23. youtube-dl guess ("auto_warning" to emit a
  24. warning when guessing). "error" just throws
  25. an error. The default value "fixup_error"
  26. repairs broken URLs, but emits an error if
  27. this is not possible instead of searching.
  28. --ignore-config Do not read configuration files. When given
  29. in the global configuration file /etc
  30. /youtube-dl.conf: Do not read the user
  31. configuration in ~/.config/youtube-
  32. dl/config (%APPDATA%/youtube-dl/config.txt
  33. on Windows)
  34. --config-location PATH Location of the configuration file; either
  35. the path to the config or its containing
  36. directory.
  37. --flat-playlist Do not extract the videos of a playlist,
  38. only list them.
  39. --mark-watched Mark videos watched (YouTube only)
  40. --no-mark-watched Do not mark videos watched (YouTube only)
  41. --no-color Do not emit color codes in output
  42.  
  43. Network Options:
  44. --proxy URL Use the specified HTTP/HTTPS/SOCKS proxy.
  45. To enable experimental SOCKS proxy, specify
  46. a proper scheme. For example
  47. socks5://127.0.0.1:1080/. Pass in an empty
  48. string (--proxy "") for direct connection
  49. --socket-timeout SECONDS Time to wait before giving up, in seconds
  50. --source-address IP Client-side IP address to bind to
  51. -4, --force-ipv4 Make all connections via IPv4
  52. -6, --force-ipv6 Make all connections via IPv6
  53.  
  54. Geo Restriction:
  55. --geo-verification-proxy URL Use this proxy to verify the IP address for
  56. some geo-restricted sites. The default
  57. proxy specified by --proxy (or none, if the
  58. options is not present) is used for the
  59. actual downloading.
  60. --geo-bypass Bypass geographic restriction via faking X
  61. -Forwarded-For HTTP header (experimental)
  62. --no-geo-bypass Do not bypass geographic restriction via
  63. faking X-Forwarded-For HTTP header
  64. (experimental)
  65. --geo-bypass-country CODE Force bypass geographic restriction with
  66. explicitly provided two-letter ISO 3166-2
  67. country code (experimental)
  68.  
  69. Video Selection:
  70. --playlist-start NUMBER Playlist video to start at (default is 1)
  71. --playlist-end NUMBER Playlist video to end at (default is last)
  72. --playlist-items ITEM_SPEC Playlist video items to download. Specify
  73. indices of the videos in the playlist
  74. separated by commas like: "--playlist-items
  75. 1,2,5,8" if you want to download videos
  76. indexed 1, 2, 5, 8 in the playlist. You can
  77. specify range: "--playlist-items
  78. 1-3,7,10-13", it will download the videos
  79. at index 1, 2, 3, 7, 10, 11, 12 and 13.
  80. --match-title REGEX Download only matching titles (regex or
  81. caseless sub-string)
  82. --reject-title REGEX Skip download for matching titles (regex or
  83. caseless sub-string)
  84. --max-downloads NUMBER Abort after downloading NUMBER files
  85. --min-filesize SIZE Do not download any videos smaller than
  86. SIZE (e.g. 50k or 44.6m)
  87. --max-filesize SIZE Do not download any videos larger than SIZE
  88. (e.g. 50k or 44.6m)
  89. --date DATE Download only videos uploaded in this date
  90. --datebefore DATE Download only videos uploaded on or before
  91. this date (i.e. inclusive)
  92. --dateafter DATE Download only videos uploaded on or after
  93. this date (i.e. inclusive)
  94. --min-views COUNT Do not download any videos with less than
  95. COUNT views
  96. --max-views COUNT Do not download any videos with more than
  97. COUNT views
  98. --match-filter FILTER Generic video filter. Specify any key (see
  99. the "OUTPUT TEMPLATE" for a list of
  100. available keys) to match if the key is
  101. present, !key to check if the key is not
  102. present, key > NUMBER (like "comment_count
  103. > 12", also works with >=, <, <=, !=, =) to
  104. compare against a number, key = 'LITERAL'
  105. (like "uploader = 'Mike Smith'", also works
  106. with !=) to match against a string literal
  107. and & to require multiple matches. Values
  108. which are not known are excluded unless you
  109. put a question mark (?) after the operator.
  110. For example, to only match videos that have
  111. been liked more than 100 times and disliked
  112. less than 50 times (or the dislike
  113. functionality is not available at the given
  114. service), but who also have a description,
  115. use --match-filter "like_count > 100 &
  116. dislike_count <? 50 & description" .
  117. --no-playlist Download only the video, if the URL refers
  118. to a video and a playlist.
  119. --yes-playlist Download the playlist, if the URL refers to
  120. a video and a playlist.
  121. --age-limit YEARS Download only videos suitable for the given
  122. age
  123. --download-archive FILE Download only videos not listed in the
  124. archive file. Record the IDs of all
  125. downloaded videos in it.
  126. --include-ads Download advertisements as well
  127. (experimental)
  128.  
  129. Download Options:
  130. -r, --limit-rate RATE Maximum download rate in bytes per second
  131. (e.g. 50K or 4.2M)
  132. -R, --retries RETRIES Number of retries (default is 10), or
  133. "infinite".
  134. --fragment-retries RETRIES Number of retries for a fragment (default
  135. is 10), or "infinite" (DASH, hlsnative and
  136. ISM)
  137. --skip-unavailable-fragments Skip unavailable fragments (DASH, hlsnative
  138. and ISM)
  139. --abort-on-unavailable-fragment Abort downloading when some fragment is not
  140. available
  141. --keep-fragments Keep downloaded fragments on disk after
  142. downloading is finished; fragments are
  143. erased by default
  144. --buffer-size SIZE Size of download buffer (e.g. 1024 or 16K)
  145. (default is 1024)
  146. --no-resize-buffer Do not automatically adjust the buffer
  147. size. By default, the buffer size is
  148. automatically resized from an initial value
  149. of SIZE.
  150. --playlist-reverse Download playlist videos in reverse order
  151. --playlist-random Download playlist videos in random order
  152. --xattr-set-filesize Set file xattribute ytdl.filesize with
  153. expected file size (experimental)
  154. --hls-prefer-native Use the native HLS downloader instead of
  155. ffmpeg
  156. --hls-prefer-ffmpeg Use ffmpeg instead of the native HLS
  157. downloader
  158. --hls-use-mpegts Use the mpegts container for HLS videos,
  159. allowing to play the video while
  160. downloading (some players may not be able
  161. to play it)
  162. --external-downloader COMMAND Use the specified external downloader.
  163. Currently supports
  164. aria2c,avconv,axel,curl,ffmpeg,httpie,wget
  165. --external-downloader-args ARGS Give these arguments to the external
  166. downloader
  167.  
  168. Filesystem Options:
  169. -a, --batch-file FILE File containing URLs to download ('-' for
  170. stdin)
  171. --id Use only video ID in file name
  172. -o, --output TEMPLATE Output filename template, see the "OUTPUT
  173. TEMPLATE" for all the info
  174. --autonumber-start NUMBER Specify the start value for %(autonumber)s
  175. (default is 1)
  176. --restrict-filenames Restrict filenames to only ASCII
  177. characters, and avoid "&" and spaces in
  178. filenames
  179. -w, --no-overwrites Do not overwrite files
  180. -c, --continue Force resume of partially downloaded files.
  181. By default, youtube-dl will resume
  182. downloads if possible.
  183. --no-continue Do not resume partially downloaded files
  184. (restart from beginning)
  185. --no-part Do not use .part files - write directly
  186. into output file
  187. --no-mtime Do not use the Last-modified header to set
  188. the file modification time
  189. --write-description Write video description to a .description
  190. file
  191. --write-info-json Write video metadata to a .info.json file
  192. --write-annotations Write video annotations to a
  193. .annotations.xml file
  194. --load-info-json FILE JSON file containing the video information
  195. (created with the "--write-info-json"
  196. option)
  197. --cookies FILE File to read cookies from and dump cookie
  198. jar in
  199. --cache-dir DIR Location in the filesystem where youtube-dl
  200. can store some downloaded information
  201. permanently. By default $XDG_CACHE_HOME
  202. /youtube-dl or ~/.cache/youtube-dl . At the
  203. moment, only YouTube player files (for
  204. videos with obfuscated signatures) are
  205. cached, but that may change.
  206. --no-cache-dir Disable filesystem caching
  207. --rm-cache-dir Delete all filesystem cache files
  208.  
  209. Thumbnail images:
  210. --write-thumbnail Write thumbnail image to disk
  211. --write-all-thumbnails Write all thumbnail image formats to disk
  212. --list-thumbnails Simulate and list all available thumbnail
  213. formats
  214.  
  215. Verbosity / Simulation Options:
  216. -q, --quiet Activate quiet mode
  217. --no-warnings Ignore warnings
  218. -s, --simulate Do not download the video and do not write
  219. anything to disk
  220. --skip-download Do not download the video
  221. -g, --get-url Simulate, quiet but print URL
  222. -e, --get-title Simulate, quiet but print title
  223. --get-id Simulate, quiet but print id
  224. --get-thumbnail Simulate, quiet but print thumbnail URL
  225. --get-description Simulate, quiet but print video description
  226. --get-duration Simulate, quiet but print video length
  227. --get-filename Simulate, quiet but print output filename
  228. --get-format Simulate, quiet but print output format
  229. -j, --dump-json Simulate, quiet but print JSON information.
  230. See the "OUTPUT TEMPLATE" for a description
  231. of available keys.
  232. -J, --dump-single-json Simulate, quiet but print JSON information
  233. for each command-line argument. If the URL
  234. refers to a playlist, dump the whole
  235. playlist information in a single line.
  236. --print-json Be quiet and print the video information as
  237. JSON (video is still being downloaded).
  238. --newline Output progress bar as new lines
  239. --no-progress Do not print progress bar
  240. --console-title Display progress in console titlebar
  241. -v, --verbose Print various debugging information
  242. --dump-pages Print downloaded pages encoded using base64
  243. to debug problems (very verbose)
  244. --write-pages Write downloaded intermediary pages to
  245. files in the current directory to debug
  246. problems
  247. --print-traffic Display sent and read HTTP traffic
  248. -C, --call-home Contact the youtube-dl server for debugging
  249. --no-call-home Do NOT contact the youtube-dl server for
  250. debugging
  251.  
  252. Workarounds:
  253. --encoding ENCODING Force the specified encoding (experimental)
  254. --no-check-certificate Suppress HTTPS certificate validation
  255. --prefer-insecure Use an unencrypted connection to retrieve
  256. information about the video. (Currently
  257. supported only for YouTube)
  258. --user-agent UA Specify a custom user agent
  259. --referer URL Specify a custom referer, use if the video
  260. access is restricted to one domain
  261. --add-header FIELD:VALUE Specify a custom HTTP header and its value,
  262. separated by a colon ':'. You can use this
  263. option multiple times
  264. --bidi-workaround Work around terminals that lack
  265. bidirectional text support. Requires bidiv
  266. or fribidi executable in PATH
  267. --sleep-interval SECONDS Number of seconds to sleep before each
  268. download when used alone or a lower bound
  269. of a range for randomized sleep before each
  270. download (minimum possible number of
  271. seconds to sleep) when used along with
  272. --max-sleep-interval.
  273. --max-sleep-interval SECONDS Upper bound of a range for randomized sleep
  274. before each download (maximum possible
  275. number of seconds to sleep). Must only be
  276. used along with --min-sleep-interval.
  277.  
  278. Video Format Options:
  279. -f, --format FORMAT Video format code, see the "FORMAT
  280. SELECTION" for all the info
  281. --all-formats Download all available video formats
  282. --prefer-free-formats Prefer free video formats unless a specific
  283. one is requested
  284. -F, --list-formats List all available formats of requested
  285. videos
  286. --youtube-skip-dash-manifest Do not download the DASH manifests and
  287. related data on YouTube videos
  288. --merge-output-format FORMAT If a merge is required (e.g.
  289. bestvideo+bestaudio), output to given
  290. container format. One of mkv, mp4, ogg,
  291. webm, flv. Ignored if no merge is required
  292.  
  293. Subtitle Options:
  294. --write-sub Write subtitle file
  295. --write-auto-sub Write automatically generated subtitle file
  296. (YouTube only)
  297. --all-subs Download all the available subtitles of the
  298. video
  299. --list-subs List all available subtitles for the video
  300. --sub-format FORMAT Subtitle format, accepts formats
  301. preference, for example: "srt" or
  302. "ass/srt/best"
  303. --sub-lang LANGS Languages of the subtitles to download
  304. (optional) separated by commas, use --list-
  305. subs for available language tags
  306.  
  307. Authentication Options:
  308. -u, --username USERNAME Login with this account ID
  309. -p, --password PASSWORD Account password. If this option is left
  310. out, youtube-dl will ask interactively.
  311. -2, --twofactor TWOFACTOR Two-factor authentication code
  312. -n, --netrc Use .netrc authentication data
  313. --video-password PASSWORD Video password (vimeo, smotri, youku)
  314.  
  315. Adobe Pass Options:
  316. --ap-mso MSO Adobe Pass multiple-system operator (TV
  317. provider) identifier, use --ap-list-mso for
  318. a list of available MSOs
  319. --ap-username USERNAME Multiple-system operator account login
  320. --ap-password PASSWORD Multiple-system operator account password.
  321. If this option is left out, youtube-dl will
  322. ask interactively.
  323. --ap-list-mso List all supported multiple-system
  324. operators
  325.  
  326. Post-processing Options:
  327. -x, --extract-audio Convert video files to audio-only files
  328. (requires ffmpeg or avconv and ffprobe or
  329. avprobe)
  330. --audio-format FORMAT Specify audio format: "best", "aac",
  331. "flac", "mp3", "m4a", "opus", "vorbis", or
  332. "wav"; "best" by default; No effect without
  333. -x
  334. --audio-quality QUALITY Specify ffmpeg/avconv audio quality, insert
  335. a value between 0 (better) and 9 (worse)
  336. for VBR or a specific bitrate like 128K
  337. (default 5)
  338. --recode-video FORMAT Encode the video to another format if
  339. necessary (currently supported:
  340. mp4|flv|ogg|webm|mkv|avi)
  341. --postprocessor-args ARGS Give these arguments to the postprocessor
  342. -k, --keep-video Keep the video file on disk after the post-
  343. processing; the video is erased by default
  344. --no-post-overwrites Do not overwrite post-processed files; the
  345. post-processed files are overwritten by
  346. default
  347. --embed-subs Embed subtitles in the video (only for mp4,
  348. webm and mkv videos)
  349. --embed-thumbnail Embed thumbnail in the audio as cover art
  350. --add-metadata Write metadata to the video file
  351. --metadata-from-title FORMAT Parse additional metadata like song title /
  352. artist from the video title. The format
  353. syntax is the same as --output. Regular
  354. expression with named capture groups may
  355. also be used. The parsed parameters replace
  356. existing values. Example: --metadata-from-
  357. title "%(artist)s - %(title)s" matches a
  358. title like "Coldplay - Paradise". Example
  359. (regex): --metadata-from-title
  360. "(?P<artist>.+?) - (?P<title>.+)"
  361. --xattrs Write metadata to the video file's xattrs
  362. (using dublin core and xdg standards)
  363. --fixup POLICY Automatically correct known faults of the
  364. file. One of never (do nothing), warn (only
  365. emit a warning), detect_or_warn (the
  366. default; fix file if we can, warn
  367. otherwise)
  368. --prefer-avconv Prefer avconv over ffmpeg for running the
  369. postprocessors (default)
  370. --prefer-ffmpeg Prefer ffmpeg over avconv for running the
  371. postprocessors
  372. --ffmpeg-location PATH Location of the ffmpeg/avconv binary;
  373. either the path to the binary or its
  374. containing directory.
  375. --exec CMD Execute a command on the file after
  376. downloading, similar to find's -exec
  377. syntax. Example: --exec 'adb push {}
  378. /sdcard/Music/ && rm {}'
  379. --convert-subs FORMAT Convert the subtitles to other format
  380. (currently supported: srt|ass|vtt|lr
Add Comment
Please, Sign In to add comment