yt-dlp is one of those tools I use often enough to need it, but not often enough to remember every option.
It is a command-line tool for downloading video, audio, subtitles, thumbnails, and other media from YouTube and many other sites. The official documentation is extensive, so this is the smaller reference I actually want when I need to download something without figuring the command out again.
This page is based on the official yt-dlp documentation and was last checked against it on 15 September 2026.
Before troubleshooting
Check the installed version:
yt-dlp --version
Official release binaries can update themselves with:
yt-dlp -U
If yt-dlp was installed through pip or a package manager, update it through the same installation method instead.
yt-dlp currently recommends its nightly channel for regular users because supported sites can change between stable releases. If an up-to-date stable release suddenly stops working, trying nightly is therefore a reasonable first troubleshooting step:
yt-dlp --update-to nightly
For full YouTube support, current yt-dlp also uses yt-dlp-ejs with a JavaScript runtime. Deno is the recommended runtime.
ffmpeg and ffprobe are also worth having installed. They are needed for things such as merging separate video and audio streams, extracting audio, and downloading sections of a video.
Download video
For most downloads, start with:
yt-dlp "URL"
yt-dlp already selects the best available format by default.
To see what formats are available:
yt-dlp -F "URL"
Then download a specific format by its ID:
yt-dlp -f "FORMAT" "URL"
The current default format selection is effectively:
bv*+ba/b
It prefers the best video-containing format and adds the best separate audio stream when needed, falling back to the best combined format.
Most of the time I do not need to specify this manually.
Extract audio
Extract audio as M4A:
yt-dlp -x --audio-format m4a "URL"
Or MP3:
yt-dlp -x --audio-format mp3 "URL"
-x extracts the audio and uses ffmpeg / ffprobe for conversion when necessary.
Filenames
Set the output filename with -o:
yt-dlp -o "%(title)s [%(id)s].%(ext)s" "URL"
Useful fields include:
%(title)s
%(uploader)s
%(id)s
%(ext)s
They can also be used to create directories:
yt-dlp -o "%(uploader)s/%(title)s [%(id)s].%(ext)s" "URL"
yt-dlp creates the required directories automatically.
I normally run yt-dlp from the directory where I want the download, so I generally do not need separate path configuration.
Subtitles
See which subtitles are available:
yt-dlp --list-subs "URL"
Download English subtitles:
yt-dlp --write-subs --sub-langs "en.*" "URL"
Download specific languages:
yt-dlp --write-subs --sub-langs "en,es" "URL"
For automatically generated subtitles:
yt-dlp --write-auto-subs --sub-langs "en.*" "URL"
Playlists
A playlist URL can be downloaded normally:
yt-dlp "PLAYLIST_URL"
To download only part of it:
yt-dlp -I "1:10" "PLAYLIST_URL"
Or selected entries:
yt-dlp -I "1,3,5:10" "PLAYLIST_URL"
-I / --playlist-items accepts individual positions and ranges.
Download part of a video
Download only a time range:
yt-dlp --download-sections "*00:30-01:45" "URL"
The * tells yt-dlp that the value is a time range.
If the video contains chapters, a chapter can also be selected by matching its title:
yt-dlp --download-sections "intro" "URL"
--download-sections requires ffmpeg.
Thumbnails and metadata
Save the thumbnail as a separate file:
yt-dlp --write-thumbnail "URL"
Embed it into the downloaded media:
yt-dlp --embed-thumbnail "URL"
Embed available metadata as well:
yt-dlp --embed-metadata "URL"
For audio, I often want all three operations together:
yt-dlp \
-x \
--audio-format m4a \
--embed-metadata \
--embed-thumbnail \
"URL"
When a site requires authentication
I have not needed this often, but it is worth keeping here because the failure is otherwise easy to misdiagnose.
Some content requires an authenticated browser session—for example age-restricted videos, private playlists, members-only content, or cases where a site asks you to sign in or solve a CAPTCHA.
yt-dlp can read the cookies from a browser session:
yt-dlp --cookies-from-browser firefox "URL"
Or, for Chrome:
yt-dlp --cookies-from-browser chrome "URL"
Cookies are credentials, so they should be treated accordingly.
For YouTube specifically, the yt-dlp project recommends using account cookies only when necessary because automated access can result in restrictions on the account.
Scope
This is deliberately not a complete yt-dlp reference.
It covers the commands I actually use or am likely to need again: downloading video and audio, choosing formats, naming files, handling subtitles and playlists, downloading sections, working with thumbnails, and getting past authentication when necessary.
For anything more specialized, the official yt-dlp README and wiki remain the source of truth.