Installation Guide
This chapter will introduce how to install yt-dlp on Windows, Linux, and macOS.
System Requirements
- Python: 3.7 or higher (required for some installation methods)
- FFmpeg: Used for video/audio merging and format conversion (optional but recommended)
- Network: Stable internet connection
Windows Installation
Method 1: Using winget (Recommended)
Windows 11 and Windows 10 (1809 and later) come with the winget package manager.
winget install yt-dlp
Method 2: Using Chocolatey
If you have Chocolatey installed:
choco install yt-dlp
Method 3: Using Scoop
If you use Scoop:
scoop install yt-dlp
Method 4: Downloading the Executable
- Visit the yt-dlp releases page
- Download the latest
yt-dlp.exe - Place the file in any directory (it is recommended to add it to your PATH)
Method 5: Using pip
pip install yt-dlp
Installing FFmpeg (Optional but Recommended)
# Using winget
winget install ffmpeg
# Or using Chocolatey
choco install ffmpeg
# Or using Scoop
scoop install ffmpeg
Linux Installation
Method 1: Using pip (Recommended)
pip install yt-dlp
Or using pip3:
pip3 install yt-dlp
Method 2: Using Package Manager
Ubuntu/Debian
sudo add-apt-repository ppa:tomtomtom/yt-dlp
sudo apt update
sudo apt install yt-dlp
Arch Linux
sudo pacman -S yt-dlp
Fedora
sudo dnf install yt-dlp
openSUSE
sudo zypper install yt-dlp
Method 3: Downloading the Binary
sudo curl -L 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
Installing FFmpeg (Optional but Recommended)
Ubuntu/Debian
sudo apt install ffmpeg
Arch Linux
sudo pacman -S ffmpeg
Fedora
sudo dnf install ffmpeg
macOS Installation
Method 1: Using Homebrew (Recommended)
brew install yt-dlp
Method 2: Using MacPorts
sudo port install yt-dlp
Method 3: Using pip
pip3 install yt-dlp
Method 4: Downloading the Binary
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
Installing FFmpeg (Optional but Recommended)
brew install ffmpeg
Verifying Installation
Once installed, open a terminal or command prompt and run:
yt-dlp --version
If you see a version number, the installation was successful.
Updating yt-dlp
yt-dlp is updated frequently. It is recommended to update regularly for the latest features and fixes.
Using Built-in Update Function
yt-dlp -U
Updating via Package Manager
Windows
# winget
winget upgrade yt-dlp
# Chocolatey
choco upgrade yt-dlp
# Scoop
scoop update yt-dlp
Linux
# pip
pip install -U yt-dlp
# Ubuntu/Debian
sudo apt update && sudo apt upgrade yt-dlp
# Arch Linux
sudo pacman -Syu yt-dlp
macOS
# Homebrew
brew upgrade yt-dlp
# pip
pip3 install -U yt-dlp
Dependencies
FFmpeg
FFmpeg is used for merging video and audio streams, format conversion, and more. While yt-dlp can work without FFmpeg, some features require it.
Windows
# winget
winget install ffmpeg
# Chocolatey
choco install ffmpeg
Linux
# Ubuntu/Debian
sudo apt install ffmpeg
# Arch Linux
sudo pacman -S ffmpeg
# Fedora
sudo dnf install ffmpeg
macOS
brew install ffmpeg
Other Optional Dependencies
rtmpdump
Used for downloading RTMP streams:
# Linux (Ubuntu/Debian)
sudo apt install rtmpdump
# macOS
brew install rtmpdump
phantomjs
Required by some sites:
# Linux (Ubuntu/Debian)
sudo apt install phantomjs
# macOS
brew install phantomjs
Configuration File
yt-dlp supports configuration files to store commonly used parameters.
Configuration File Locations
Windows
%APPDATA%\yt-dlp\config%APPDATA%\yt-dlp\config.txtC:\Users\<username>\yt-dlp.conf
Linux/macOS
/etc/yt-dlp/config/etc/yt-dlp.conf~/.config/yt-dlp/config~/.config/yt-dlp.conf~/.yt-dlp/config~/.yt-dlp.conf
Example Configuration
Create a configuration file and add common parameters:
# Default download path
-o ~/Downloads/%(title)s.%(ext)s
# Download best quality
-f bestvideo+bestaudio/best
# Embed thumbnail
--embed-thumbnail
# Embed subtitles
--embed-subs
# Write subtitles
--write-subs
# Proxy settings
# --proxy socks5://127.0.0.1:1080
# Limit rate (e.g., 1MB/s)
# --limit-rate 1M
Troubleshooting
Permission Errors (Linux/macOS)
If you encounter permission errors, try:
sudo chmod a+rx /usr/local/bin/yt-dlp
Python Version Issues
Ensure Python 3.7 or higher is installed:
python3 --version
Network Issues
If you cannot download, you may need to configure a proxy:
yt-dlp --proxy socks5://127.0.0.1:1080 <URL>
Command Not Found on Windows
If yt-dlp.exe is placed in a non-PATH directory:
- Add the directory to your PATH
- Or run it using the full path
macOS Security Restrictions
If you see "Developer cannot be verified" error:
xattr -d com.apple.quarantine /usr/local/bin/yt-dlp
Next Steps
Once installed, you can:
- Check Command-line Usage for basic operations
- Check Parameters Detailed for various configurations
- Check Technical Practice for real-world application scenarios
