If you’ve ever wanted to download YouTube videos in high quality β including 4K, full playlists, or audio only β then yt-dlp is the tool for you. Itβs a modern fork of youtube-dl with better features, faster updates, and broader site support.
β
What is yt-dlp?
yt-dlp is a command-line program that lets you download videos, audio, or entire playlists from sites like:
- YouTube
- Vimeo
- TikTok
- Twitter (X)
- and over 1000 more
π οΈ How to Install yt-dlp
On macOS (Homebrew):
brew install yt-dlp
On Windows:
- Download the latest
yt-dlp.exefrom: yt-dlp releases - Place it in a folder, e.g.,
C:\yt-dlp\ - Add that folder to your system’s PATH
On Linux:
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
π¬ Basic Usage
Download a single video:
yt-dlp https://www.youtube.com/watch?v=dQw4w9WgXcQ
Download a playlist:
yt-dlp https://www.youtube.com/playlist?list=PLxyz123456789
Extract audio only (MP3):
yt-dlp -x --audio-format mp3 https://youtu.be/abc123
Download in 4K (if available):
yt-dlp -f "bestvideo[height=2160]+bestaudio/best" https://youtu.be/abc123
π Download Part of a Video
Download a clip between two timestamps:
yt-dlp --download-sections "*00:01:00-00:03:00" https://youtu.be/abc123
π§ Smart Features
- Resume interrupted downloads
- Skip already-downloaded files
- Download thumbnails and subtitles
- Save metadata (JSON) for each video
- Supports login and cookies for protected videos
π¦ Organize Output
Save using the video title:
yt-dlp -o "%(title)s.%(ext)s" https://youtu.be/abc123
Save in folders by channel name:
yt-dlp -o "%(uploader)s/%(title)s.%(ext)s" https://youtu.be/abc123
π§° Tips & Tricks
Download English subtitles:
--write-subs --sub-lang en
Use a proxy server:
--proxy http://127.0.0.1:8080
Set default options in a config file:
- Linux/macOS:
~/.config/yt-dlp/config - Windows:
%APPDATA%\yt-dlp\config.txt
π Helpful Resources
- GitHub repo
- Full help:
yt-dlp --help
β Final Notes
yt-dlp is powerful, fast, and flexible. Whether you’re archiving your favorite videos, grabbing audio for offline listening, or downloading only what you need β this tool can do it all.