Discover / Video & YouTube

youtube-dl

by ytdl-orgPython

Command line program to download videos from YouTube and many other sites.

Toolactive

Maturity: active because commit 165d ago, latest release 2021.12.17. Derived from release and commit history, not a rating.

Stars
141k
Forks
11k
Downloads / mo
235k
Last commit
2026-02-19
License
Unlicense
Open issues
4.1k

Market and trust evidence

Edition not yet matched

No exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.

Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.

In practice

Written by AI from this repository’s README · high confidence

A user wants a local copy of a video or playlist and the site offers no download option.

Use it when

Use it when you need scriptable downloads with format selection, output templates and configuration files.

Not the right pick when

It targets an old Python range and a fixed extractor set, so sites that change their players may stop working.

Capabilities

  • downloads from YouTube and other video platforms
  • format selection and video selection filters
  • output templates for naming files
  • configuration files at global and user level
  • self update with the -U flag
  • can be embedded in other Python programs

Requirements

  • Python interpreter, version 2.6, 2.7, or 3.2+

Cost: Free and open source

Install

Derived from the published package name in the repository, not from a model.

Video walkthroughs

Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.

What the repository ships

Has testsHas docsCI configured

Detected from the actual files in the repository root.

Latest release 2021.12.17

Published 2021-12-16

This release is old and has many known issues. See "... commits to master since this release" above.

You almost certainly want the nightly build release, and not this one. The nightly build is created from the master branch of this repo if changes have been committed since the last build. Read about Installation of the nightly build. Major fixes in the nightly build are listed here.

