yt-dlp Cheat-sheet
A practical yt-dlp cheat sheet based on the official yt-dlp README Usage and Options section (syntax, option names, and behavior). The CLI syntax is yt-dlp [OPTIONS] [--] URL [URL...].
Core command shape
yt-dlp [OPTIONS] URL
yt-dlp [OPTIONS] URL1 URL2 URL3
--separates options from URLs if needed.
Most useful “daily use” commands
1) Download best default
yt-dlp "URL"
2) List formats first (inspect before choosing)
yt-dlp -F "URL"
-F, --list-formatslists available formats.
3) Pick a specific format / format selector
yt-dlp -f "FORMAT" "URL"
-f, --format FORMATchooses format selector expression.
4) Save with custom filename
yt-dlp -o "%(title)s [%(id)s].%(ext)s" "URL"
-o, --output [TYPES:]TEMPLATEsets output template.
5) Extract audio (mp3, m4a, opus, etc.)
yt-dlp -x --audio-format mp3 "URL"
-xconverts to audio-only (requiresffmpegandffprobe).
6) Download subtitles
yt-dlp --write-subs --sub-langs "en.*" "URL"
--write-subs,--sub-langs,--list-subs, and--write-auto-subsare supported.
7) Print metadata / inspect without download
yt-dlp -O "%(title)s | %(uploader)s | %(duration)s" "URL"
yt-dlp -j "URL"
-O/--printprints fields/templates and implies quiet/simulate in many cases.-jdumps JSON.
High-value options by category
General
yt-dlp -h
yt-dlp --version
yt-dlp -U
yt-dlp -i "URL"
-h, --helphelp text--versionversion-U, --updateupdate-i, --ignore-errorskeep going on download/postprocessing errors
Playlist control
yt-dlp -I "1,3,5-10" "PLAYLIST_URL"
-I, --playlist-items ITEM_SPECsupports comma-separated indices and ranges ([START]:[STOP][:STEP], negative indices too).
Output & paths (very handy)
yt-dlp -P "/downloads" -o "%(uploader)s/%(title)s.%(ext)s" "URL"
yt-dlp -P "temp:/tmp/yt" -P "subtitle:subs" --write-subs "URL"
-P, --paths [TYPES:]PATHsets download paths (supportshome,temp, and type-specific paths like subtitles).-osupports type-specific templates likesubtitle:....
Default filename template (if you do nothing):
%(title)s [%(id)s].%(ext)s
Format selection & sorting (important)
yt-dlp -F "URL"
yt-dlp -f "bestvideo+bestaudio/best" "URL"
yt-dlp -S "res,fps,codec" "URL"
-fchooses format selector expression.-S, --format-sortsorts candidate formats before selecting.- yt-dlp notes that
worstis often not what people actually want; size-based sorting can be better in many cases.
Download performance / reliability
yt-dlp -N 4 -R infinite --fragment-retries infinite "URL"
yt-dlp -r 2M "URL"
-N, --concurrent-fragments Nparallel fragment downloads (HLS/DASH/native fragments)-r, --limit-rate RATE-R, --retries RETRIES--fragment-retries RETRIES
Simulation / dry-run / debugging
yt-dlp -s "URL"
yt-dlp -q "URL"
yt-dlp --no-warnings "URL"
-s, --simulateno download / no writes-q, --quiet--no-warnings
Cookies / auth (common for restricted content)
yt-dlp --cookies cookies.txt "URL"
yt-dlp --cookies-from-browser firefox "URL"
yt-dlp --cookies-from-browser chrome "URL"
--cookies FILEuses Netscape cookie file--cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER]supports browsers like Chrome/Firefox/Edge/etc., with Linux keyring options for Chromium cookie decryption.
Network / proxy / region-related
yt-dlp --proxy "socks5://127.0.0.1:1080" "URL"
yt-dlp --geo-verification-proxy "http://..." "URL"
--proxy URLsupports HTTP/HTTPS/SOCKS; empty string disables proxy (--proxy "").--geo-verification-proxy URLis separate for geo-checking on some sites.--xff VALUEcan fakeX-Forwarded-Forin supported scenarios.
Subtitles
yt-dlp --list-subs "URL"
yt-dlp --write-subs --sub-langs "en,es" "URL"
yt-dlp --write-auto-subs --sub-langs "en.*" "URL"
yt-dlp --sub-format "srt/best" --write-subs "URL"
--write-subs,--write-auto-subs,--list-subs,--sub-format,--sub-langsare all in the Video Format/Subtitles options area.
Audio extraction / conversion
yt-dlp -x --audio-format m4a "URL"
yt-dlp -x --audio-format mp3 --audio-quality 0 "URL"
-xextracts audio and converts via ffmpeg/ffprobe.--audio-formatsupportsbest,aac,alac,flac,m4a,mp3,opus,vorbis,wav.
Metadata / thumbnails / embedding
yt-dlp --write-thumbnail "URL"
yt-dlp --embed-thumbnail "URL"
yt-dlp --embed-metadata --embed-chapters "URL"
--embed-thumbnailembeds cover art--embed-metadataembeds metadata (and chapters/infojson unless disabled)--embed-chapters,--embed-info-jsonavailable too
Partial download / chapters / sections
yt-dlp --download-sections "*00:30-01:45" "URL"
yt-dlp --download-sections "intro" "URL"
--download-sections REGEXcan match chapter names or use*time-ranges (ffmpeg needed). Supports multiple uses.
Batch mode (multiple URLs from file)
yt-dlp -a urls.txt
cat urls.txt | yt-dlp -a -
-a, --batch-file FILEreads URLs (supports-for stdin; comment lines are ignored).
Output template mini-reference (the one you actually need)
-o "%(title)s.%(ext)s"
-o "%(uploader)s/%(title)s [%(id)s].%(ext)s"
-o "%(upload_date>%Y)s/%(title)s.%(ext)s"
-o -
What these do:
%(field)sinserts metadata field%(upload_date>%Y)sapplies date formatting to a field-o -outputs media to stdout%literal becomes%%in templates- hierarchical paths are allowed and directories are auto-created
Handy “inspect first” workflow (recommended)
yt-dlp -j "URL" > info.json
yt-dlp -F "URL"
yt-dlp -O "%(title)s [%(id)s].%(ext)s" "URL"
Why:
-jshows available metadata keys-Fshows formats-Otests output template before downloading
Config file tip (for recurring defaults)
yt-dlp supports configuration files and options like --ignore-config, --config-locations, and documents standard config locations in the README’s configuration section.
Example idea (not exact file path recommendation here):
- Put your common defaults (
-x,--proxy,-o, etc.) into a config file so you don’t retype them. The README includes an example config snippet.
Copy/paste starter presets
Clean video download with readable filenames
yt-dlp --restrict-filenames -o "%(uploader)s/%(title)s [%(id)s].%(ext)s" "URL"
--restrict-filenameshelps avoid problematic characters; README explicitly notes this use case.
Best audio + embedded metadata + thumbnail
yt-dlp -x --audio-format m4a --embed-metadata --embed-thumbnail "URL"
- Uses audio extraction and metadata/thumbnail embedding options from the official usage docs.
Use thumbnail as a separate file (skip embedding)
yt-dlp -x --audio-format m4a --embed-metadata --write-thumbnail "URL"
- Writes thumbnail as a separate file (sometimes
--embed-thumbnailfails)
Playlist subset only
yt-dlp -I "1:10" "PLAYLIST_URL"
- Downloads only a slice of playlist items.