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.39k stars 51 forks source link

No audio on slimproto group that includes SB Player #3100

Open pmjordan opened 3 weeks ago

pmjordan commented 3 weeks ago

What version of Music Assistant has the issue?

2.3.2

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

2024.10.1

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

The problem

When two correctly functioning slimproto players are linked into a sync group no audio results on either player.

How to reproduce

Install an SB player app on each of two android phones. Install MA on HA using HAOS running on generic x86 hardware. Prove that each player works by playing a stream to each of the two players independently and simultaneously. Now disconnect and reconnect both players and power on from the MA GUI and clear the debug logs on the clients. 1) Link the two players into a sync group from the HA GUI and start a stream. No audio results. 2) Play a stream on one and then link the other into the group. The audio stops. The GUI shows the stream playing for five increments and then returning to zero on a repeating cycle. I recover from the error by disconnecting and reconnecting the players at the client end.

Music Providers

I have tried MP3 and WAV files from local media and AAC from TuneIn Radio, all streams result in the same problem.

Player Providers

This occurs with any combination more than one out of my three slimproto/squeezebox players but not with snapcast. Two of the slimproto players are SB player on android, the third is the squeezelite add-in on the HA machine.

Full log output

MA logs attached. d5369777_music_assistant_2024-10-28T17-40-05.698Z.log d5369777_music_assistant_2024-10-28T17-26-58.835Z.log The player debug logs differ depending on whether a stream was playing when the players were linked. If there was no stream when linking both show 'Data Stream Starting' 'Got response headers'. If a stream was in progress then the player which was working shows 'Error starting decoder java.IOException; no MP3 data found in stream' java.IOException; no MP3 data found in stream'

Additional information

This feature has never worked for me since I started with MA. I have been updating MA server releases as they occur. I have tried enabling queue flow mode on the two android based players with no effect. My network is a standard LAN on a single router. This appears to be related to https://github.com/orgs/music-assistant/discussions/1123

Thank you for your work on this great project.

What version of Home Assistant Core are your running

2024.10.4

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

OzGav commented 3 weeks ago

I cannot reproduce this with 2 picoreplayers. Maybe it is a problem with the Android implementation. If you have a machine you can setup the squeezelite client on then that would be a better test (along with your HA addon)

OzGav commented 3 weeks ago

You can also install snapdroid on the devices and see how that goes https://play.google.com/store/apps/details?id=de.badaix.snapcast

OzGav commented 3 weeks ago

Actually this has been reported before https://discord.com/channels/753947050995089438/1264569862114512917/1264580683658170409

pmjordan commented 3 weeks ago

Thank you for your response. I confirm that this seems to be limited to groups of players which include at least one slimproto player on android. - I've now tried both SB Player and Squeeze Player android apps and they are both affected. A group with HA player and squeezelite client on Linux works ok as does snapcast on android.

pmjordan commented 3 weeks ago

At least this could be added to known issues at https://music-assistant.io/player-support/slimproto/ That's an easy fix but I can do a PR if you want.

OzGav commented 3 weeks ago

No let’s wait until Marcel has a chance to comment.

rysm83 commented 2 weeks ago

I wanted to comment that I'm also having the same issue as discussed above. Is this now a known issue?

rfporter commented 2 weeks ago

I ran into the same issue. I posted about it over on the player discussion though: https://github.com/orgs/music-assistant/discussions/1123#discussioncomment-10897922

Workaround for now is to use snapcast.

github-actions[bot] commented 6 days ago

This issue is stale because it has been open 7 days with no activity after asking for more info. Comment or this will be closed in 3 days.