Core

  • [postprocessor/ffmpeg] Show ffmpeg output on error (#22680, #29336)

Extractors

  • [youtube] Update signature function patterns (#30363, #30366)
  • [peertube] Only call description endpoint if necessary (#29383)
  • [periscope] Pass referer to HLS requests (#29419)
  • [liveleak] Remove extractor (#17625, #24222, #29331)
  • [pornhub] Add support for pornhubthbh7ap3u.onion
  • [pornhub] Detect geo restriction
  • [pornhub] Dismiss tbr extracted from download URLs (#28927)
  • [curiositystream:collection] Extend _VALID_URL (#26326, #29117)
  • [youtube] Make get_video_info processing more robust (#29333)
  • [youtube] Workaround for get_video_info request (#29333)
  • [bilibili] Strip uploader name (#29202)
  • [youtube] Update invidious instance list (#29281)
  • [umg:de] Update GraphQL API URL (#29304)
  • [nrk] Switch psapi URL to https (#29344)
  • [egghead] Add support for app.egghead.io (#28404, #29303)
  • [appleconnect] Fix extraction (#29208)
  • [orf:tvthek] Add support for MPD formats (#28672, #29236)

Tags

README

Build Status

youtube-dl - download videos from youtube.com or other video platforms

  • INSTALLATION
  • DESCRIPTION
  • OPTIONS
  • CONFIGURATION
  • OUTPUT TEMPLATE
  • FORMAT SELECTION
  • VIDEO SELECTION
  • FAQ
  • DEVELOPER INSTRUCTIONS
  • EMBEDDING YOUTUBE-DL
  • BUGS
  • COPYRIGHT

INSTALLATION

To install it right away for all UNIX users (Linux, macOS, etc.), type:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

If you do not have curl, you can alternatively use a recent wget:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

Windows users can download an .exe file and place it in any location on their PATH except for %SYSTEMROOT%\System32 (e.g. do not put in C:\Windows\System32).

You can also use pip:

sudo -H pip install --upgrade youtube-dl

This command will update youtube-dl if you have already installed it. See the pypi page for more information.

macOS users can install youtube-dl with Homebrew:

brew install youtube-dl

Or with MacPorts:

sudo port install youtube-dl

Alternatively, refer to the developer instructions for how to check out and work with the git repository. For further options, including PGP signatures, see the youtube-dl Download Page.

DESCRIPTION

youtube-dl is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

youtube-dl [OPTIONS] URL [URL...]

OPTIONS

-h, --help Print this help text and exit

--version Print program version and exit

-U, --update Update this program to latest version.

Make sure that you have sufficient

permissions (run with sudo if needed)

-i, --ignore-errors Continue on download errors, for

example to skip unavailable videos in a

playlist

--abort-on-error Abort downloading of further videos (in

the playlist or the command line) if an

error occurs

--dump-user-agent Display the current browser

identification

--list-extractors List all supported extractors

--extractor-descriptions Output descriptions of all supported

extractors

--force-generic-extractor Force extraction to use the generic

extractor

--default-search PREFIX Use this prefix for unqualified URLs.

For example "gvsearch2:" downloads two

videos from google videos for youtube-

dl "large apple". Use the value "auto"

to let youtube-dl guess ("auto_warning"

to emit a warning when guessing).

"error" just throws an error. The

default value "fixup_error" repairs

broken URLs, but emits an error if this

is not possible instead of searching.

--ignore-config Do not read configuration files. When

given in the global configuration file

/etc/youtube-dl.conf: Do not read the

user configuration in

~/.config/youtube-dl/config

(%APPDATA%/youtube-dl/config.txt on

Windows)

--config-location PATH Location of the configuration file;

either the path to the config or its

containing directory.

--flat-playlist Do not extract the videos of a

playlist, only list them.

--mark-watched Mark videos watched (YouTube only)

--no-mark-watched Do not mark videos watched (YouTube

only)

--no-color Do not emit color codes in output

Network Options:

--proxy URL Use the specified HTTP/HTTPS/SOCKS

proxy. To enable SOCKS proxy, specify a

proper scheme. For example

socks5://127.0.0.1:1080/. Pass in an

empty string (--proxy "") for direct

connection

--socket-timeout SECONDS Time to wait before giving up, in

seconds

--source-address IP Client-side IP address to bind to

-4, --force-ipv4 Make all connections via IPv4

-6, --force-ipv6 Make all connections via IPv6

Geo Restriction:

--geo-verification-proxy URL Use this proxy to verify the IP address

for some geo-restricted sites. The

default proxy specified by --proxy (or

none, if the option is not present) is

used for the actual downloading.

--geo-bypass Bypass geographic restriction via

faking X-Forwarded-For HTTP header

--no-geo-bypass Do not bypass geographic restriction

via faking X-Forwarded-For HTTP header

--geo-bypass-country CODE Force bypass geographic restriction

with explicitly provided two-letter ISO

3166-2 country code

--geo-bypass-ip-block IP_BLOCK Force bypass geographic restriction

with explicitly provided IP block in

CIDR notation

Video Selection:

--playlist-start NUMBER Playlist video to start at (default is

1)

--playlist-end NUMBER Playlist video to end at (default is

last)

--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" 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

download the videos at index 1, 2, 3,

7, 10, 11, 12 and 13.

--match-title REGEX Download only matching titles (regex or

caseless sub-string)

--reject-title REGEX Skip download for matching titles

(regex or caseless sub-string)

--max-downloads NUMBER Abort after downloading NUMBER files

--min-filesize SIZE Do not download any videos smaller than

SIZE (e.g. 50k or 44.6m)

--max-filesize SIZE Do not download any videos larger than

SIZE (e.g. 50k or 44.6m)

--date DATE Download only videos uploaded in this

date

--datebefore DATE Download only videos uploaded on or

before this date (i.e. inclusive)

--dateafter DATE Download only videos uploaded on or

after this date (i.e. inclusive)

--min-views COUNT Do not download any videos with less

than COUNT views

--max-views COUNT Do not download any videos with more

than COUNT views

--match-filter FILTER Generic video filter. Specify any key

(see the "OUTPUT TEMPLATE" for a list

of available keys) to match if the key

is present, !key to check if the key is

not present, key > NUMBER (like

"comment_count > 12", also works with

=, <, <=, !=, =) to compare against a

number, key = 'LITERAL' (like "uploader

= 'Mike Smith'", also works with !=) to

match against a string literal and & to

require multiple matches. Values which

are not known are excluded unless you

put a question mark (?) after the

operator. For example, to only match

videos that have been liked more than

100 times and disliked less than 50

times (or the dislike functionality is

not available at the given service),

but who also have a description, use

--match-filter "like_count > 100 &

dislike_count <? 50 & description" .

--no-playlist Download only the video, if the URL

refers to a video and a playlist.

--yes-playlist Download the playlist, if the URL

refers to a video and a playlist.

--age-limit YEARS Download only videos suitable for the

given age

--download-archive FILE Download only videos not listed in the

archive file. Record the IDs of all

downloaded videos in it.

--include-ads Download advertisements as well

(experimental)

Download Options:

-r, --limit-rate RATE Maximum download rate in bytes per

second (e.g. 50K or 4.2M)

-R, --retries RETRIES Number of retries (default is 10), or

"infinite".

--fragment-retries RETRIES Number of retries for a fragment

(default is 10), or "infinite" (DASH,

hlsnative and ISM)

--skip-unavailable-fragments Skip unavailable fragments (DASH,

hlsnative and ISM)

--abort-on-unavailable-fragment Abort downloading when some fragment is

not available

--keep-fragments Keep downloaded fragments on disk after

downloading is finished; fragments are

erased by default

--buffer-size SIZE Size of download buffer (e.g. 1024 or

16K) (default is 1024)

--no-resize-buffer Do not automatically adjust the buffer

size. By default, the buffer size is

automatically resized from an initial

value of SIZE.

--http-chunk-size SIZE Size of a chunk for chunk-based HTTP

downloading (e.g. 10485760 or 10M)

(default is disabled). May be useful

for

Truncated. Read the full README on GitHub ↗

Related tools