项目的 README,来自 github.com/fzn0x/mixmusic。合并为一个 markdown 文件:README.md。
English · हिन्दी · 简体中文 · Bahasa Indonesia · اردو · Hausa · Português (Brasil) · বাংলা · Русский · አማርኛ
One player for YouTube Music and Spotify.
YouTube Music and Spotify client for macOS, Windows and Linux. YouTube Music works with no account. One search, one queue, mixed playlists, synced lyrics, themes and plugins.
Website · Download · Docs · Changelog
If your music is split between YouTube Music and Spotify, you usually need two apps, with two searches, two queues and two libraries. MixMusic puts both services in one player:
mixmusic:// links.settings.json in your data folder
(%AppData%\MixMusic on Windows, ~/Library/Application Support/MixMusic
on macOS, ~/.config/MixMusic on Linux), which you can keep with your
dotfiles. Save it while MixMusic runs, and it applies at once; Settings ›
Desktop › Settings file opens it.
Listen. In the middle, now playing アイドル by YOASOBI: each line lights up as it's sung, with romaji and a translation under it. On the left, an album; on the right, a podcast you follow.
Make it yours. In the middle, the four layouts: Blend, the default, Expressive, Crate and Tiles, under the themes. On the left, a Material theme that takes its colours from the cover that plays. On the right, community themes in the marketplace.
Download the file for your system from the latest release:
| System | Download |
|---|---|
| macOS 12 and later (Apple silicon and Intel) | mixmusic-<version>-macos-universal.dmg |
| Windows 10 and 11 (x64, Arm), installer | mixmusic-<version>-windows-<arch>-setup.exe |
| Windows, portable, no installation | mixmusic-<version>-windows-<arch>-portable.zip |
| Debian, Ubuntu and derivatives | mixmusic-<version>-linux-<arch>.deb |
| Fedora, openSUSE and derivatives | mixmusic-<version>-linux-<arch>.rpm |
| Arch Linux and derivatives (coming soon) | mixmusic-bin on the AUR: yay -S mixmusic-bin |
| Any Linux, one file | mixmusic-<version>-linux-<arch>.AppImage |
| Any Linux, sandboxed (Flatpak) | mixmusic-<version>-linux-<arch>.flatpak |
| Any Linux, in your home folder | mixmusic-<version>-linux-<arch>.tar.gz, with install.sh |
<arch> is amd64 for x64 and arm64 for Arm. Each release lists
SHA256SUMS to check the downloads with. You don't need the files named
update-…, ….delta, mixmusic-<version>-macos-… or
-windows-<arch>.tar.gz: installed apps update from them.
The installers, the portable zip and the Linux archive update themselves.
The .deb, the .rpm, the AppImage and the Flatpak can't replace their
own files, so MixMusic tells you when a new version is out and downloads
it for you. The AUR's mixmusic-bin updates with the rest of your
system. For the portable zip, unpack it anywhere and open
MixMusic.exe. For the AppImage, make it executable (chmod +x) and open
it. For the Flatpak, open it with your software center, or run
flatpak install ./mixmusic-<version>-linux-<arch>.flatpak; the first time,
Flatpak fetches the GNOME runtime from Flathub.
On a Mac, Homebrew installs MixMusic too, and
brew upgrade updates it:
brew install --cask fzn0x/tap/mixmusic
macOS: the app isn't notarized by Apple yet, so the first time you open it, macOS says it can't check it. Open it anyway from System Settings › Privacy & Security › Open Anyway, or run this once in Terminal:
xattr -dr com.apple.quarantine /Applications/MixMusic.app
Windows: the installer isn't signed yet, so SmartScreen may warn about it: choose More info, then Run anyway. Signing in to YouTube Music and playing Spotify in MixMusic need the WebView2 Runtime, which Windows 11 includes.
Linux: MixMusic needs GTK 3, and PulseAudio (PipeWire serves it too)
or ALSA. Signing in to YouTube Music needs WebKitGTK 4.1, the tray icon
needs libayatana-appindicator3, and keeping your sign-ins in the
system's keyring needs libsecret. The .deb and the .rpm install
them, and the Flatpak brings them with it; for the AppImage and the
archive:
# Debian and Ubuntu
sudo apt install libgtk-3-0 libpulse0 libwebkit2gtk-4.1-0 libayatana-appindicator3-1 libsecret-1-0
# Fedora
sudo dnf install gtk3 pulseaudio-libs webkit2gtk4.1 libayatana-appindicator-gtk3 libsecret
Every system: MixMusic finds the audio of most YouTube Music tracks itself. For the rest, such as tracks made for children, it uses yt-dlp, which it installs for you from Settings › Playback and keeps up to date. yt-dlp needs a JavaScript runtime: Deno, Node.js, Bun or QuickJS. The Flatpak has Node.js.
The Flatpak runs MixMusic in a sandbox, which sees the network, the sound
server, the display and the GPU, and none of your home folder. MixMusic
keeps its settings and library in ~/.var/app/io.github.fzn0x.mixmusic,
apart from a .deb, .rpm, AppImage or archive copy, and both can run at
once. To bring a copy's settings and library over, quit both, then copy
settings.json, library.json, queue.json, positions.json and the
addons and mix-covers folders from ~/.config/MixMusic into
~/.var/app/io.github.fzn0x.mixmusic/config/MixMusic. Quit both first:
a running MixMusic keeps library.json and most other files in memory
and writes over a copied one at its next save. Then sign in to your
accounts again: sign-ins stay in the other copy's keyring. The
data and privacy page says
what each file holds.
In the Flatpak, start at login goes through your desktop, which may ask
you first, and a yt-dlp of your own must be in
~/.var/app/io.github.fzn0x.mixmusic, as the sandbox sees no other
folder. A Discord app that isn't a Flatpak shows what plays only if it
was running when MixMusic started, until it restarts; Discord as a
Flatpak works either way. The Flatpak is new: tell us in an
issue how it runs on your
desktop.
Something not working? docs/troubleshooting.md covers the common problems and the known issues.
You need Go 1.27.3 or later, Bun 1.2 or later, which runs MyGo's command line, and Git. MyGo needs no C compiler, so any system builds MixMusic for every system.
winget install GoLang.Go
winget install Oven-sh.Bun
winget install Git.Git
Open a new terminal, then:
git clone https://github.com/fzn0x/mixmusic
cd mixmusic
bun install
bun run dev
Signing in and Spotify playback need the WebView2 Runtime, which Windows 11 includes. On Windows 10, install it from Microsoft.
With Homebrew:
brew install go oven-sh/bun/bun
git clone https://github.com/fzn0x/mixmusic
cd mixmusic
bun install
bun run dev
Install Go from go.dev/dl (distribution packages are often older than 1.27.3), then Bun and the libraries MixMusic runs with:
curl -fsSL https://bun.sh/install | bash
# Debian and Ubuntu
sudo apt install git libgtk-3-0 libpulse0 libwebkit2gtk-4.1-0 libayatana-appindicator3-1 libsecret-1-0
# Fedora
sudo dnf install git gtk3 pulseaudio-libs webkit2gtk4.1 libayatana-appindicator-gtk3 libsecret
Then:
git clone https://github.com/fzn0x/mixmusic
cd mixmusic
bun install
bun run dev
With Nix, nix develop gives you the tools releases
are built with, at the versions flake.lock pins: Go, Bun, NSIS,
GoReleaser and Zola. nix build builds MixMusic for Linux from source,
into result/.
bun run dev builds the app, starts it, and rebuilds it as you edit. Its
data stays apart from an installed MixMusic, under the name
MixMusic Dev.
bun run build:plugins # the plugins' JavaScript, from their TypeScript
go test ./... # the app's tests
bun run typecheck # the plugin SDK and the community's plugins
go run ./tools/registry -check # the community registry
bun run build # the packaged app for this system, in build/
bun run build -- -platform windows/amd64,linux/amd64,linux/arm64
In the Nix shell, build Linux downloads with
.github/scripts/build.sh linux/amd64,linux/arm64, as releases do. A plain
bun run build there makes a Linux program that asks for Nix's own loader,
and it starts only on NixOS. go run ./tools/elfloader build/linux-amd64
checks a build.
The website is in site/, built with
Zola, and the guides in docs/ are its
/docs/ pages. go run ./tools/sitedocs && zola --root site serve
previews it. Releases are built in the Nix shell and published by
GoReleaser (.goreleaser.yaml).
docs/architecture explains how the parts fit together.
The app is the root package, with the packages of internal/ under it. The
packages outside internal/ are for anyone to import, and documented on
pkg.go.dev.
*.go the app and its windows: the pages, the player bar, the
mini player, the tray, media keys, deep links
fonts/ the typefaces the windows draw with
internal/app the services the windows call, and the desktop integration
internal/player the queue, played by the audio engine or on Spotify's devices
internal/audio MixMusic's audio engine, and the system's audio output
internal/plugins plugins, each in a JavaScript engine of its own
internal/youtube YouTube Music's catalog, and your account there
internal/spotify the Spotify Web API, its sign-in and Spotify Connect
internal/stream audio streams, from YouTube or yt-dlp, opened for the engine
internal/match Spotify tracks matched to their YouTube Music recordings
internal/romaji Japanese lyrics in romaji, kanji read by kagome
internal/library liked and disliked songs, mixes, history and stats
internal/lastfm scrobbling to Last.fm
internal/discord what plays, on your Discord profile
internal/diag the log, without secrets, and the reports of crashes
internal/addons themes and plugins, and the community registry
builtin/themes the themes MixMusic ships with
public/ the page of Spotify's player, on Windows
sdk/ the types of the plugin API
community/ community themes and plugins, and their registry
The packages you can import:
opus/ an Opus decoder in pure Go, a port of libopus's
aac/ an AAC-LC decoder in pure Go
ac3/ an AC-3 and E-AC-3 decoder in pure Go, written from ATSC A/52
webm/ the audio of WebM files: packets, times and seeking
mp4/ the audio of MP4 files: packets, times and seeking
resample/ sample rate conversion, with Kaiser-windowed sincs
lyrics/ synced lyrics from Better Lyrics, Unison and LRCLIB, and translations
brand/ MixMusic's logo, for code that draws it
Anyone can install community themes and plugins from the marketplace, the store icon in the sidebar, and you can add yours.
A theme is a theme.json file that sets colors, fonts and corners, which
show in the layout the user chose.
docs/themes.md lists every token and shows a complete
theme. To try yours, put its folder in the themes folder (Settings ›
Appearance › open themes folder) and choose it in Settings › Appearance.
A plugin is a small module, written in TypeScript or JavaScript, that adds pages, commands, track actions and widgets. docs/plugins.md documents the API, with its types for your editor. The community's sleep timer and spectrum are working examples.
community/themes/<id>/ for a theme, or
community/plugins/<id>/ for a plugin, with its plugin.json and its
index.ts.bun run build:plugins, go run ./tools/registry and
go run ./tools/registry -check.Once it is merged, CI publishes it to the registry branch, and it shows up in everyone's marketplace. community/README.md has the details.
MixMusic has no account, server, analytics or telemetry of its own. It talks to:
sdk.scdn.co, when Spotify plays in
MixMusic.What it keeps on your computer:
The library's history page clears what you played, Settings › Playback clears the cache and the covers, and signing out of a service deletes its sign-in.
On Windows, the visualizer hears the audio of Spotify playing on this computer, in MixMusic or in the Spotify app, through Windows' process loopback, which hears only that app. On macOS 14.2 and later, it hears Spotify playing in MixMusic through a process tap, once you allow it, as macOS asks. It analyzes the audio in memory and never records or sends it.
MixMusic is built on these projects:
Fixes, features, themes, plugins and bug reports are all welcome.
CONTRIBUTORS.md thanks the people whose code, ideas and reports shaped MixMusic.
MixMusic is dual-licensed: use it under the MIT license or
the GNU General Public License, version 3, whichever you
prefer. Contributions are accepted under both. The typefaces in fonts are
under the SIL Open Font License: Selawik's,
Quicksand's,
Roboto Flex's and
Archivo's. The Opus decoder is a port of
libopus, under its BSD license, the AAC decoder
derives from SharpJaad, under its MIT license, and
the HCT color science is a port of Material Color Utilities, under
its Apache license.
MixMusic is not affiliated with, endorsed by or sponsored by Spotify or Google. It plays what these services offer their users, through the services' own interfaces; use it as their terms allow. Spotify and YouTube Music are trademarks of their owners.