thrash.dev

docs / providers / apple music

Providers · chapters · 07 of 25

← Yafmp manual

  1. Local Files
  2. Plex
  3. Navidrome
  4. Jellyfin
  5. Bandcamp
  6. Lidarr
  7. Apple Music
  8. Spotify
  9. SoundCloud
  10. YouTube Music
  11. SiriusXM
  12. Radio
  13. Podcasts
  14. AirPlay
  15. Chromecast
  16. MusicBrainz
  17. Discogs
  18. Labels
  19. Releases
  20. Last.fm
  21. ListenBrainz
  22. Connect
  23. Home Assistant
  24. MCP server
  25. DJ

Apple Music

Browse your Apple Music library and play it through Apple's player. Needs a subscription.

facts

status
beta
kind
source
on by default
yes
needs
Apple Music subscription, Apple Music app (Android), x86-64 computer (desktop)
platforms
iPhone, iPad, Mac, Vision Pro, Apple TV, Android, Linux, FreeBSD, Windows

Description

Apple Music puts your Apple Music library in Yafmp’s library panel. Apple does not let other apps decode its streams, so the songs are always played by a player from Apple, not by Yafmp’s own audio engine. Most of the limits below follow from that. The streams are AAC, so nothing here is lossless.

The three kinds of device work differently:

  • Apple devices use Apple’s MusicKit and the system’s music player.
  • Android signs in through the Apple Music app and plays through Apple’s player for Android.
  • Desktop (Linux, FreeBSD, Windows) uses an unofficial route: Apple’s web player running in a helper program that Yafmp downloads the first time it is needed.

The library shows Made for You, Playlists, Artists, Albums (split into A–Z folders past 150 entries) and Recently Added. On Android and desktop there are two more rows: Top Playlists (Apple’s chart) and Apple Music Editors (one folder per Apple curator). Search covers your library first, then Apple’s catalogue.

Apple Music is only available when the build of Yafmp you installed includes it.

Requirements

All platforms:

  • An Apple Music subscription.

Android:

  • The Apple Music app, installed and signed in on the same device. Yafmp signs in through it.
  • A phone or tablet. Apple Music is not on Android TV, because the Apple Music app is not offered for TVs. It also needs a 64-bit device.
  • To send Apple Music to AirPlay speakers: Android 10 or later.

Desktop:

  • An x86-64 computer. The helper does not exist for other processors.
  • About 120 MB of download the first time you connect or play. This is the helper: a build of Electron from castlabs that includes the Widevine copy protection Apple’s web player needs. Yafmp checks the download against castlabs’ published checksum.
  • FreeBSD: the helper is a Linux program. You need the Linux compatibility layer loaded (sysrc linux_enable=YES; service linux start), a Linux userland with GTK 3 and NSS installed where the layer looks for it, and an X display (Xwayland is enough). For sound, pactl and a PulseAudio server such as pipewire-pulse.
  • Windows: the copy protection only works after the downloaded helper has been signed with castlabs’ signing tool. This is a one-time step that needs Python and a free castlabs account. When it is missing, Yafmp shows the commands to run.
  • To send Apple Music to AirPlay speakers or to the visualizers: PulseAudio or pipewire-pulse with pactl on Linux and FreeBSD; Windows 10 version 2004 or later on Windows.

Setup

Apple:

  1. Open Preferences → Plugins → Apple Music, or look at the top of the Apple Music section in the library.
  2. Choose Connect Apple Music and allow access when the system asks.
  3. The Apple Music rows appear in the library.

Android:

  1. Install the Apple Music app and sign in to it.
  2. In Yafmp, open Settings → Apple Music and choose Connect to Apple Music.
  3. The Apple Music app opens and asks whether Yafmp may use your library. Allow it.

Desktop:

  1. Open Settings → Apple Music and choose Connect to Apple Music.
  2. The first time, wait for the helper to download and unpack. The settings pane shows the progress.
  3. Apple’s sign-in window opens. Sign in with your Apple Account.

Settings

