- Test yt-dlp separately to isolate authentication failures from mpv playback problems.
- Pass browser cookies safely for supported, authenticated, non-DRM streaming sites.
- Use clean commands and logs to identify config, network, or extractor conflicts.
- Confirm the Symptom With a Minimal Clean mpv Command
- Check yt-dlp and Authentication Directly
- Check Configuration, Profiles, Scripts, and URL Handling
- Check Permissions, Network Access, and Account Restrictions
- Use Logs to Separate Extraction From Playback
- Run a Clean Temporary Test Before Making Permanent Changes
- Quick Fix Checklist
- Frequently Asked Questions
When an authenticated or age-gated streaming URL works in a browser but fails in mpv, the player itself is often not responsible for the login failure. mpv normally asks an external extractor, usually yt-dlp, to resolve the page into playable media URLs. The most likely causes are missing or expired cookies, incorrect browser-cookie extraction, an outdated or undiscoverable yt-dlp executable, shell quoting errors, account or region restrictions, configuration conflicts, or a site that uses DRM. The steps below focus on authenticated, non-DRM extractor sites and help you isolate the failure without deleting your configuration or changing unrelated playback settings.

Start with free Canva bundles
Browse the freebies page to claim ready-to-use Canva bundles, then get 25% off your first premium bundle after you sign up.
Free to claim. Canva-ready. Instant access.
1. Confirm the Symptom With a Minimal Clean mpv Command
Start by separating login and extraction problems from your normal mpv configuration. Close any existing mpv instances, open a terminal, and test the exact page URL with configuration loading disabled.
On Windows PowerShell, Linux, or macOS, begin with:
mpv --no-config "https://example.com/watch/page"Replace the example address with the full page URL. Keep the URL quoted, especially when it contains ampersands, question marks, or other shell-sensitive characters. In Windows Command Prompt, an unquoted ampersand can split a URL into multiple commands. In PowerShell, quoting also prevents special characters from being interpreted by the shell.
This clean test intentionally excludes your mpv.conf file, input.conf file, profiles, user scripts, shaders, and most custom playback behavior. It does not bypass authentication. Its purpose is to determine whether the failure exists independently of your customization.
1.1 Interpret the first result
- If the clean command plays the video, the login mechanism and extractor probably work. A configuration option, profile, script, or executable-path difference is the likely cause.
- If mpv reports that the URL is unsupported, yt-dlp may be missing, unavailable in mpv's environment, outdated, or unable to handle that site.
- If the output mentions login, cookies, age verification, authorization, or account access, test yt-dlp and cookies directly.
- If extraction succeeds but playback fails afterward, investigate the returned stream, formats, headers, decoder, or output path rather than the account login.
- If the site identifies DRM-protected media, stop. Supplying cookies does not make DRM media playable through mpv and yt-dlp.
Success at this stage means mpv begins playback or at least progresses beyond the login or authorization error. Once it does, stop changing authentication settings and move only to playback-specific diagnostics if another error remains.
2. Check yt-dlp and Authentication Directly
mpv is a media player, not a full web browser. It does not reproduce every login flow, execute an entire website application, display CAPTCHA prompts, or automatically inherit a browser session. For supported sites, yt-dlp extracts media information and can use cookies that represent an existing authenticated browser session.
2.1 Test yt-dlp separately
Before changing mpv.conf, run yt-dlp against the same URL. Listing formats is a useful test because it checks extraction without downloading the complete video:
yt-dlp -F "https://example.com/watch/page"If this produces the same login error, the problem is below the mpv layer. Changing mpv video output, hardware decoding, subtitles, shaders, HDR options, or audio devices will not repair it.
If the command is not found, confirm that yt-dlp is installed from an official or trusted package source and that its location is available through the terminal's PATH. Do not download renamed binaries from random codec or download sites. If yt-dlp works in your shell but mpv cannot find it, launch mpv from that same shell as a comparison. Graphical applications on macOS and some Linux desktop environments can inherit a different PATH from interactive shells.
Success means yt-dlp prints metadata and a format table rather than an authentication error. If it does, retest the same URL in a clean mpv command before changing anything else.
2.2 Extract cookies from a logged-in browser
First, log in to the site using a supported browser and verify that the exact page plays there. Then close private browsing windows and complete any age confirmation, consent, or account verification requested by the site. Test browser-cookie extraction directly with yt-dlp:
yt-dlp --cookies-from-browser firefox -F "https://example.com/watch/page"Replace firefox with the browser yt-dlp supports on your system, such as chrome, chromium, edge, brave, opera, safari, or vivaldi, as applicable. Browser support and cookie-store access vary by operating system. Multiple browser profiles may require an explicit profile selection using yt-dlp's documented browser-cookie syntax.
Pass the same request through mpv with a raw yt-dlp option:
mpv --no-config --ytdl-raw-options=cookies-from-browser=firefox "https://example.com/watch/page"In mpv.conf, the equivalent persistent setting is:
ytdl-raw-options=cookies-from-browser=firefoxDo not add it permanently until the terminal test succeeds. Browser-cookie extraction can fail when the browser's cookie database is locked, the operating system denies access to encrypted credentials, the wrong profile is selected, or mpv runs under a different user account.
Success means the former login or age-gate message disappears and yt-dlp returns formats or mpv starts playback. At that point, stop modifying cookies. Additional authentication changes can obscure a working setup.
2.3 Use a cookie file carefully
If direct browser extraction is unavailable, yt-dlp can read a Netscape-format cookie file. Treat this file like a password because session cookies may grant account access. Store it in a private location, never upload it with logs, and do not share it in support posts.
Test it with yt-dlp:
yt-dlp --cookies "/private/path/cookies.txt" -F "https://example.com/watch/page"Then pass it through mpv:
mpv --no-config --ytdl-raw-options=cookies=/private/path/cookies.txt "https://example.com/watch/page"Paths containing commas can be awkward inside comma-separated raw options. A simple private path without commas is easier to troubleshoot. Also distinguish yt-dlp's cookie option from mpv's own HTTP cookie handling. For an extractor page, the cookies generally need to reach yt-dlp, not merely mpv's later media request.
3. Check Configuration, Profiles, Scripts, and URL Handling
If the clean test works but your normal command fails, compare the two environments methodically. Do not delete the entire configuration folder. Temporarily disable one relevant layer at a time or build a small temporary config containing only the known-working option.
3.1 Inspect mpv.conf and profiles
Look for settings involving ytdl, script, script-opts, proxies, user agents, HTTP headers, cookies, format selection, network timeouts, or custom executable paths. A profile that matches web URLs may silently replace global settings.
If you know the profile name, inspect its expanded options with:
mpv --show-profile=profile-nameCheck for duplicate ytdl-raw-options lines. Depending on how an option is defined and parsed, a later assignment can replace an earlier value. Consolidate related yt-dlp options carefully instead of assuming every repeated line is cumulative.
Success means normal mpv playback matches the clean command after the conflicting line or profile is corrected. Once identified, leave unrelated subtitle, HDR, shader, and decoder settings untouched.
3.2 Review input bindings and scripts
An input binding may load a URL through a script rather than through mpv's standard URL handling. A script can rewrite URLs, call a different yt-dlp executable, add format rules, or omit cookies. Test by pasting the URL directly into the terminal instead of invoking a clipboard, browser-extension, playlist, or custom open-URL binding.
Temporarily move only the suspected script out of the scripts directory, or use the script's documented disable option. Avoid removing all scripts at once unless a clean test has already demonstrated a script-level conflict.
Success means the direct command and scripted action behave identically after the binding or script is corrected.
3.3 Verify the page URL
Pass the public watch-page URL that yt-dlp supports, not an expired media URL copied from browser developer tools. Direct media links often contain short-lived signatures, tokens, or account-specific parameters. A copied playlist manifest may expire even though the watch page remains available.
Remove accidental trailing punctuation, HTML entities such as &, and line breaks introduced by a clipboard tool. For playlists, test one individual item before troubleshooting the complete playlist.
4. Check Permissions, Network Access, and Account Restrictions
Authentication can be correct while environmental restrictions still prevent extraction or playback. These failures should not be mistaken for an mpv decoder problem.
4.1 Operating system permissions
Browser cookies may be encrypted through operating system services. Run mpv and yt-dlp as your normal desktop user, not as root, another account, or an unrelated service. Elevated execution can change the home directory, browser-profile location, keyring access, PATH, and configuration directory.
On macOS, privacy controls may affect access to browser data. On Linux, sandboxed browser packages can store profiles in locations different from traditional packages. On Windows, another user account cannot normally reuse your browser's protected session data. Follow the browser-cookie error shown by yt-dlp rather than weakening broad system protections.
4.2 Account, region, and network checks
Confirm that the same account can play the exact content in the browser on the same network. A valid login does not override subscription requirements, age settings, geographic availability, concurrent-stream limits, enterprise policies, or account-specific entitlements.
If a VPN, proxy, DNS filter, firewall, or security product is active, compare browser and terminal traffic. A browser may use a configured proxy that terminal applications do not use, or the reverse. Do not rotate regions to evade licensing restrictions. Use the service only where your account and the provider permit access.
Success means yt-dlp can retrieve metadata and formats under the same legitimate account and network conditions as the browser.
4.3 Recognize DRM limitations
Some services use encrypted media extensions and a content decryption module integrated into supported browsers or official applications. mpv plus yt-dlp is not a replacement for that DRM environment. Cookies can prove that an account is logged in, but they do not supply the licensed decryption workflow.
If yt-dlp identifies DRM, or the site is known to provide only DRM-protected formats for that title, use the provider's supported player. Do not attempt to bypass access controls. This is a stopping condition, not an mpv configuration failure.

