youtube-dl
TLDR
Download a video
SYNOPSIS
youtube-dl [options] url [url ...]
DESCRIPTION
youtube-dl is a command-line program to download videos from YouTube and hundreds of other video platforms. It supports playlists, channels, and individual videos, with options for format selection, audio extraction, and subtitle downloading.
The output filename can be customized using templates with metadata variables. Configuration options can be stored in ~/.config/youtube-dl/config or /etc/youtube-dl.conf for persistent settings.
The tool requires Python 2.6+ or 3.2+ and works on Linux, macOS, and Windows.
PARAMETERS
-f, --format format
Video format code. Use -F to list available formats.-F, --list-formats
List all available formats for the video.-o, --output template
Output filename template with variables like %(title)s, %(ext)s.-x, --extract-audio
Extract audio track only.--audio-format format
Audio format for extraction: mp3, aac, flac, wav, etc.--audio-quality quality
Audio quality: 0 (best) to 9 (worst), or specific bitrate.-a, --batch-file file
Read URLs from a file (one per line).-c, --continue
Resume partially downloaded files.-i, --ignore-errors
Continue on errors (useful for playlists).--playlist-start num
Start playlist at video number.--playlist-end num
End playlist at video number.--write-sub
Download subtitles.--sub-lang langs
Subtitle languages to download.-j, --dump-json
Print video info as JSON without downloading.-v, --verbose
Print debug information.-h, --help
Display help message.
CAVEATS
youtube-dl development has slowed significantly. Consider using yt-dlp, an actively maintained fork with more features, better performance, and support for more sites. Some sites may block youtube-dl or require cookies/authentication for access.
HISTORY
youtube-dl was created in 2006 by Ricardo Garcia and has since become one of the most popular command-line video downloaders. The project moved to GitHub and gained widespread adoption. Due to a DMCA takedown in October 2020 (later reversed), and slow development pace, the community fork yt-dlp emerged in 2021 and has become the recommended alternative.
SEE ALSO
yt-dlp(1), ffmpeg(1), streamlink(1)


