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

MusicAssistant stutters / does not work while playin by URL AAC DVB-S2 radio streams. #3692

Open
OzGav opened this issue Mar 8, 2025 · 5 comments
Labels
low prio This does not have very high prio

Comments

@OzGav
Copy link
Contributor

OzGav commented Mar 8, 2025

Discussed in https://github.com/orgs/music-assistant/discussions/3682

Originally posted by MartB March 8, 2025
I'm using 2.5.0b9 and I tried out the new add-by-url source and it doesn't want to work with my TV-Headend setup.

It should supply an AAC stream received over DVB-S to MusicAssistant. If I run a slightly adjusted music-assistant ffmpeg command locally, it works perfectly.

ffmpeg -hide_banner -loglevel info -nostats -ignore_unknown -protocol_whitelist file,hls,http,https,tcp,tls,crypto,pipe,data,fd,rtp,udp,concat -reconnect 1 -reconnect_delay_max 30 -reconnect_streamed 1 -reconnect_on_network_error 1 -reconnect_on_http_error 5xx,4xx -i http://10.0.1.230:9981/stream/channelid/810612493?profile=audiopass -af aresample=resampler=soxr:precision=30:osr=44100 -ac 2 -channel_layout stereo -ar 44100 -acodec pcm_s16le -f s16le -f nut pipe: | ffplay -f nut -probesize 32 -sync ext -i pipe:

This yields

Input £0, aac, from 'http://10.0.1.230:9981/stream/channelid/810612493?profile=audiopass':
  Duration: N/A, bitrate: 128 kb/s
  Stream £0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream £0:0 -> £0:0 (aac (native) -> pcm_s16le (native))

However, on the docker container, it fails to play or stutters/gets stuck all the time.
My audio players are using Airplay and I tried changing every possible option to no avail.

Does anyone have an idea whats going on? Is this a known issue?

Edit: It seems like there is absolutely no audio queue so whenever it drops to 0 it stutters and only recovers after a while (or never). If i press pause manually and then unpause after 2 seconds it usually just works fine.

@OzGav OzGav added the enhancement Improvements of existing functionality label Mar 8, 2025
@marcelveldt
Copy link
Member

I changed the core logic a tiny bit to pre-pad some silence for non-buffered streams which should (theoretically) fix this issue.
This change will be available in the next beta (2.5.0b11) so keep an eye on that and re-test.

@marcelveldt marcelveldt moved this from NEXT to Done/verify in Music Assistant (V2) backlog Mar 10, 2025
@OzGav
Copy link
Contributor Author

OzGav commented Mar 11, 2025

@MartB please check if this has been resolved in 2.5.0b11

@MartB
Copy link

MartB commented Mar 11, 2025

@OzGav @marcelveldt You guys are fast! Thanks for this, it works fine with the streams i have.

@OzGav OzGav closed this as completed Mar 11, 2025
@MartB
Copy link

MartB commented Mar 31, 2025

Small update: @OzGav and @marcelveldt this did not end up reliably fixing the problem. If you happen to know what else could be tried feel free to re-evaluate.

@OzGav OzGav reopened this Apr 2, 2025
@OzGav OzGav moved this from Done/verify to NEXT in Music Assistant (V2) backlog Apr 2, 2025
@marcelveldt
Copy link
Member

Without a way to test/reproduce this, I can not do anything.

@OzGav OzGav added low prio This does not have very high prio and removed enhancement Improvements of existing functionality Fix to be Confirmed labels Apr 5, 2025
@OzGav OzGav moved this from NEXT to LATER in Music Assistant (V2) backlog Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low prio This does not have very high prio
Projects
Status: LATER
Development

No branches or pull requests

3 participants