Quick Answer
- yt-dlp is the best command-line tool for downloading YouTube videos and audio files.
- You can download videos from over 1,000 sites. This includes YouTube, Vimeo, and SoundCloud.
- Always pair yt-dlp with ffmpeg for the best experience and format conversion capabilities.
This guide shows how to install on Linux, macOS, and Windows.
Complete yt-dlp Guide: Setup and Essential Parameters for Beginners
Want to download YouTube videos for offline viewing? yt-dlp is your best friend.
This powerful command-line tool lets you:
- Manage whole playlists
- Grab videos
- Extract audio
What Is yt-dlp?
yt-dlp is a free and open-source tool. It lets you download videos from YouTube and many other sites. It’s a newer version of the old youtube-dl tool. It has better features, faster updates, and more reliable downloads. Think of it as your personal video librarian.
Unlike sketchy browser extensions or ad-filled sites, yt-dlp values your privacy. It lets you fully control your downloads.
Installing yt-dlp: Step-by-Step for Every System
Windows Installation (Easiest Method)
Method 1: Simple Download
- Go to the yt-dlp GitHub releases page
- Download
yt-dlp.exe
(about 30MB) - Create a folder like
C:\ytdl
and put the file there - Open Command Prompt and navigate to that folder:
cd C:\ytdl
Method 2: Using Package Managers
If you have Chocolatey or Scoop installed:
choco install yt-dlp
or
scoop install yt-dlp
Mac Installation
Using Homebrew (Recommended):
- Install Homebrew if you haven’t:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install yt-dlp:
brew install yt-dlp
- Install ffmpeg for format conversion:
brew install ffmpeg
Linux Installation
Using pip (Works on all distributions):
python3 -m pip install -U yt-dlp
Using package managers:
- Ubuntu/Debian:
sudo apt install yt-dlp
- Fedora:
sudo dnf install yt-dlp
- Arch Linux:
sudo pacman -S yt-dlp
Manual installation:
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
Essential yt-dlp Parameters You’ll Actually Use
Once installed, these parameters will handle 90% of your download needs:
Basic Downloads
# Download a video
yt-dlp "https://youtube.com/watch?v=VIDEO_ID"
# Download best quality available
yt-dlp -f "bestvideo+bestaudio" "URL"
Audio-Only Downloads
# Extract MP3 audio
yt-dlp -x --audio-format mp3 "URL"
# Best audio quality
yt-dlp -x --audio-format m4a --audio-quality 0 "URL"
Format and Quality Control
# List available formats first
yt-dlp -F "URL"
# Download specific format (replace 137 with desired format ID)
yt-dlp -f 137 "URL"
# Limit to 720p maximum
yt-dlp -f "bv*[height<=720]+ba" "URL"
File Organization
# Custom filename template
yt-dlp -o "%(title)s.%(ext)s" "URL"
# Save to specific folder
yt-dlp -o "~/Downloads/%(title)s.%(ext)s" "URL"
# Include upload date in filename
yt-dlp -o "%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s" "URL"
Playlist Management
# Download entire playlist
yt-dlp "https://youtube.com/playlist?list=PLAYLIST_ID"
# Download specific videos from playlist
yt-dlp --playlist-items 1,3,5-10 "PLAYLIST_URL"
# Reverse playlist order
yt-dlp --playlist-reverse "PLAYLIST_URL"
Advanced Options
# Add subtitles
yt-dlp --write-subs --sub-langs en "URL"
# Download thumbnail
yt-dlp --write-thumbnail "URL"
# Limit download speed
yt-dlp -r 500K "URL"
# Use proxy for privacy
yt-dlp --proxy socks5://127.0.0.1:1080 "URL"
Pro Tips for Better Downloads
Set up a configuration file to avoid typing the same parameters repeatedly:
- Windows: Create
%APPDATA%\yt-dlp\config.txt
- Mac/Linux: Create
~/.config/yt-dlp/config
Example config contents:
-f bestvideo+bestaudio
--write-thumbnail
--embed-metadata
-o ~/Downloads/%(title)s.%(ext)s
Always install ffmpeg alongside yt-dlp—it’s required for merging video and audio streams, format conversion, and many advanced features[2][3].
Keep it updated regularly:
- Binary:
yt-dlp -U
- Pip:
python3 -m pip install -U yt-dlp
- Homebrew:
brew upgrade yt-dlp
Privacy and Safety Considerations
- Use a VPN like Proton or PIA when downloading content, especially on public networks
- Only download content you’re legally allowed to access
- Avoid third-party sites offering “modified” versions—stick to official sources
Troubleshooting Common Issues
- “Command not found” errors: Check if yt-dlp is in your system’s PATH. If not, go to the folder with the executable.
- Format merge failures: Install ffmpeg—it’s essential for combining video and audio streams.
- Slow downloads: Use -r to limit speed if needed, or check if your internet connection is the bottleneck.
- Playlist errors: Some playlists are private or region-locked. Try individual video URLs instead.