Fix "Requested format is not available" in yt-dlp
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
Quick answer
This error is about your format selector, not about the video. yt-dlp asked for something the site does not offer and refused to guess. A selector with a fallback never produces it:
yt-dlp -f "bv*[height<=1080]+ba/b[height<=1080]/b" "URL"
Reading the selector that failed
Almost every instance of this error is one of four mistakes. Find yours:
bestvideo+bestaudio on a site that has neither
bestvideo means "a stream with video and no audio". bestaudio means
the reverse. YouTube serves both above 720p, which is why the advice is everywhere — but
Twitter, Reddit, Facebook, TikTok and most news sites serve a single combined file and nothing
else. Neither half matches, so the expression matches nothing.
The asterisk is the fix: bv* means "a stream with video, audio optional".
yt-dlp -f "bv*+ba/b" "URL"
A hardcoded format id
-f 137+140 works until you point it at a video that does not have those exact
itags — an old upload, a livestream recording, a different site entirely. Ids are not a stable
interface. Select by property instead:
yt-dlp -f "bv*[height=1080][ext=mp4]+ba[ext=m4a]/b[height<=1080]" "URL"
A filter nothing satisfies
-f "bv[height=1080][fps=60][vcodec^=avc1]" is three simultaneous conditions, and
many videos meet two of them. Every condition you add narrows the set that can match.
No fallback at all
The / separator is what turns "this or nothing" into "this, or failing that, this".
A selector without one has no second attempt.
Diagnosing it in one command
Before changing the selector, look at what is actually on offer:
yt-dlp -F "URL"
The output tells you a lot in three columns. video only and audio only
rows mean the site splits its streams and + selectors will work. Rows showing both
mean it does not, and bv* is required. If the table stops at 360p on a video you
know goes higher, this is not a selector problem at all — see
stuck at 360p.
The better tool: -S
-f states a requirement and fails when it is unmet. -S states a
preference and ranks whatever exists, so it cannot produce this error:
yt-dlp -S "res:1080,fps,codec:h264" "URL"
Read as: prefer 1080p, break ties by frame rate, then prefer H.264. Nothing here is mandatory,
so a 720p-only video downloads at 720p instead of erroring. For most real use this is the
selector people actually wanted when they wrote a complicated -f.
Common sort keys, worth knowing: res (height), fps,
codec, ext, size, br (bitrate). Prefix any
with + to reverse it — -S "+size" gets you the smallest file, which is
the fastest way to grab a preview.
Selectors worth keeping
| Goal | Selector |
|---|---|
| Best quality, any container | -f "bv*+ba/b" |
| Best that is already mp4 | -f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]/b" |
| Cap at 1080p | -f "bv*[height<=1080]+ba/b[height<=1080]/b" |
| Prefer 1080p, accept less | -S "res:1080" |
| Avoid AV1 (older hardware) | -S "vcodec:h264" |
| Smallest file | -S "+size" |
| Audio only, no re-encode | -f "ba/b" -x --audio-format best |
If it still fails
-
Even
-f berrors. Then extraction found no formats at all, and the selector was never the problem. See video unavailable or unable to extract player response. -
Works alone, fails inside a playlist. One entry in the playlist lacks the
format. Add
-ito skip it, or loosen the selector. - Works on the command line, fails in a script. Quoting. The selector is being split or expanded before yt-dlp sees it.
-
Only since you added a config file. A
-fline inyt-dlp.confapplies to every command.--ignore-configconfirms it in one run; the config guide covers precedence.
Format selection is the one yt-dlp concept worth learning properly — the full guide covers the syntax rather than just the fixes.
Frequently asked
Why does bestvideo+bestaudio fail on some sites?
Are format ids stable?
What is the difference between -f and -S?
The format is in the -F table and still says not available.
Related
- 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...
- Why yt-dlp Only Downloads 360p — and How to Get 1080p or 4K yt-dlp defaulting to 360p is a symptom, not a setting. The four causes — no ffmpeg, a PO token gate, a wrong f...
- Fix "ffmpeg not found" and "You have requested merging" in yt-dlp yt-dlp downloads video and audio separately and needs ffmpeg to join them. How to install it on each OS, why "...