rg3/youtube-dl

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

INSTALLATION

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

sudo curl https://yt-dl.org/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 a .exe file and place it in their home directory or any other location on their PATH.

OS X users can install youtube-dl with Homebrew.

brew install youtube-dl

You can also use pip:

sudo pip install youtube-dl

Alternatively, refer to the developer instructions below for how to check out and work with the git repository. For further options, including PGP signatures, see https://rg3.github.io/youtube-dl/download.html .

DESCRIPTION

youtube-dl is a small 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 Mac OS X. 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 and the URLs they would handle
--extractor-descriptions         Output descriptions of all supported extractors
--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)
--flat-playlist                  Do not extract the videos of a playlist, only list them.
--no-color                       Do not emit color codes in output
--proxy URL                      Use the specified HTTP/HTTPS proxy. 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 (experimental)
-4, --force-ipv4                 Make all connections via IPv4 (experimental)
-6, --force-ipv6                 Make all connections via IPv6 (experimental)
--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
                                 not present) is used for the actual downloading. (experimental)
--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 seperated 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 (experimental). Specify any key (see help for -o 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 >=,