yt-dlp cheat sheet
The commands worth keeping, grouped by task. Every one tested against yt-dlp 2026.07.28. Copy buttons on all of them, and the builder if you would rather click than type.
The one to remember
Best quality the site offers, merged into an mp4 that plays everywhere, tagged, named after the video. If you take one command away from this page, this is it.
yt-dlp -f "bv*+ba/b" --merge-output-format mp4 --embed-metadata --embed-thumbnail -o "%(title)s.%(ext)s" "URL"
Quality
yt-dlp -F "URL"
yt-dlp -f "bv*[height<=1080]+ba/b[height<=1080]/b" "URL"
yt-dlp -S "res:2160" "URL"
yt-dlp -S "res:1080,vcodec:h264,acodec:m4a" --merge-output-format mp4 "URL"
yt-dlp -S "+size" "URL"
Format selection covers the syntax; if a download comes out at 360p, this page narrows it to one of four causes in a single command.
Audio
yt-dlp -x --audio-format m4a --embed-thumbnail --embed-metadata "URL"
yt-dlp -x --audio-format mp3 --audio-quality 0 --embed-thumbnail --embed-metadata "URL"
yt-dlp -x --audio-format m4a --embed-thumbnail --embed-metadata \
-o "%(artist,uploader)s/%(album,playlist)s/%(track,title)s.%(ext)s" "URL"
Playlists and channels
yt-dlp --no-playlist "URL"
yt-dlp --download-archive archive.txt -i \
-o "%(playlist)s/%(playlist_index)02d - %(title)s.%(ext)s" "PLAYLIST_URL"
yt-dlp -I 5-20 "PLAYLIST_URL"
yt-dlp --download-archive archive.txt --sleep-requests 2 --limit-rate 4M -i \
-o "%(uploader)s/%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s" \
"https://www.youtube.com/@channel/videos"
yt-dlp --flat-playlist --print "%(title)s" "CHANNEL_URL" | wc -l
Subtitles
yt-dlp --list-subs "URL"
yt-dlp --write-subs --write-auto-subs --sub-langs "en.*" --embed-subs --merge-output-format mkv "URL"
yt-dlp --write-subs --write-auto-subs --sub-langs "en.*" --convert-subs srt "URL"
yt-dlp --skip-download --write-auto-subs --sub-langs "en.*" --convert-subs srt "URL"
SponsorBlock
yt-dlp --sponsorblock-mark all --embed-chapters "URL"
yt-dlp --sponsorblock-remove "sponsor,selfpromo,interaction" "URL"
Signing in
yt-dlp --cookies-from-browser firefox "URL"
yt-dlp --cookies cookies.txt "URL"
yt-dlp --extractor-args "youtube:player_client=tv" "URL"
Naming and folders
yt-dlp -o "%(uploader)s/%(title)s [%(id)s].%(ext)s" "URL"
yt-dlp -o "%(uploader)s/%(upload_date>%Y)s/%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s" "URL"
yt-dlp --restrict-filenames --trim-filenames 120 "URL"
yt-dlp --simulate --print filename -o "YOUR TEMPLATE" "PLAYLIST_URL"
When it is slow or blocked
yt-dlp --sleep-requests 2 --sleep-interval 5 --max-sleep-interval 15 --limit-rate 2M -i "URL"
yt-dlp -N 4 "URL"
yt-dlp -U && yt-dlp --rm-cache-dir
Diagnostics
yt-dlp --simulate -v "URL"
yt-dlp --simulate --print "%(format_id)s %(height)sp %(vcodec)s %(filesize_approx)s" "URL"
yt-dlp --dump-json "URL"
yt-dlp --ignore-config "URL"
yt-dlp -vU "URL" 2>&1 | tee report.txt
Updating
yt-dlp --version
yt-dlp -U
yt-dlp --update-to nightly
yt-dlp --update-to stable
-U only works on the standalone binary. A pip or package-manager install has to be
updated the same way it was installed —
which decides how fast fixes reach you.
A config file worth having
Everything above that you would otherwise retype. Windows:
%APPDATA%\yt-dlp\config.txt. Elsewhere: ~/.config/yt-dlp/config. No
quotes in this file — it is not parsed by a shell.
-S res:1080,vcodec:h264,acodec:m4a
--merge-output-format mp4
-o %(uploader)s/%(title)s [%(id)s].%(ext)s
--restrict-filenames
--embed-metadata
--embed-thumbnail
--embed-chapters
--no-playlist
--sleep-requests 1.5
-i
The config guide covers load order and the lines worth thinking twice about.
Frequently asked
Why is -f best not on this page?
Do these work on sites other than YouTube?
Can I run these on Windows as written?
Related
- yt-dlp command builder Pick quality, format, subtitles, cookies and output naming; get a working yt-dlp command you can copy. Runs en...
- yt-dlp Format Selection: -f, -S and Getting Exactly What You Want Format selection is the one yt-dlp concept worth learning properly — it decides resolution, codec, file size a...
- yt-dlp flag reference Every yt-dlp command-line option in one searchable table, grouped by what it does, with the ones worth knowing...