yt-dlp
Download videos from online platforms
TLDR
Download a video or playlist (with the default options from command below)
List the available downloadable formats for a video
Download a video or playlist using the best MP4 video available (default is "bv\*+ba/b")
Extract audio from a video (requires ffmpeg or ffprobe)
Specify audio format and audio quality of extracted audio (between 0 (best) and 10 (worst), default = 5)
Download only the second, fourth, fifth, sixth, and last items in a playlist (the first item is 1, not 0)
Download all playlists of a YouTube channel/user keeping each playlist in a separate directory
Download a Udemy course keeping each chapter in a separate directory
SYNOPSIS
yt-dlp [OPTIONS] URL [URL ...]
PARAMETERS
-h, --help
Show detailed help message and exit
--version
Show program version
-U, --update
Update yt-dlp to latest version
-v, --verbose
Increase verbosity (repeatable)
-q, --quiet
Activate quiet mode
-i, --ignore-errors
Continue downloads on errors
--abort-on-error
Abort downloading on first error
--no-warnings
Ignore warnings
-o, --output TEMPLATE
Output filename template, e.g., %(title)s.%(ext)s
-f, --format FORMAT
Video/audio format selector, e.g., bestvideo+bestaudio
-F, --list-formats
List available formats for given URL
-S, --format-sort SORT
Sort formats, e.g., res:1080
--flat-playlist
Do not extract playlist/URLs
--yes-playlist
Force download as playlist
--no-playlist
Download single video from playlist
-a, --batch-file FILE
File containing list of URLs
--cookies COOKIES.txt
Browser cookies file for auth
-r, --limit-rate RATE
Max download rate, e.g., 50K
--user-agent UA
Override User-Agent header
--referer URL
Referer URL
--add-header HEADER
Add custom HTTP header
-j, --dump-json
Print JSON info per video (no download)
--write-info-json
Write video metadata to .info.json
--write-subs
Write subtitle file
--embed-subs
Embed subtitles in video
DESCRIPTION
yt-dlp is a robust, open-source command-line tool for downloading audio and video content from YouTube and over 10,000 other websites. Forked from youtube-dl in 2021, it receives active development, supporting more extractors, formats, and features like automatic updates, sponsorblock integration, and advanced post-processing.
Core features include format selection by quality/resolution, playlist/channel downloads, subtitle extraction in multiple languages, thumbnail/metadata embedding, and conversion/merging with FFmpeg. It handles age-restricted content via cookies or accounts, rate limiting, parallel fragments, and custom output templates for organized files.
Highly configurable via files (~/.config/yt-dlp/config), it's scriptable for automation, lightweight, and cross-platform. Install via pip install -U yt-dlp or Linux repos. Regular yt-dlp -U keeps it current against site changes.
Ideal for archivists, researchers, and bulk downloaders, but respect site ToS and robots.txt.
CAVEATS
Sites may block requests; run yt-dlp -U often. Needs FFmpeg for merging/conversions. Respect ToS; no warranty on private/paywalled content.
CONFIGURATION
Default options in $XDG_CONFIG_HOME/yt-dlp/config or ~/.config/yt-dlp/config; one per line, e.g., -f bestvideo+bestaudio.
INSTALLATION
Linux: pipx install yt-dlp or distro repo. Update: yt-dlp -U.
POST-PROCESSING
Auto-invokes FFmpeg for muxing, thumbnails, metadata. Install FFmpeg separately.
HISTORY
Forked from youtube-dl in Oct 2021 amid stalled upstream development. yt-dlp team added 1000+ new extractors, SponsorBlock, ARI support. Now dominant tool with 50k+ GitHub stars, daily updates.


