Fix "Video unavailable" in yt-dlp
ERROR: [youtube] dQw4w9WgXcQ: Video unavailable
ERROR: [youtube] dQw4w9WgXcQ: Video unavailable. This video is not available in your country
ERROR: [youtube] dQw4w9WgXcQ: Video unavailable. This video contains content from XYZ, who has blocked it
Quick answer
Six different situations print those two words, and only some are workable. Open the URL in a browser on the same connection first — that single check splits "the video is gone" from "something about this request is wrong", and they have nothing in common:
yt-dlp --simulate -v "URL"
Which one do you have
| Situation | How to recognise it | Workable? |
|---|---|---|
| Deleted or taken down | Browser says the same thing | No |
| Private | Message mentions signing in | With access — see below |
| Geo-restricted | "not available in your country" | Sometimes |
| Age-restricted | Message mentions confirming age | Sometimes |
| Uploader-blocked | Names a rights holder | Sometimes |
| Extractor out of date | Plays fine in the browser | Yes — update |
It plays in the browser
Then the video is fine and the request is not. Update first — extractor breakage is the single most common cause of a false "unavailable":
yt-dlp -U && yt-dlp --rm-cache-dir
Still refused? Ask as a different client. Some videos are withheld from one and served to another:
yt-dlp --extractor-args "youtube:player_client=tv,web_safari" "URL"
If neither helps and the browser is signed in while yt-dlp is not, that difference is the whole explanation — see the cookies guide.
Geo-restriction
YouTube decides this from the connecting IP address, which means the flags that work elsewhere do nothing here:
yt-dlp --geo-bypass --geo-bypass-country US "URL"
--geo-bypass sends a spoofed X-Forwarded-For. Sites that trust that
header are fooled; YouTube is not. On YouTube the only thing that changes the answer is
connecting from somewhere else, which means a proxy:
yt-dlp --proxy "socks5://user:pass@host:1080" "URL"
Uploader-blocked
When the message names a rights holder, the block is per-region and applied by them. Occasionally the same content exists on another channel or another platform; there is no flag for it.
Inside a playlist
Any playlist more than a few months old contains videos that have since been deleted or made private. That is normal, and by default the first one ends the entire run:
yt-dlp -i --download-archive archive.txt "PLAYLIST_URL"
-i keeps going. The archive file means an interrupted run resumes instead of
starting over — the playlist guide covers
the pattern.
Confirming what is really happening
Metadata extraction happens before format extraction, so this often succeeds even when downloading does not — and the JSON says considerably more than the error line:
yt-dlp --dump-json "URL" | head -50
Nothing at all means the video is genuinely gone. Metadata with no formats means it exists and access is being refused, which is a different page: private video, age-restricted, or PO tokens.
If it still fails
- Every video on the site. The extractor is broken, not the videos. Update, then check the issue tracker — site-wide breakage is always already reported.
- Only livestreams. A stream that has ended but not yet been processed into a VOD is genuinely unavailable for a while. Wait.
-
Only YouTube Music links. Try the
www.youtube.comform of the URL; the Music front end sometimes reports differently for the same video. -
Only shorts. Rewrite
/shorts/IDas/watch?v=ID— they are the same video and the watch URL is better supported.
Frequently asked
How do I tell a geo-block from a deleted video?
Does --geo-bypass work on YouTube?
The video plays in a browser but yt-dlp says unavailable.
One video in my playlist kills the whole run.
Related
- Fix "Private video: Sign in if you've been granted access" in yt-dlp yt-dlp can download a private video if your account can see it — the trick is handing over the right session....
- Fix "Sign in to confirm your age" in yt-dlp Age gates changed in 2025 and most of the advice online predates it. What still works for age-restricted video...
- Fix "Unable to extract player response" in yt-dlp This one is not your fault: the site changed its page and the extractor has not caught up. How to confirm that...