Skip to content

Recipes

Copy, adjust the URL, run. Each recipe is built from operations the lab verified (transcripts in brackets); where a recipe combines verified parts into a command the lab did not run as a whole, it says so.

A film, at a size that fits

yt-dlp -f "b[height<=480]" \
  -o "%(title)s [%(id)s].%(ext)s" <URL>

Best format no taller than 480p [t03, t05]. Check the -F table first — chapter 5's tale is what happens when a filter meets missing metadata.

A talk as an MP3

yt-dlp -x --audio-format mp3 --audio-quality 0 \
  -f "ba/b[height<=240]" <URL>

Take an audio format directly where the site splits formats, else extract from a small video [t09]. If it errors with an ffprobe complaint, check the source actually has sound [t08].

The subtitles, nothing else

yt-dlp --write-subs --sub-langs en \
  --skip-download <URL>

[t06] — swap en for any language from --list-subs, or all. Add --write-auto-subs to accept a site's automatic captions where no human-made track exists (documented only here).

A numbered playlist folder

yt-dlp --download-archive archive.txt \
  -o "%(playlist_title)s/%(playlist_index)02d - %(title)s.%(ext)s" \
  <playlist URL>

Assembled from verified parts [t12, t13]: the playlist walk, the padded index, and the archive that makes re-running it next month fetch only what's new.

Test any recipe without downloading

yt-dlp --simulate -f "<your selector>" \
  --print format_id --print filename <URL>

[t05] — prints the format the selector would choose and the name the template would give it. Run this first on a new site; it costs seconds and saves the wrong 2 GB.

Keep a channel caught up

# in the collection's config file:
--download-archive archive.txt
--output %(upload_date)s - %(title)s [%(id)s].%(ext)s
--format b[height<=720]/b

then one bare yt-dlp <channel URL> in that folder whenever you visit it. The config-accident chapter (9) is the warning label: the folder's config applies to every command run there — which is exactly the point here, and exactly the trap there.

Slow down for a touchy host

yt-dlp --sleep-requests 1 --retries 20 <URL>

A pause between requests and patience with retries; the lab's archive.org run needed only the retry half [t04], and its TED run needed a different downloader instead [t10, t11]. Politeness is also policy: hammering a host is how addresses earn the refusal chapter 10 describes.