SettingDefaultWhat it does
Connect Apple Music—Apple: asks the system for access to your Apple Music library. Shows Connected afterwards.
Connect to Apple Music—Android and desktop: starts the sign-in.
Connected (store: …)—Android and desktop: read-only. Shows the country store your account belongs to.
Disconnect—Android and desktop: forgets the sign-in.

On Apple there is no disconnect button. To take access away, use the system’s Settings → Privacy & Security → Media & Apple Music.

Limits

On every platform:

  • AAC only. No lossless.
  • No gapless playback between Apple Music songs. Each song is handed to Apple’s player on its own.
  • The equalizer and compressor do not change Apple Music songs.
  • Apple Music never goes to a Chromecast. With a Chromecast selected, an Apple Music song plays on the device itself.

Apple:

  • Yafmp’s volume slider is dimmed while an Apple Music song plays. Apple’s player gives apps no volume control. Use the system or device volume.
  • The visualizers do not hear Apple Music.
  • A pause from Control Center is not shown on Yafmp’s play button.
  • Access is granted per device. It is not shared between your devices with the other sign-ins.
  • A music.apple.com link pasted into the search field opens that item. This works on Apple only.

Android:

  • Songs that exist only as your own uploads, with no match in Apple’s catalogue, are listed but cannot be played. They are marked “Not playable (not in the Apple Music catalog)”.
  • Stations and music videos are not listed. This applies to the desktop too.
  • The visualizers do not hear Apple Music.
  • AirPlay works by recording what the app itself plays. Android asks for the microphone permission and shows its “share your screen” prompt each time; only Yafmp’s own sound is recorded. The speakers play about a second behind, and the device is muted while it sends.

Desktop:

  • Upload-only songs cannot be played, as on Android.
  • The route is unofficial. It can stop working when Apple changes its web player.
  • AirPlay and the visualizers work by recording the helper’s sound, so they need the sound setup listed under Requirements. On Windows the computer keeps playing while the AirPlay speakers play.

Troubleshooting

ProblemWhyWhat to do
“yafmp isn’t allowed to use Apple Music” (Apple)Access was refused, or is restricted on this deviceTurn it on in the system’s Settings → Privacy & Security → Media & Apple Music.
The volume slider is dimmed (Apple)An Apple Music song is playingUse the system or device volume. On a Mac audio interface without a system volume, use the interface’s own control.
“Apple Music doesn’t have this song any more” (Apple)The song was removed from your library or from the catalogueRemove it from the playlist.
Songs added on another device are missing (Apple)Yafmp keeps the lists it has loadedRight-click the Apple Music heading in the library and choose Refresh.
“Apple Music sign-in expired: reconnect in Settings” (Android, desktop)Apple no longer accepts the stored sign-inOpen Settings → Apple Music and connect again.
A song says “isn’t in the Apple Music catalog” (Android, desktop)It is an upload with no catalogue matchIt cannot be played here. Play it on an Apple device.
Settings says this build’s Apple Music token expires or has expired (Android, desktop)Each build can use Apple Music for a limited timeInstall a newer build of Yafmp.
“Apple Music on FreeBSD runs Linux Electron: load the Linux layer”The Linux compatibility layer is not loadedRun sysrc linux_enable=YES and service linux start as root.
“Apple Music on FreeBSD needs a Linux userland with GTK 3 and NSS”A library the helper needs is missingInstall GTK 3 and NSS in the Linux userland named in the message.
“Apple Music on FreeBSD needs an X display”DISPLAY is not setStart Yafmp in a session with X or Xwayland.
No sound from Apple Music on FreeBSDpactl is missing, so the helper has no sound server to reachInstall PulseAudio’s tools and run pipewire-pulse or PulseAudio.
“Apple Music on Windows needs castlabs’ signing tool once”The helper is not signed yetRun the commands in the message in a terminal, then connect again.
“Apple Music on the desktop needs Linux, FreeBSD or Windows (x86-64)”The computer has a different processorApple Music is not available on this computer.
An AirPlay speaker cannot be picked during an Apple Music songThe recording is not available: see RequirementsInstall what is listed there, or play the song on this device.