music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.36k stars 52 forks source link

Playing on Airplay but there is no sound #2005

Closed andreclemente closed 4 months ago

andreclemente commented 7 months ago

What version of Music Assistant has the issue?

2.0.0b109

What version of the Home Assistant Integration have you got installed?

No response

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

I try to play any music from Spotify or Radio, the player (interface) looks to be playing but there's no sound coming out from the speaker

How to reproduce

Click on a music or radio and choose any Airplay device.

Music Providers

Player Providers

For the players that support it, UPnP/DLNA works, but not Airplay

Relevant log output

2024-03-15 13:46:28.493 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 5.1.4 with libsoxr support 2024-03-15 13:46:28.493 INFO (MainThread) [music_assistant.streams] Starting server on 0.0.0.0:8096 - base url: http://10.0.10.65:8096 2024-03-15 13:46:29.126 INFO (MainThread) [music_assistant] Loaded music provider URL 2024-03-15 13:46:29.126 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider 2024-03-15 13:46:29.126 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider 2024-03-15 13:46:29.128 INFO (MainThread) [music_assistant] Loaded player provider Universal Group Player 2024-03-15 13:46:29.128 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider 2024-03-15 13:46:29.128 INFO (MainThread) [aioslimproto.server] Starting SLIMProto server on port 3483 2024-03-15 13:46:29.128 INFO (MainThread) [music_assistant] Loaded player provider Chromecast 2024-03-15 13:46:29.129 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider 2024-03-15 13:46:29.129 INFO (MainThread) [music_assistant] Loaded player provider SONOS 2024-03-15 13:46:29.173 INFO (MainThread) [music_assistant.music] Sync task for URL completed 2024-03-15 13:46:29.179 INFO (MainThread) [aioslimproto.server.cli] Starting (legacy/telnet) SLIMProto CLI on port 9090 2024-03-15 13:46:29.180 INFO (MainThread) [aioslimproto.server.cli] Starting SLIMProto JSON RPC CLI on port 9000 2024-03-15 13:46:29.187 INFO (MainThread) [music_assistant] Loaded player provider Slimproto 2024-03-15 13:46:29.401 INFO (MainThread) [music_assistant.players] Player registered: uuid:FF310001-2C1B-0758-6207-8D3BFF310001/AudioCast_48F4 2024-03-15 13:46:29.529 INFO (MainThread) [music_assistant.players] Player registered: uuid:FF31F012-86B4-B189-6897-F1B3FF31F012/WS350_A318 2024-03-15 13:46:29.541 INFO (MainThread) [music_assistant] Loaded player provider Airplay 2024-03-15 13:46:30.023 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as 1184830956 2024-03-15 13:46:30.023 INFO (MainThread) [music_assistant] Loaded music provider Spotify 2024-03-15 13:46:30.703 INFO (MainThread) [music_assistant.players] Player registered: 03f7ea55-bec6-6a3f-13b5-b10e81f6827f/S80QR(77) 2024-03-15 13:46:30.852 INFO (MainThread) [music_assistant] Loaded music provider RadioBrowser 2024-03-15 13:46:31.012 INFO (MainThread) [music_assistant.players] Player registered: ap00226cdba318/WS350_A318 2024-03-15 13:46:31.026 INFO (MainThread) [music_assistant.players] Player registered: apb8165fb43c60/S80QR(77) 2024-03-15 13:46:31.061 INFO (MainThread) [music_assistant.players] Player registered: ap00226c2248f4/AudioCast_48F4 2024-03-15 13:47:05.227 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue office airplay - crossfade: False

Additional information

I'm not using Home Assistant, just a regular linux desktop. My goal is to move it to my TrueNAS after the issues are fixed, where my Home Assistant is.

What version of Home Assistant Core are your running

2024.2.5

What type of installation are you running?

Docker

On what type of hardware are you running?

Linux

OzGav commented 7 months ago

What exact device are you playing to?

andreclemente commented 7 months ago

I tried with these 3:

OzGav commented 7 months ago

You don’t say whether you have tried the encryption or compression options?

andreclemente commented 7 months ago

Enable encryption fixed the issue! Sorry if it's something I should already know. Thank you!

andreclemente commented 4 months ago

Hi, I just tested this again and airplay is not working.

Version: 2.0.4

Chromecast does work, but not airplay.

image

image

OzGav commented 4 months ago

Any chance you can test this with the latest beta?

andreclemente commented 4 months ago

Still no sound on airplay devices with the version 2.1.0b2

(I tried the encryption or compression options)

