Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming stops after a few seconds on battery powered Chromecast speaker #3717

Open
2 tasks done
randmr opened this issue Mar 12, 2025 · 11 comments
Open
2 tasks done

Comments

@randmr
Copy link

randmr commented Mar 12, 2025

What version of Music Assistant has the issue?

2.4.4

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

  • Yes

The problem

When streaming music to a battery powered Chromecast speaker (JBL Charge 5 WiFi), the stream will only play for a few seconds before stopping. The player will "power off" in MA (it is still physically powered on) and will display an error in the logs that the player has disconnected. Within a few seconds the logs will indicate that it has reconnected. This happens consistently with this one speaker regardless of the WiFi signal strength or the streaming provider.

How to reproduce

Start a stream to from any music provider to the JBL Charge 5 Chromecast and wait 3-5 seconds for the stream to stop.

This behavior does not happen if the same speaker is part of a Chromecast speaker group as long as there is at least one additional member. The speaker never buffers or has any breaks in the music when part of a group.

Music Providers

YouTube Music and Plex both exhibit the behavior

Player Providers

This only happens on a battery powered Chromecast speaker (JBL Charge 5 WiFi).

I have several other Chromecast speakers (Nest Hub, Nest Hub Display, Google Mini) and none of them exhibit this behavior. I have also tested with the Windows Companion app and not had any issues.

Full log output

music-assistant.log

Additional information

I have also tried with Queue Flow on and off for this speaker with no difference seen. It does not make a difference if the speaker is plugged in or not.

What version of Home Assistant Core are your running

2025.2.5

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Alternative

Have you included ALL of the information specified in the Troubleshooting FAQ or explained why you cannot

  • Yes
@randmr randmr added the triage label Mar 12, 2025
@marcelveldt
Copy link
Member

For the JBL products, you need to set the output codec to MP3 in the player settings (advanced section).
They can't deal with the high bitrate flac stream we send by default.

@OzGav
Copy link
Contributor

OzGav commented Mar 12, 2025

@randmr Please advise what happens when you set the codec to MP3

@randmr
Copy link
Author

randmr commented Mar 12, 2025

Unfortunately I am seeing the same behavior after changing it to MP3. I restarted the MA add-on and power cycled the speaker just to be sure. Here is a new log file with the recent test.

music-assistant_20250312.log

@randmr
Copy link
Author

randmr commented Mar 12, 2025

I'm not sure if it makes any difference, but as a test I copied an MP3 out of my Plex library to the local HA Media library and added that as a provider. I see the same behavior when streaming from the local disk.

@ijc
Copy link

ijc commented Mar 15, 2025

I see similar behaviour with my JBL Charge 5 Wi-Fi.

I'm going from memory, but I believe I first had an issue with this device stopped when I first started using MA, which was version 2.2, but then 2.3 came out shortly after and seemed to fix it. It seems it is back (at least the symptom, could be a different issue under the hood) with MA 2.4.

I have also switched to MP3 streaming with no change. This happens when streaming direct to the JBL device or to a Universal group where the JBL is the only active provider. I've not really used it with multiple devices active in the group.

I also have a Chromecast Ultra on a TV, this works perfectly with no issues. My logs are the same as what @randmr reports.

@OzGav
Copy link
Contributor

OzGav commented Apr 6, 2025

Please confirm this is still an issue with 2.5.0 or preferably 2.6.0b0

@ijc
Copy link

ijc commented Apr 6, 2025

I am still seeing it with 2.5.0.

If I upgrade 2.6.0b0 to test will I be able to downgrade to 2.5.0 again (I'm thinking of e.g. incompatible database schema changes). If it is quick and easy to roll back I can give it a go. If not I'll setup a second system to try it with but it'll take me longer.

@OzGav
Copy link
Contributor

OzGav commented Apr 6, 2025

You can’t “upgrade” between the stable and beta channels. You run them in parallel https://www.music-assistant.io/release/

@ijc
Copy link

ijc commented Apr 7, 2025

Thanks, I'll set up a parallel stack but it'll take me a little longer to find the time.

BTW, I did at one point try with pychromecast 14.0.6 monkey patched onto MA 2.4, it didn't help (which is why I forgot to mention it at the time).I see 14.0.7 is now out though and in betas, so that seems like a quick and easy I can try too.

@marcelveldt
Copy link
Member

Looking at the logs it seems that the speaker is simply crashing. It doesn't like something that is being sent by MA and it restarts/reconnects. Unfortunately cast is a bit fragile sometimes and things like this can happen on non-Google cast players.

Things to try that may or may not help:

  • Try with and without flow mode enabled.
  • Try another output codec such as mp3 or aac.
  • Try another HTTP profile (player settings, advanced section)
  • Try with and without the MA cast app enabled (player settings, advanced section)

If you've found the golden combination that works, we can try to set it as default.

@ijc
Copy link

ijc commented Apr 10, 2025

I thought it many times and never when I was next to a keyboard to post: I agree that this seems much more likely to be a problem with the device than MA.

I previously tried with mp3, without success. I'll try the other things at the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants