Your first download
Once yt-dlp is installed, downloading a video is as simple as:- Select the best quality video and audio
- Merge them into a single file
- Save to your current directory
The URL should be in quotes to avoid issues with special characters in your shell.
Basic usage patterns
Download best quality
By default, yt-dlp downloads the best quality available:Download audio only
To download just the audio:-x (or --extract-audio) option extracts audio from the video.
Download audio in specific format
To download and convert audio to MP3:mp3, m4a, flac, opus, vorbis, wav
Download with custom output name
Specify where and how to save the file:%(title)s- Video title%(id)s- Video ID%(ext)s- File extension%(uploader)s- Channel name%(upload_date)s- Upload date (YYYYMMDD)
Common use cases
Download a playlist
Download a playlist
Download all videos from a playlist:Download only specific items from a playlist:Download playlist with numbered filenames:
Download entire YouTube channel
Download entire YouTube channel
Download all uploads from a channel (including shorts and livestreams):Or using the channel URL:
Download with subtitles
Download with subtitles
Download video with automatic English subtitles:Download and embed subtitles in the video file:Download all available subtitles:
Download specific quality
Download specific quality
Download 1080p video when available:Download best video up to 720p:List all available formats before downloading:
Download from multiple sites
Download from multiple sites
yt-dlp supports thousands of sites. Just use the video URL:See the list of supported sites for all available extractors.
Batch download from file
Batch download from file
Create a text file with URLs (one per line):Then download all URLs:
urls.txt
Essential options
Output template
Customize the output filename and location:Common patterns:
%(title)s- Video title%(uploader)s- Channel/uploader name%(upload_date>%Y-%m-%d)s- Formatted date%(playlist_index)s- Position in playlist%(id)s- Video ID
Download archive
Avoid re-downloading videos you already have:This creates/updates
downloaded.txt with IDs of downloaded videos. On subsequent runs, videos already in the archive are skipped.Practical examples
Download music album from YouTube
- Extracts audio only (
-x) - Converts to MP3 (
--audio-format mp3) - Organizes by playlist with numbering
- Embeds album art (
--embed-thumbnail) - Adds ID3 tags (
--add-metadata)
Download video lecture series
- Limits quality to 720p (smaller file size)
- Numbers lectures sequentially
- Downloads and embeds English subtitles
- Tracks downloaded videos to avoid duplicates
Download with SponsorBlock integration
Download livestream from the start
This feature is experimental and currently only supports YouTube, Twitch, and TVer.
Tips and tricks
Rate limiting
Limit download speed to avoid throttling:
-r 50K limits to 50 KB/s. Use M for MB/s.Geo-restriction bypass
Use a proxy for geo-restricted content:
Cookies from browser
Download videos requiring login:Supported browsers: chrome, firefox, safari, edge, opera, brave
Thumbnail embedding
Embed video thumbnail as cover art:
Getting help
View all available options:Next steps
Format selection
Learn advanced format selection and sorting
Output templates
Master powerful output template syntax
Configuration files
Set up default options in config files
Post-processing
Convert, merge, and modify downloaded videos