OzGav commented 4 months ago

Ok will leave this open.

marcelveldt commented 4 months ago

If it does not work even with encryption enabled, it probably means your device has a bad implementation of legacy airplay 1 (raop) and only supports Airplay 2. We have seen that so far only on Samsung soundbars but maybe your device(s) also are impacted by this.

The M5 AudioCast should work btw; I have that device here as well for testing. But it needs encryption enabled.

OzGav commented 4 months ago

@andreclemente Please check again the M5 AudioCast with encryption enabled and use 2.1.0b3. Have the other two players ever worked?

andreclemente commented 4 months ago

Yes, all 3 worked before when I tested a few months ago. Encryption is enabled.

Here are some logs: 2024-06-10 18:07:39.263 INFO (MainThread) [music_assistant] Starting Music Assistant Server (da9732c62ca3400eb0f2d321429915f2) version 2.1.0b3 - HA add-on: False - Safe mode: False 2024-06-10 18:07:39.283 INFO (MainThread) [music_assistant.cache] Initializing cache controller... 2024-06-10 18:07:40.490 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes. 2024-06-10 18:07:41.139 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.0.1 with libsoxr support 2024-06-10 18:07:41.140 INFO (MainThread) [music_assistant.streams] Starting server on 10.0.10.161:8096 - base url: http://10.0.10.161:8096 2024-06-10 18:07:41.146 INFO (MainThread) [music_assistant.webserver] Starting server on 10.0.10.161:8095 - base url: http://10.0.10.161:8095 2024-06-10 18:07:41.654 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant 2024-06-10 18:07:41.654 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider 2024-06-10 18:07:41.655 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider 2024-06-10 18:07:41.659 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider 2024-06-10 18:07:41.741 INFO (MainThread) [music_assistant] Loaded player provider Chromecast 2024-06-10 18:07:41.751 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant 2024-06-10 18:07:41.753 INFO (MainThread) [music_assistant] Loaded music provider Filesystem (local disk) 2024-06-10 18:07:42.106 INFO (MainThread) [music_assistant] Loaded player provider Airplay 2024-06-10 18:07:42.112 INFO (MainThread) [music_assistant] Loaded music provider RadioBrowser 2024-06-10 18:07:42.116 INFO (MainThread) [music_assistant.players] Player registered: ap00226cdba318/ws350_a318 2024-06-10 18:07:42.119 INFO (MainThread) [music_assistant.players] Player registered: ap00226c2248f4/audiocast_48f4 2024-06-10 18:07:42.296 INFO (MainThread) [music_assistant.music] Sync task for Music Assistant completed 2024-06-10 18:07:42.343 INFO (MainThread) [music_assistant.players] Player registered: apb8165fb43c60/S80QR(77) 2024-06-10 18:07:42.618 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as 1184830956 2024-06-10 18:07:42.618 INFO (MainThread) [music_assistant] Loaded music provider Spotify 2024-06-10 18:07:43.682 INFO (MainThread) [music_assistant.players] Player registered: 03f7ea55-bec6-6a3f-13b5-b10e81f6827f/S80QR(77) 2024-06-10 18:07:48.164 INFO (MainThread) [music_assistant.music] Sync task for Filesystem (local disk) completed 2024-06-10 18:07:48.164 INFO (MainThread) [music_assistant.music] Sync task for RadioBrowser completed 2024-06-10 18:08:08.561 INFO (MainThread) [music_assistant.music] Sync task for Spotify completed 2024-06-10 18:08:49.113 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue audiocast_48f4 - crossfade: False 2024-06-10 18:10:07.351 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue audiocast_48f4 - crossfade: False 2024-06-10 18:11:15.970 INFO (MainThread) [music_assistant.streams] Finished Queue Flow stream for Queue audiocast_48f4

marcelveldt commented 4 months ago

A couple of questions:

1) Is your server multi homed (as in: does it have multiple network interfaces) ? 2) What are you trying to play ? Did you try a full playlist, radio stream etc ?

andreclemente commented 4 months ago
  1. Yes, however I choose the right one at the settings (10.0.10.161)
  2. Anything from radio stream, spotify song, local mp3
marcelveldt commented 4 months ago

Please test it again with the latest beta (2.1.0b4) as I have added support for multiple network interfaces. Check in the Airplay provider settings if it picked the correct interface. Also be aware that the docker container running MA must be either using host networking or bridge/macvlan. There may not be a firewall in between the MA server and your devices

andreclemente commented 4 months ago

That fixed the issue! Thank you so much!