yt-dlp is a feature-rich command-line audio and video downloader — an actively maintained fork of youtube-dl supporting thousands of sites - github ![]()
yt-dlp [OPTIONS] [--] URL [URL...]
# Install
macOS users can install yt-dlp with Homebrew:
brew install yt-dlp
It is also on PyPI (`pipx install yt-dlp`) and ships standalone binaries for Windows and Linux on the releases page
. Install ffmpeg alongside it — yt-dlp uses ffmpeg to merge separate video and audio streams and for most post-processing:
brew install ffmpeg
# Differences from youtube-dl
yt-dlp is a drop-in replacement — it accepts the youtube-dl options and format-selection syntax you already know. Because it is actively maintained it keeps pace with YouTube's changes, where youtube-dl now routinely fails or downloads at throttled speeds.
By default it downloads the best video and best audio streams and merges them, so the `-f 'bestvideo+bestaudio'` config trick documented on the youtube-dl page is no longer needed. It also adds SponsorBlock integration (`--sponsorblock-remove sponsor` cuts sponsor segments out of the file), metadata and thumbnail embedding (`--embed-metadata`, `--embed-thumbnail`), and a new format-sorting option `-S`.
Configuration lives in:
~/.config/yt-dlp/config
# Format selection
The youtube-dl `-f FORMAT` expressions still work, but the preferred approach is `-S`, which sorts all available formats by the fields you care about instead of filtering them out. DASH streams are handled transparently.
# Best mp4 video + m4a audio, falling back to best overall $ yt-dlp -f 'bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]/b' URL # Same intent via format sorting: prefer mp4/m4a $ yt-dlp -S 'ext:mp4:m4a' URL # Cap resolution at 1080p $ yt-dlp -S 'res:1080' URL # Extract audio as mp3 $ yt-dlp -x --audio-format mp3 URL # Download a playlist, numbering the files $ yt-dlp -o '%(playlist_index)s - %(title)s.%(ext)s' PLAYLIST_URL # Download only a section of a video (needs ffmpeg) $ yt-dlp --download-sections '*10:15-13:00' URL
Run `yt-dlp -F URL` to list every available format before choosing.
# See
youtube-dl · ffmpeg · DASH · webm