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

Rewinding or fast-forwarding a track causes restarts or errors #3454

Open
1 task done
jbega opened this issue Jan 15, 2025 · 16 comments
Open
1 task done

Rewinding or fast-forwarding a track causes restarts or errors #3454

jbega opened this issue Jan 15, 2025 · 16 comments
Assignees

Comments

@jbega
Copy link

jbega commented Jan 15, 2025

What version of Music Assistant has the issue?

2.3.6

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

2025.1.2

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

  • Yes

The problem

I've noticed that I can't skip forward or backward within a track in soundcloud, sometimes work but normally, it resets the track . I'm wondering if this has been reported as a bug yet. I've tried searching for it but maybe I didn't use the correct keywords.

Tidal and fileshare works good

How to reproduce

I play a track on SoundCloud -> I scrub the progress bar backwards or forwards -> the track starts from the beginning

Music Providers

Souncloud

Player Providers

Yamaha (Ha integration)
Google Nest (Ha integration)
Snapcast

Full log output

log with 3 situations in this order:
move forward -> stop an clear queque
move forward -> work
move forward - Restart track
info.log

Additional information

I am using Music Assistant as an addon to HAOS on a Intel NUC. I have test on yamaha speakers and google nest (ha integration) and snapcast devices

I have tested this functionality with other providers (Tidal/fileshare) and it works correctly.

I have also tried clean, new installations from scratch, and SoundCloud continues to exhibit the same behavior.

What version of Home Assistant Core are your running

2025.1.2

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)

@jbega jbega added the triage label Jan 15, 2025
@OzGav
Copy link
Contributor

OzGav commented Jan 15, 2025

I'm sorry but issues aren't the place to ask questions. They are for reporting confirmed faults with MA and must include all of the information in the troubleshooting docs and the issue template. Why? Because we use these to track problems and prioritise them for rectification. This is hard enough with legitimate problems. So if you have a question then ask in the Discussions area or on Discord.

@OzGav OzGav closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
@jbega
Copy link
Author

jbega commented Jan 15, 2025

@OzGav Thank you for your response. This is not a query (as it might have been on Discord), but rather a report.

I have tested this functionality with other providers (Tidal/fileshare) and it works correctly.

I have also tried clean, new installations from scratch, and SoundCloud continues to exhibit the same behavior.

I apologize if any documentation or information is missing; I am not accustomed to reporting issues .

@jbega
Copy link
Author

jbega commented Jan 15, 2025

the same behavior on snapcast players

@OzGav
Copy link
Contributor

OzGav commented Jan 15, 2025

You ticked the box to say you read the troubleshooting docs which has a list at the bottom which you are to "include the following in ALL reports"

I don't see how this isn't a query when you say

I'm wondering if this has been reported as a bug yet. I've tried searching for it but maybe I didn't use the correct keywords.

Here is a report which is similar but more importantly is good #3274

edit: note the desciptive title as well.

edit2: If you edit your original post with all of the info then I can reopen this. The devs are super busy they don't have time to read through 20 posts of me trying to get all the info for a report hence why we ask for it upfront in the docs and issue template.

@jbega
Copy link
Author

jbega commented Jan 15, 2025

I'll complete it with
-Full log output
-Additional information

@jbega jbega changed the title Progress track Rewinding or fast-forwarding a track causes restarts or errors Jan 15, 2025
@jbega
Copy link
Author

jbega commented Jan 15, 2025

@OzGav

edit2: If you edit your original post with all of the info then I can reopen this. The devs are super busy they don't have time to read through 20 posts of me trying to get all the info for a report hence why we ask for it upfront in the docs and issue template.

Done, I hope that's enough.

@OzGav OzGav reopened this Jan 15, 2025
@OzGav
Copy link
Contributor

OzGav commented Jan 15, 2025

@robsonke what do you think?

@robsonke
Copy link

I have no clue but I noticed this behaviour too. I thought it had something to do with Sonos but later all worked fine using Spotify as source. I'll try to reproduce it, not having clear errors in the log doesn't make it easier.

@jbega
Copy link
Author

jbega commented Jan 15, 2025

I have no clue but I noticed this behaviour too. I thought it had something to do with Sonos but later all worked fine using Spotify as source. I'll try to reproduce it, not having clear errors in the log doesn't make it easier.

It doesn't happen with Tidal or FileShare (nor Spotify according to what I read), it seems to be only Soundcloud. Yamaha, years ago it was used like Sonos for some things (and it would make sense if it fails in one it fails in the other) but they have nothing in common with a Nest or a mobile with Snapcast

If there's anything I can do to help

@robsonke
Copy link

@jbega, I'm able to reproduce it in my normal MA instance but I can't find any related error (like it just silently happens). Though not yet in my local development environment.
If you are able to get the actual error somehow, that would really help.

@jbega
Copy link
Author

jbega commented Jan 22, 2025

@jbega, I'm able to reproduce it in my normal MA instance but I can't find any related error (like it just silently happens). Though not yet in my local development environment. If you are able to get the actual error somehow, that would really help.

I've spent the whole weekend trying to force it to give me an error, but I can't see any pattern or cause... sometimes it works fine, sometimes it's impossible, sometimes it's one device, sometimes it's another...

