A feature-rich command-line audio/video downloader
open sourceUnlicenseself-hostablefree
yt-dlp is a command-line program and Python library that downloads video and audio from YouTube and thousands of other sites, from single videos to whole playlists and channels. It is a fork of youtube-dl based on the inactive youtube-dlc, and adds format sorting, cookies from all major browsers, partial downloads by time range or chapter, splitting by chapters, multi-threaded fragment downloads, browser impersonation, SponsorBlock integration and extractor and post-processor plugins. It relies on FFmpeg to merge separate video and audio streams and for post-processing, and full YouTube support needs its yt-dlp-ejs component and a JavaScript runtime such as Deno. Standalone binaries for Windows, macOS and Linux update themselves with yt-dlp -U from stable, nightly or master channels; the code is released under the Unlicense. Self-hosted downloaders such as MeTube, Tube Archivist and Pinchflat are built on it.
Ways to install
Package managers
Problems it solves
- download a YouTube video from the terminal in the best available quality
- save just the audio of a video as MP3 or Opus with the cover art embedded
- download an entire YouTube playlist or channel with one command
- keep a download archive so a nightly cron job only fetches videos I don't have yet
- download videos from Vimeo, Twitch, TikTok, X or news sites, not just YouTube
- grab only the section of a long livestream between two timestamps
- split a video into one file per chapter as I download it
- download age-restricted or members-only videos using the cookies from my logged-in browser
- pick the best 1080p format with AV1 or VP9 instead of whatever file is biggest
- download subtitles and auto-generated captions alongside a video
- cut sponsor segments and intros out of downloaded YouTube videos
- add video downloading to my Python app without shelling out
- name downloaded files by uploader, date and title with a template
- download a livestream from the start while it's still live
- speed up HLS and DASH downloads by fetching fragments in parallel
- get a video's metadata, formats and thumbnail URLs as JSON from a script
- a single binary video downloader for Windows that updates itself
- youtube-dl stopped working for me and I need something maintained
- sites block my downloader with TLS fingerprinting and I need to impersonate a real browser
- write my own extractor for a site that isn't supported yet without forking the project
- stream a video straight into mpv or VLC from the command line
- back up the videos from my online course to watch offline
Features
- extractors for thousands of sites, listed in supportedsites.md
- format selection and sorting with -f and -S, preferring resolution and codecs over bitrate
- cookies from all major browsers with --cookies-from-browser
- partial downloads by timestamps or chapters (--download-sections)
- split videos into files by chapter (--split-chapters)
- multi-threaded fragment downloads for HLS and DASH (-N)
- browser impersonation through curl_cffi for sites that use TLS fingerprinting
- download livestreams from the start (--live-from-start)
- SponsorBlock: mark sponsor and other segments as chapters or remove them
- output templates, multiple download paths and a temporary path
View 9 more
- metadata, thumbnail and subtitle embedding and conversion through FFmpeg
- download archive to skip videos already downloaded
- extractor and post-processor plugins
- embeddable as a Python library (YoutubeDL class)
- JSON output and print templates for scripting
- configuration files and preset aliases
- self-updating standalone binaries with stable, nightly and master channels
- GPG-signed checksums for release files
- external downloaders such as aria2c and ffmpeg
Limitations
- No support for sites primarily used for copyright infringement: it follows youtube-dl's policy and rejects pull requests adding them45
- Can't download DRM-protected content: it can't support any service that serves only DRM-protected content4
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Takes plugins | plan not known |
Alternatives
The same job
These do what yt-dlp does.
- Streamlink Pipe online video streams into your own video player
