-
Notifications
You must be signed in to change notification settings - Fork 456
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
Add ability to set different sample rate for different streams #1248
Comments
You can add |
@badaix i tried to set in the stream settings 2 different sample rates and I pointed them to the same Fifo and the sound doesn't work in want of them it just crackles randomly |
Seems that I misunderstood you, my understanding was that you can capture plexamp's audio and forward it into two different fifos, using different formats (e.g.
If your browser based player is Snapweb, you can use Snapweb v0.7.50, which does support 96k/24/2 PCM and Flac. The player part of Snapweb was (and still is) just a proof of concept when WebSocket support was added to Snapcast, hacked on a rainy vacation day, without deeper knowledge of JS or TS. Another solution would be #1228 |
I tried a few things to try and fix the issue wihout success. I created 2 different pipewire fifos with the different sample rates and used a combine sink to playback the same audio from plex into both. I set the config like before without success. Command for the fifos Server Config
When playing back if i use the normal stream it works without issues but if i use the other hires stream it sounds loud and distorted. Here is a recording of the issue Watching the server log during playback the on resync function gets called continuously.
I could also notice that when i mismatchd the sample rates in the normal stream (snapserver was 44100 and pipewire was 48000) the function would get called like this but after matching them correctly it stopped calling it for the other stream. I tried playing back both 44/16 and 96/24 from plexamp with the same issue |
I'm running into the same issue. I've got a server setup as such:
and run the following with a raw PCM file:
and all I hear is static. I've confirmed that the file is proper raw PCM by importing raw data into Audacity and playing with the following settings: I'm running version 0.29.0 of snapserver. It works fine with 44100:16:2 data from other sources on a different pipe, so it's not an issue with my setup. |
@chicco-carone did you ever resolve this? |
I just looked at the server logs, and am seeing:
So it seems that it's ignoring the bit depth parameter of 24 and setting it to 16 instead. When I cat a 48000:16:2 file through the pipe, it's recognizable, but plays too fast and has glitchy sounds. |
I'm using the Android client to monitor by the way. Is it limited to certain sample rates and bit depths? |
Further detail: If |
@erahhal unfortunately not even if I try to use 48/24 and my 2 sources are 48/16 and 48/24 one of them sounds distorted every time |
@erahhal I think that the android client should have the same limitations as snapweb so 96k/24. For me i tried with the linux client (which doesn't have limitations from what i know and it still doesn't work) |
@badaix After some trial and error i found a way i which it can work without issues but with a certaing bug. Edit: The delay after connecting another resampled client is only present in v0.28 and not on the latest one (didn't notice that i hadn't updated my server) but the volume issue is also present in v0.29 |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
I stream all of my music from plexamp in flac lossless and have multiple players that could support different sample rates and i would like to stream a different rate in a different stream.
Describe the solution you'd like
A clear and concise description of what you want to happen.
The ability to set the sample rate per stream so it can exist a plexamp lossless with 96k/24 sample rate and a normal plexamp stream with normal quality. The main issue is that browser players don't support higher sample rates and don't support resampling so setting the main stream to a higher rate would make browser client useless for playback
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Using 44/16 which is supported by everything i tried,
Additional context
Add any other context or screenshots about the feature request here.
I don't think the server would need to resample since with pipewire (which i use to capture the audio for my server and send into a fifo) can resample the audio for multiple sources with enough cpu and it can create 2 fifos which can reproduce sound at the same time. An additional bonus would be to keep the client in the same group for group volume and just change the source of the necessary clients
The text was updated successfully, but these errors were encountered: