yt-dlp --cookies-from-browser on a Mac: Safari, Chrome and Firefox
The one flag, what each Mac browser asks before it hands over its cookies, and why passing them right now can turn a working download into "The page needs to be reloaded".
The command is short:
yt-dlp --cookies-from-browser firefox "URL"
yt-dlp reads the cookies of the browser you name and sends them with its
requests, so YouTube sees your signed-in session instead of an anonymous one.
Replace firefox with safari, chrome, brave, edge, chromium,
opera, vivaldi or whale. That is the full list in yt-dlp 2026.08.19.
Arc is not on it.
Before you type it, one question: does this video need you to be signed in?
When you need it, and when you don’t
You need it for a private video shared with your account, a members-only video from a channel you pay for, an age-restricted video, and the higher-bitrate formats that come with YouTube Premium.
You don’t need it for a public video. It’s the most common fix offered for “Sign in to confirm you’re not a bot”, and it does get you past that check, but it also ties every request to your account. Downloading while signed out ties them to an IP address, which changes. Signed in, it’s an identity YouTube can act against. The yt-dlp maintainers say it plainly: using your account with yt-dlp can get it banned. More on why that matters.
And at the end of September 2026 there is a second reason, covered below: with cookies, yt-dlp currently takes a path that fails on videos that download fine without them.
Safari
yt-dlp --cookies-from-browser safari "URL"
Safari keeps its cookies in a file inside its sandbox container, and macOS
protects that folder. Run from Terminal, the command stops with an
Operation not permitted error that names Cookies.binarycookies.
The fix is to give your terminal app Full Disk Access: System Settings → Privacy & Security → Full Disk Access, turn on Terminal (or iTerm, or whatever you use), then quit and reopen it. The permission only applies to new windows.
That permission is wide. It lets anything you run in that terminal read your mail, your messages and every other app’s data. If that’s a trade you’d rather not make for one video, use Firefox below, or export a cookie file once as described in the bot-check article.
yt-dlp reads the default Safari profile. For another profile, give the path of
its cookie file after a colon: safari:/path/to/Cookies.binarycookies.
Chrome, Brave, Edge
yt-dlp --cookies-from-browser chrome "URL"
Chromium browsers on the Mac encrypt their cookies with a key kept in your
login keychain, under “Chrome Safe Storage” (or “Brave Safe Storage”, and so
on). To decrypt them, yt-dlp runs the system’s security tool, and macOS asks
for your Mac password before handing the key over.
The dialog offers Allow and Always Allow. Click Allow. Always Allow
adds security itself to the list of programs that can read that key without
asking, which means any script you run later can read your browser’s cookies
in silence. Typing your password once per download is the cheaper side of
that deal.
Not your main profile? Name it after a colon. Profiles are folders in
~/Library/Application Support/Google/Chrome/, called Default,
Profile 1, Profile 2:
yt-dlp --cookies-from-browser "chrome:Profile 1" "URL"
The browser can stay open. yt-dlp copies the cookie database before reading it.
Firefox
yt-dlp --cookies-from-browser firefox "URL"
The easiest of the three on a Mac. No keychain prompt and no Full Disk Access: Firefox stores its cookies unencrypted in your profile folder, and Terminal can already read it. yt-dlp picks the profile you used last.
If you use Multi-Account Containers, all containers are read by default. To keep only the cookies outside any container:
yt-dlp --cookies-from-browser "firefox::none" "URL"
That lack of encryption is also the thing to know about Firefox: any program running as you can read those cookies. It’s how Firefox has always worked on macOS, not something yt-dlp causes.
The error of the moment: “The page needs to be reloaded”
Since August, this is the most reported cookie problem, in issue #17389, still open on 30 September 2026:
ERROR: [youtube] XdgzEDySUS8: The page needs to be reloaded.
The same video downloads without cookies. Here is why, from the yt-dlp
2026.08.19 source. When yt-dlp sees you’re signed in, it switches to a
different set of YouTube clients: web_embedded, tv_downgraded and web.
The maintainers say tv_downgraded can’t be used reliably right now, and it’s
the one returning that error.
So, in order:
-
Try without cookies. If the video is public, that’s the fix.
-
If you need to be signed in, leave that client out. A minus sign before a client name removes it from the default list:
yt-dlp --cookies-from-browser firefox \ --extractor-args "youtube:player_client=default,-tv_downgraded" \ "URL"The maintainer’s own suggestion in the issue was
player_client=default,web_embedded. On 2026.08.19,web_embeddedis already in the signed-in defaults, so removingtv_downgradedis the part that changes something. -
If you then get “Playback on other websites has been disabled by the video owner”, that’s
web_embeddedbeing refused (#17497). The pinned answer there: retry without cookies, and if you have to stay signed in, use theweb_creatorclient.
A fix is in progress in a pull request linked from #17389. When it ships, this section is out of date and updating yt-dlp is the whole answer.
Cookies that stop working after a day
--cookies-from-browser hands yt-dlp the same session your browser is using.
YouTube rotates the cookies of an open session, and when two programs hold
different versions of it, the older one gets thrown out. Sometimes that logs
you out of YouTube in the browser too.
The yt-dlp wiki’s answer is a session only yt-dlp uses: log in inside a private window, export the cookies to a file, and close the window without logging out. The steps are in the bot-check article. Then:
yt-dlp --cookies cookies.txt "URL"
Keep that file private. Whoever has it is signed in as you.
What the app does
Nothing, on purpose. The app I build never reads your browser’s cookies, so every download is signed out. For a public video that’s what you want. For a members-only or private one, it can’t help, and the commands above are the way to do it.
The short version
| Situation | Command or fix |
|---|---|
| Public video | No cookies |
| Private, members-only, age-restricted | --cookies-from-browser firefox |
Safari: Operation not permitted |
Full Disk Access for your terminal |
| Chrome: keychain dialog | Allow, not Always Allow |
| Another Chrome profile | "chrome:Profile 1" |
The page needs to be reloaded |
Drop cookies, or player_client=default,-tv_downgraded |
| Signed out of YouTube after downloading | Private-window cookie file, --cookies cookies.txt |