Sometimes I can pause it, other times it clears the queue, other times it starts again...

2025-01-22 12:14:56.614 DEBUG (MainThread) [ffmpeg.12206] Detected (input) content type: mp3 (mp3,)
2025-01-22 12:15:17.862 DEBUG (MainThread) [music_assistant.webserver] Handling command players/cmd/play_pause
2025-01-22 12:15:17.866 DEBUG (MainThread) [music_assistant.players] Handling command cmd_pause for player Sonido Estudio
2025-01-22 12:15:17.866 INFO (MainThread) [music_assistant.players] Player Sonido Estudio does not support pause, using STOP instead
2025-01-22 12:15:17.866 DEBUG (MainThread) [music_assistant.players] Handling command cmd_stop for player Sonido Estudio
2025-01-22 12:15:17.899 DEBUG (MainThread) [aiohttp.server] Ignored premature client disconnection 2
2025-01-22 12:15:17.900 DEBUG (MainThread) [aiohttp.server] Ignored premature client disconnection.
2025-01-22 12:15:17.928 DEBUG (MainThread) [music_assistant.audio.media_stream] stream aborted (with code 255) for soundcloud--gwW5r287://track/1205398642 - seconds streamed: 39.0

*Player Sonido Estudio does not support pause, using STOP instead
But not true

Sometimes I can fast forward or rewind, other times it clears the queue, other times it starts again

2025-01-22 12:18:46.405 DEBUG (MainThread) [music_assistant.webserver] Handling command players/cmd/seek
2025-01-22 12:18:46.412 DEBUG (MainThread) [music_assistant.audio] Getting streamdetails for soundcloud://track/1205398642
2025-01-22 12:18:46.667 DEBUG (MainThread) [music_assistant.audio] retrieved streamdetails for soundcloud://track/1205398642 in 254 milliseconds
2025-01-22 12:18:46.770 DEBUG (MainThread) [music_assistant.players] Handling command play_media for player Sonido Estudio
2025-01-22 12:18:46.813 DEBUG (MainThread) [aiohttp.server] Ignored premature client disconnection 2
2025-01-22 12:18:46.813 DEBUG (MainThread) [aiohttp.server] Ignored premature client disconnection.
2025-01-22 12:18:46.842 DEBUG (MainThread) [music_assistant.streams] Start serving Queue flow audio stream for Sonido Estudio
2025-01-22 12:18:46.853 DEBUG (MainThread) [music_assistant.audio.media_stream] stream aborted (with code 255) for soundcloud--gwW5r287://track/1205398642 - seconds streamed: 21.0
2025-01-22 12:18:46.860 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Sonido Estudio - crossfade: False
2025-01-22 12:18:46.861 DEBUG (MainThread) [music_assistant.streams] Start Streaming queue track: soundcloud--gwW5r287://track/1205398642 (YOUPHORIA - 2021 FAVORITES MIX) for queue Sonido Estudio
2025-01-22 12:18:47.301 DEBUG (MainThread) [music_assistant.audio.media_stream] start media stream for: soundcloud--gwW5r287://track/1205398642
2025-01-22 12:18:47.876 DEBUG (MainThread) [ffmpeg.12254] Detected (input) content type: mp3 (mp3,)

****** when work, according to the log, it seems that when it receives a seek command, instead of actually seeking, it stops and restarts playback from a different point, doesn't it?

@jbega
Copy link
Author

jbega commented Jan 23, 2025

@jbega, I'm able to reproduce it in my normal MA instance but I can't find any related error (like it just silently happens). Though not yet in my local development environment. If you are able to get the actual error somehow, that would really help.

@robsonke
Interesting...

Playing SoundCloud through Ma

-If I pause from the original player in Ha (not the one created by Ma), it pauses and if I press play again, it continues from where it was. (no lines on Ma log)

-If I pause using the physical button, it pauses and if I press play again, it continues from where it was. (no lines on Ma log)

-If I pause it through the player's API > http://xxx.xx.xx.xx/YamahaExtendedControl/v1/netusb/setPlayback?playback=pause > it pauses and if I press play again, it continues from where it was. (no lines on Ma log)

*I know it's best to use Ma's media players, I'm just providing this information in case it's useful. If it's irrelevant, please ignore it.

**I also know that that issue was opened specifically for the seek function and not for pause, but the Yamaha integration doesn't support seeking and I can't perform this action through the API either (so I can only test using play/pause). Since it seems like I'm observing the same behavior with both actions, I'm sharing this information

@robsonke
Copy link

No luck yet in finding any reasons from my side. I tested the stream urls that MA is using in several tools (like VLC) and there I can just step through the song.

I'll first try to fix my local playback as sonos and airplay don't work in my local dev env.

@OzGav OzGav added the Queueing label Jan 27, 2025
@Vaskyy
Copy link

Vaskyy commented Feb 1, 2025

I can also report this as a problem/bug.
I am not able to scroll tru the song in soundcloud.
Also its always restarting the Track when a player joins or leaves the group, since the Track is then autopaused to sync as far as i unterstand.

