-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Delayed audio output with local audio (~4 seconds), compared with default media player (~1 second) #3488
Comments
@Cyanogenbot is this the normal buffering delay? |
4 seconds seems crazy long, @ColtonIdle what bluesound speaker are you using? Additionally, would it help plugging in a LAN cable? For the error ive have some issues myself with loading files to the device too, the HA bluesound implementation seems a bit weird... Let me look into this soon |
Indeed. 4 Seconds feels like forever. I feel like it's not a LAN/WIFI issue since using the default media player in HA plays music in less than a second. While with music assistant it is sloooow. To answer your questions:
Other notes: I'm fairly technical (I do android dev) and I've also done some android dev with mDns in the past so I can be as helpful as possible here (i just dont know where to start). Very commited to making this work as this basically makes one of my automations useless with such a long delay 😭 |
@marcelveldt I suspect this has something to do with URL formatting, seeing that the error in the BluOS app resembles the same error I've encountered earlier due to some files not wanting to be played or having trouble being loaded when there was a lot of additional info added to the link after the .mp3 or .flac file extension. I mentioned this before in the discord afaik. How would this best be solved, do I need to intercept the links sent and modify these? Furthermore; BluOS does have some form of announcement ping but that's not integrated in the API that is in use yet. |
Please discuss that in discord, way easier. I don't think that these delays have anything to do with query parameters in the stream URL, which are NOT a lot at all, just the player id. |
Let me be clear about the "error" message in the screenshot from the BluOS app. That error only appears when I run the Home Assistant action of
If I instead just use the UI in music assistant to hit next song, then I do not see the BluOS app URL error. In both cases there is a 4 second delay though. I don't think my error message is all that helpful (and might actually be distracting the real issue), but on the off-chance that it is part of the problem I wanted to post it since it seemed like it could be helpful. Like I said earlier, since Default Media Player in Home Assistant plays without a 4 second delay... it seems like Music Assistant is doing something different. |
What version of Music Assistant has the issue?
2.3.6
What version of the Home Assistant Integration have you got installed?
2.3.6
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
First, sorry since I'm not sure if my version numbers are correct. I installed Music Assistant today on a HA Green. Nothing special with the setup so I should have latest stable as of today.
The instructions for getting the version number in the "Create new issue" template are wrong I think since I could not find these two paths.
Edit
Oh. "Core" means to click the little engine icon! My issue still stands that I don't know where to grab the second version number that's being asked for.
Onto the actual bug!
My journey with music assistant starts because I have a zigbee button where i want to press a button and it'll play 1 of 3 random sounds. The sounds are short (like 3 seconds long). And so the speed at which they play is sorta important. I was not able to accomplish this task in the regular media player. Media player in HA doesn't seem to allow me to create/play a playlist. Hence I found music assistant. And now I created a playlist with my local files... and i can put them on shuffle. and everything seems to work great! but I noticed that playing media (or even skipping to the next song) takes about ~4 seconds with music assistant. While default media player in HA plays my local files and skips to next file in less than a second (using my stopwatch here 😅).
How to reproduce
Add local files. Nothing else. Try to play them via web interface and see that there's a delay.
Music Providers
Filesystem (local-disk)
Player Providers
I tried using "Blusound" music provider first. and i thought maybe the issue was bluesound. but then i tried the HA Players provider (since i already have my blusound speaker there) and it still took roughly the same amount of time.
Full log output
not sure if this is the right log. i went to MA >> Settings >> Core >> Download Logfile
music-assistant.log
Additional information
I'm running on the Home Assistant green. It doesn't show up in the issue creation drop down.
Another note I've noticed (but I don't think it's related) is that this shows for about 3 seconds in the blusound app when I press next on my button/automation. When I hit next in Music Assistant dashboard then this message doesn't show. To be clear. The delay exists when I'm using my zigbee remote to kick off the automation and when I just use the Music Assistant dashboard. There seems to be no noticeable difference in delay when using MA dashboard to go to next, vs using my button. I think the difference in the error vs no error seems to be because I'm using the deafult "Media Player > Next Song" action. Maybe there's a "Music Assistant Next Song" action I don't know about?
What version of Home Assistant Core are your running
2025.1.3
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Alternative
The text was updated successfully, but these errors were encountered: