Skip to main content

Your first download

Once yt-dlp is installed, downloading a video is as simple as:
yt-dlp will automatically:
  • 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:
This selects the best video with the best audio and merges them using ffmpeg.

Download audio only

To download just the audio:
The -x (or --extract-audio) option extracts audio from the video.

Download audio in specific format

To download and convert audio to MP3:
Supported audio formats: mp3, m4a, flac, opus, vorbis, wav

Download with custom output name

Specify where and how to save the file:
Common template variables:
  • %(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 all videos from a playlist:
Download only specific items from a playlist:
Download playlist with numbered filenames:
Download all uploads from a channel (including shorts and livestreams):
Or using the channel URL:
Download video with automatic English subtitles:
Download and embed subtitles in the video file:
Download all available subtitles:
Download 1080p video when available:
Download best video up to 720p:
List all available formats before downloading:
yt-dlp supports thousands of sites. Just use the video URL:
See the list of supported sites for all available extractors.
Create a text file with URLs (one per line):
urls.txt
Then download all URLs:

Essential options

1

Format selection

Control video quality and format:
Use -F to list all available formats first:
2

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
3

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.
4

Simulate and preview

Preview what would be downloaded without actually downloading:
Get video info as JSON:
Print specific fields:

Practical examples

Download music album from YouTube

This:
  • 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

This:
  • 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

Or remove sponsor segments entirely:

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:
Check version and loaded dependencies:
List all supported extractors:

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