Troubleshooting guide
How to use cookies with yt-dlp
If yt-dlp can find a page but fails on the actual media, cookies are often the missing piece. In plain English: you are letting yt-dlp reuse the signed-in session from your browser so it can access content that is not available to an anonymous request.
Quick answer
Start with browser extraction. It is the fastest and cleanest option when you are already logged in.
yt-dlp --cookies-from-browser chrome "URL"Replace chrome with the browser you actually use, like firefox, edge, orbrave when supported.
When cookies are needed
- • the site says sign in is required
- • the media is age-gated or region-gated
- • private or semi-private content works in your browser but not in yt-dlp
- • the extractor says cookies are required or the request returns 403/401 style failures
If the page truly requires a logged-in session, updating yt-dlp alone will not fix it. You need to pass session state in a way yt-dlp can use.
Use browser cookies first
yt-dlp --cookies-from-browser chrome "URL"
yt-dlp --cookies-from-browser firefox "URL"This is usually better than exporting a file manually because it avoids one more stale artifact in your workflow. If it works, use it and move on.
Use a cookies.txt file when browser extraction fails
yt-dlp --cookies cookies.txt "URL"This is useful when browser-keychain access fails, when you need a repeatable scriptable setup, or when you are troubleshooting a difficult auth problem. Just remember that exported cookies can expire quickly.
Most common cookie failures
- • wrong browser selected
- • wrong browser profile selected
- • expired login session
- • the OS keychain blocks yt-dlp from reading cookies
- • the site requires more than a simple signed-in session
The fast debugging move is simple: confirm the content plays in the browser you are extracting from, then rerun the command with that browser explicitly.
What not to do
- • do not assume old exported cookies will keep working forever
- • do not guess the browser name or profile
- • do not keep retrying broken commands without verifying the browser session still works
- • do not use cookies for content you are not authorized to access
Next step
Repeating this workflow often?
ytdlp.org is for getting yt-dlp working. When your process becomes repeatable, Importly is the better fit for turning scattered commands into something more organized and reusable.