I'm using shairport-sync players and everything works fine with all other music providers.
Just soundcloud cannot scroll without losing progress.

Updated today to:
2.4.0b22

Still same behaivior.

@Vaskyy
Copy link

Vaskyy commented Feb 1, 2025

I've looked into debug logs and library://track/900 for -2254 seconds - fully_played: False - progress: 0 seems kinda weird to me.
And stream cancelled (with code 255) for soundcloud://track/1861260573 - seconds streamed: 51.0 is suspicious too.

2025-02-01 11:12:31.778 DEBUG (MainThread) [music_assistant.webserver] Handling command players/cmd/seek
2025-02-01 11:12:31.782 DEBUG (MainThread) [music_assistant.audio] Getting streamdetails for library://track/900
2025-02-01 11:12:31.792 DEBUG (MainThread) [music_assistant.audio] retrieved streamdetails for library://track/900 in 10 milliseconds
2025-02-01 11:12:31.894 DEBUG (MainThread) [music_assistant.players] Handling command play_media for player Airplay
2025-02-01 11:12:32.151 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] End of stream reached
2025-02-01 11:12:32.160 DEBUG (MainThread) [music_assistant.player_queues] PlayerQueue Airplay played item library://track/900 for -2254 seconds - fully_played: False - progress: 0
2025-02-01 11:12:32.173 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (5945): /ctrl-int/1/getproperty?properties=dmcp.volume --
2025-02-01 11:12:32.227 DEBUG (MainThread) [music_assistant.audio.media_stream] stream cancelled (with code 255) for soundcloud://track/1861260573 - seconds streamed: 51.0
2025-02-01 11:12:33.176 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (5945): /ctrl-int/1/getproperty?properties=dmcp.volume --
2025-02-01 11:12:33.602 DEBUG (MainThread) [ffmpeg.83] [out#0/s16le @ 0x7f9eb54400] Task finished with error code: -32 (Broken pipe)
2025-02-01 11:12:33.618 DEBUG (MainThread) [music_assistant.audio] Generated ffmpeg params for player ap2ccf67288915: ['equalizer=frequency=100:width=200:width_type=h:gain=3.0', 'alimiter=limit=-2dB:level=false:asc=true']
2025-02-01 11:12:33.634 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.633] main:447 Binding to 0.0.0.0 [(null)] with mask 0x00000000
2025-02-01 11:12:33.634 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.633] main:483 Listening for commands on named pipe /tmp/raop-2952
2025-02-01 11:12:33.637 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.636] raopcl_create:715 [0x7f9f660000]: using ALAC coding
2025-02-01 11:12:33.638 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.637] main:529 Connecting to player: 2CCF67288915@Vaskyy-Five._raop._tcp.local. (172.17.0.1:7000)
2025-02-01 11:12:33.739 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.738] raopcl_connect:1003 [0x7f9f660000]: local interface 172.17.0.1
2025-02-01 11:12:33.775 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.774] raopcl_connect:1087 [0x7f9f660000]: setting volume as part of connect 0.00
2025-02-01 11:12:33.779 DEBUG (MainThread) [music_assistant.airplay.ap2ccf67288915] [11:12:33.776] main:538 connected to 172.17.0.1 on port 7000, player latency is 1250 ms
2025-02-01 11:12:33.790 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Airplay - crossfade: False
2025-02-01 11:12:33.790 INFO (MainThread) [music_assistant.streams] Start Streaming queue track: soundcloud://track/1861260573 (Maria Theresia von Eberg I MTvE - Prosecco, Ramazotti & ein Aperol... auf der Extravaganza - Fusion Festival 2024) for queue Airplay
2025-02-01 11:12:33.790 DEBUG (MainThread) [music_assistant.player_queues] PlayerQueue Airplay loaded item cc6c8ead952d4ec884b8fea6b7a42b17 in buffer
2025-02-01 11:12:34.179 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (2952): /ctrl-int/1/getproperty?properties=dmcp.volume --
2025-02-01 11:12:34.226 DEBUG (MainThread) [music_assistant.audio.media_stream] Started media stream for soundcloud://track/1861260573 - using streamtype: hls - volume normalization: measurement_only - pcm format: f32le - ffmpeg PID: 113
2025-02-01 11:12:35.181 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (2952): /ctrl-int/1/getproperty?properties=dmcp.volume --
2025-02-01 11:12:35.361 DEBUG (MainThread) [ffmpeg.113] Detected (input) content type: mp3 (mp3)
2025-02-01 11:12:36.183 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (2952): /ctrl-int/1/getproperty?properties=dmcp.volume --
2025-02-01 11:12:37.185 DEBUG (MainThread) [music_assistant.airplay] DACP request for 2CCF67288915@Vaskyy-Five._raop._tcp.local. (2952): /ctrl-int/1/getproperty?properties=dmcp.volume --

@Vaskyy
Copy link

Vaskyy commented Feb 1, 2025

Actually right now, its not only Soundcloud. Its also Apple Music.
It just restarts the Track, regardless of where i seek (MA in app, HA media player).

Also the progress is not translated. The restarted Track "thinks" its still at the right position, or the position i entered.

Image

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