5. Use Logs to Separate Extraction From Playback
When the cause remains unclear, capture a focused log. Logs may contain private URLs, query tokens, headers, usernames, local paths, or cookie-related details, so sanitize them before sharing.
mpv --no-config --msg-level=all=v --log-file=mpv-login-test.log --ytdl-raw-options=cookies-from-browser=firefox "https://example.com/watch/page"Search the log for ytdl, yt-dlp, cookie, login, HTTP, 403, format, and DRM. The important boundary is whether yt-dlp returned a playable media URL.
- An extractor error before formats are returned points to yt-dlp, cookies, the account, the site, or network access.
- An HTTP 401 or 403 after extraction may indicate expired media URLs, required request headers, region rules, or cookies needed by the media server.
- A decoder, video-output, audio-output, or GPU error after the stream opens is a separate playback problem.
5.1 Use playback diagnostics only after extraction succeeds
Once media opens, mpv's stats overlay and track information can help diagnose a second-stage problem. The stats overlay can show the selected video and audio formats, dropped frames, decoding mode, and output details. Track information can reveal whether the extracted item contains usable video, audio, or subtitle tracks.
If audio plays with a black screen, test --hwdec=no temporarily. If playback fails with a custom video output or GPU configuration, compare against --no-config. If a playlist opens the wrong language or no audio, inspect track selection and remove forced aid, vid, or sid settings for the test.
Subtitle settings, HDR tone mapping, shaders, screenshot templates, audio backends, display servers, and hardware decoding do not normally cause a website login rejection. Investigate them only when the log proves extraction succeeded and the failure occurs while opening or rendering the resulting media.
6. Run a Clean Temporary Test Before Making Permanent Changes
Use a controlled sequence so that every change has a clear result:
- Verify the page plays in the logged-in browser.
- Run
yt-dlp -Fwithout cookies and record the exact result. - Run
yt-dlp --cookies-from-browser BROWSER -F. - Run mpv with
--no-configand the same browser-cookie option. - Run your normal mpv command with the working cookie option.
- If only the final command fails, inspect profiles, scripts, and duplicated options.
Change one variable per test. Do not simultaneously update yt-dlp, rewrite mpv.conf, switch video outputs, disable hardware decoding, replace scripts, and export new cookies. That approach may produce playback, but it will not reveal which change fixed the mpv player issue.
A successful temporary test is one that can be repeated. Repeat the exact command once before copying the setting into mpv.conf. After the persistent configuration also works, stop troubleshooting.
7. Quick Fix Checklist
- Confirm that the exact video plays in your logged-in browser.
- Use the watch-page URL rather than an expiring media URL.
- Quote the complete URL in the shell.
- Test
yt-dlp -Fseparately from mpv. - Test browser cookies with
yt-dlp --cookies-from-browser. - Pass working cookies through
--ytdl-raw-options. - Use
mpv --no-configto exclude configuration conflicts. - Confirm mpv can locate the same yt-dlp used by your terminal.
- Check profiles and scripts only if the clean command works.
- Review account, subscription, age, and region eligibility.
- Stop if the available media requires DRM.
- Sanitize logs before sharing them.
8. Frequently Asked Questions
8.1 Why does the site work in my browser but not in mpv?
The browser holds your authenticated session and can execute the site's complete login flow. mpv is not a browser. It usually relies on yt-dlp to interpret the page and obtain media URLs. Passing cookies from a valid browser session may solve the problem when the site is supported and the media is not DRM-protected.
8.2 Should I pass cookies to mpv or yt-dlp?
For an extractor website, pass them to yt-dlp through mpv's ytdl-raw-options. mpv's own HTTP cookie features apply to requests mpv makes directly, while yt-dlp needs authentication when it initially extracts the page. Some sites may also require headers or cookies on the returned media request, but diagnose that only if extraction succeeds first.
8.3 Why does browser-cookie extraction fail?
Common reasons include choosing the wrong browser profile, running under another operating system user, an inaccessible or locked cookie database, encrypted credential access, sandboxed profile locations, or an expired browser session. Test the option directly in yt-dlp because its error message is usually more specific than mpv's summary.
8.4 Will changing hardware decoding fix a login error?
No. Hardware decoding starts after a playable stream has been found and opened. Change hwdec, GPU, HDR, video-output, or display-server settings only when logs show that extraction succeeded and the failure occurs during decoding or rendering.
8.5 Can cookies make DRM-protected video work?
No. Cookies may authenticate an account, but they do not replace the licensed DRM components used by a supported browser or application. Use the service's official playback method when the requested media is available only through DRM.
8.6 When should I update yt-dlp?
If a supported site recently changed and extraction fails even with valid cookies, compare your installation with the current official yt-dlp release or package. Update through the official project mechanism or a trusted operating system package source. Avoid random binaries and codec packs. After updating, repeat the standalone yt-dlp -F test before changing mpv settings.