yt-dlp: The Downloader That Ate the Internet — A Field Guide
Every downloader you have ever clicked has been a worse version of this command-line tool. yt-dlp grabs from over a thousand sites, skips sponsors automatically, and archives entire channels unattended — here's the operator's playbook.
YouTube's web player is a thousand moving parts: adaptive streaming, signature ciphers, throttling tricks, player JS that changes under your feet. Browser extensions that "just download the video" are locked in a permanent arms race with those moving parts, and the extensions lose most rounds. Meanwhile one command-line tool quietly handles the whole mess — and most of the rest of the internet's video too.
yt-dlp is the community fork of youtube-dl, with 1,700+ site extractors at last count. It downloads videos, audio, subtitles, thumbnails, playlists, and entire channels. The honest pitch isn't convenience — it's control. You decide the exact codec, resolution, and container; you keep a permanent local archive. Here's how to use it like an operator instead of a tourist.
Install it the way that survives YouTube's churn
This is the single most important section of this guide. Media sites change their players constantly — a month-old yt-dlp build will fail on a YouTube page that a fresh one handles fine. Your distro's package manager usually ships a stale build, so don't use it for this one tool.
# Official static binary — updates in place, no distro lag
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \
-o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
# ffmpeg is the other half of the stack: merging, converting, embedding
sudo apt install ffmpeg # or your distro's equivalent
Then make freshness automatic. Add yt-dlp -U to a monthly cron job, or run -U before any big archiving session. The nightly builds track fixes within hours, but stable is fine for 95% of people as long as it's recent.
yt-dlp -U # self-update; run this before anything serious
The five commands that cover 95% of daily use
The default behavior is already the best in the business: yt-dlp picks the highest-resolution video stream and the best audio stream and merges them with ffmpeg automatically. You rarely need to think about it.
# 1. A single video — best quality, merged, done
yt-dlp "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# 2. Audio only, as MP3 — the podcast/concert workflow
yt-dlp -x --audio-format mp3 --audio-quality 0 <url>
# 3. A whole playlist, in upload order
yt-dlp --yes-playlist "https://www.youtube.com/playlist?list=..."
# 4. Your own Watch Later / favorites (needs cookies — see below)
yt-dlp --cookies-from-browser firefox ":ytwatchlater"
# 5. Save a timestamp clip, not the whole video
yt-dlp --download-sections "*00:10:00-00:12:30" --force-keyframes-at-cuts <url>
Format selection: stop re-downloading by accident
Run -F on any video and you get the format table: resolution, codec, bitrate, file size, protocol. Once you know what you're looking at, pin your preference in the config file so every download obeys it forever:
# ~/.config/yt-dlp/config — your standing orders
-f "bv*[height<=1080]+ba/b"
--embed-subs --sub-langs "en.*"
--embed-chapters
--embed-metadata
--sponsorblock-remove "sponsor,selfpromo"
-o "%(uploader)s/%(upload_date)s - %(title)s [%(id)s].%(ext)s"
That one file turns every invocation into: max 1080p, English subtitles embedded, chapters and metadata embedded, sponsor segments and self-promos cut out, and files organized in tidy per-uploader folders. The format selector bv*[height<=1080]+ba/b means "best video under 1080p plus best audio, falling back to the single best combined stream" — the fallback matters on sites that only offer progressive downloads.
Note the quotes around the format string: it's a filter expression, and your shell will mangle the brackets and asterisks if you leave it unquoted. This is the most common first-day bug.
SponsorBlock: the feature that ruins every other downloader
SponsorBlock is crowd-sourced timestamps for sponsor segments, intros, outros, self-promos, and interaction reminders. yt-dlp queries its API before downloading and either marks or removes the flagged segments. The difference in practice is absurd: a 22-minute video with a 90-second sponsor read and a two-minute intro comes down to 18 minutes of actual content, with no re-encode and no quality loss, because the cuts happen on keyframe boundaries at download time.
--sponsorblock-remove takes a comma list: sponsor, intro, outro, selfpromo, interaction, preview, music_offtopic. Be conservative — music_offtopic is handy for skipping non-music segments in music videos, but on some channels it nukes interludes you might actually want. And treat it as advisory on channels you care about: crowd-sourced data occasionally mislabels a segment, so the first cut of an archived video deserves a spot-check.
The "sign in to confirm you're not a bot" problem
Google now aggressively rate-limits and bot-checks anonymous requests, so you'll eventually hit errors like "Sign in to confirm you're not a bot" or downloads crawling at 50 KB/s. The pragmatic fix: hand yt-dlp your logged-in browser session.
yt-dlp --cookies-from-browser firefox <url>
This reads cookies straight from your Firefox (or chrome, brave, edge) profile — no exporting, no stale text files. The gotcha: your browser must be closed or at least not holding the cookie database locked when yt-dlp reads it, and on some setups the read needs your keyring unlocked. If cookies keep failing, the durable alternative is exporting once with a browser extension and pointing --cookies cookies.txt at that file, refreshing it monthly.
Two more levers for throttled connections: --concurrent-fragments 5 (parallel segment downloads for DASH/HLS streams) and -r 5M (rate limit — useful when you're archiving overnight and don't want to saturate your own link or get flagged).
Archive a channel like a librarian, not a hoarder
One-off downloads are easy. The real power move is a standing archive: every new upload from your favorite channels, fetched automatically, deduplicated forever.
# ~/bin/archive-channels.sh
#!/bin/bash
ARCHIVE="$HOME/media/yt-dlp-archive.txt"
for channel in \
"https://www.youtube.com/@SomeChannel/videos" \
"https://www.youtube.com/@AnotherChannel/videos"; do
yt-dlp \
--download-archive "$ARCHIVE" \
--dateafter 20260101 \
--match-filter "!is_live & duration > 120" \
"$channel"
done
Three quiet workhorses here:
--download-archive: a plain text file of video IDs already downloaded. Re-running skips them. This is the entire difference between "a one-time grab" and "an unattended archive" — never re-downloads, never re-checks.--dateafter: only fetch videos newer than a date. Combine with the archive file and your cron job stays incremental forever.--match-filter: skip livestreams and shorts (duration > 120filters most shorts and clips) — the single biggest quality-of-life tweak for channel archives.
Put that script on a weekly systemd timer or cron job, point a media server at the output folder, and you have a personal, ad-free, sponsor-free copy of the channels you actually care about — immune to takedowns, re-uploads, and algorithmic decay.
Troubleshooting like you've done this before
ERROR: unable to download video data: HTTP Error 403— almost always stale build or missing cookies. Update (yt-dlp -U), then retry with--cookies-from-browser.- Downloads stuck at 50–100 KB/s — YouTube's throttling on anonymous requests. Cookies first;
--concurrent-fragmentssecond. - "Requested format is not available" — your
-fselector is too strict for this site. Loosen it (drop theheightfilter) or run-Fto see what actually exists. - age-restricted videos — require an authenticated session.
--cookies-from-browserwith a logged-in profile, no way around it. - A site that worked yesterday broke today — update first, ask questions later. Extractor fixes land constantly; the issue tracker is only useful after you've confirmed the latest build still fails.
The honest limits
yt-dlp downloads what's publicly streamable (or accessible with your own credentials) — it's not a DRM cracker, and Widevine-protected streams will hand you an error, not a video. Don't use it to redistribute other people's work. And keep the updates flowing: this is one tool where "installed it once in 2023" is a bug report waiting to happen.
The pitch is simple. Browsers show you the video. yt-dlp gives you the file — in your format, at your quality, without the sponsor reads, filed away in your own library. That's a better deal than any extension ever offered.
Sources
- yt-dlp official repository and README — https://github.com/yt-dlp/yt-dlp
- yt-dlp FAQ and usage documentation — https://github.com/yt-dlp/yt-dlp#usage-and-options
- SponsorBlock project — https://sponsor.ajay.app
- Debian yt-dlp package tracker — https://tracker.debian.org/pkg/yt-dlp
Reader feedback
Was this article helpful?
0 people found this article helpful.
