What's going wrong?
Pick the category that best matches your problem. The wizard will narrow it down step by step.
Troubleshooting
"mpv not found" or playback doesn't start
Ensure mpv is installed and in your $PATH:
mpv --versionIf installed but not found, check that the libmpv shared library is available:
# Arch
pacman -Qs mpv
# Ubuntu/Debian — you may need the dev package
sudo apt install libmpv-devFor Windows-specific libmpv setup, see docs/installation.md#windows-setup.
Authentication fails
- Make sure you're signed in to YouTube Music (free or Premium) in your browser.
- Try a different browser:
ytm setupauto-detects Chrome, Firefox, Brave, Edge, Chromium, Vivaldi, Opera, Helium. - If auto-detection fails, use the manual paste method:
ytm setup --manual. - Re-run
ytm setupto re-authenticate. - For multi-account or Brand Account setups:
ytm setupwill detect multiple Google accounts and prompt you to pick. Brand Accounts can also be configured via[general] brand_account_idinconfig.toml.
No sound / wrong audio device
mpv uses your system's default audio output. To change it, create ~/.config/mpv/mpv.conf:
audio-device=pulse/your-device-name
List available devices with mpv --audio-device=help.
macOS media keys open Apple Music instead of ytm-player
- ytm-player registers with macOS Now Playing while running, so media keys should target it.
- Start playback in
ytmfirst; macOS routes media keys to the active Now Playing app. - Grant Accessibility and Input Monitoring permission to your terminal app (Terminal, Ghostty, iTerm) in System Settings → Privacy & Security.
- If Apple Music still steals keys, fully quit Music.app and press play/pause once in ytm.
MPRIS / media keys not working (Linux)
Install the optional MPRIS dependency:
pip install -e ".[mpris]"
# or, on Arch:
sudo pacman -S python-dbus-nextRequires D-Bus (standard on most Linux desktops). Verify with:
dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNamesCache taking too much space
ytm cache status # Check cache size
ytm cache clear # Wipe all cached audioOr reduce the limit in config.toml:
[cache]
max_size_mb = 512Logs and diagnostics
ytm-player writes a rotating log file to:
- Linux/macOS:
~/.config/ytm-player/logs/ytm.log - Windows:
%APPDATA%\ytm-player\logs\ytm.log
Crash tracebacks for any unhandled exception (main thread or background thread) are saved to the crashes/ directory next to the log file. The same directory holds faulthandler.log (created on every TUI startup) which captures Python tracebacks for fatal signals (SIGSEGV / SIGBUS / SIGFPE / SIGILL / SIGABRT) — important for catching libmpv C-side crashes that bypass the normal exception machinery.
For verbose logs, launch with --debug:
ytm --debugWhen reporting a bug, please run:
ytm doctorand paste the output into your GitHub issue. It includes eight sections: version + platform info, config/log/crash paths, running-process status, recent ERROR/WARNING log lines, recent mpv warnings, the most recent faulthandler trace, the most recent crash file, and the active-hooks summary. Auth-sensitive substrings (Authorization / Cookie / Bearer / token / SAPISID) are scrubbed automatically before output.