owntone-server icon indicating copy to clipboard operation
owntone-server copied to clipboard

feature request: Snapcast support

Open amitkeret opened this issue 4 years ago • 7 comments

forked-daapd has an impressive list of supported clients. I started testing/using it due to its support for Chromecast devices, which I absolutely ❤️

I was previously using Snapcast for similar functionality, and what I especially like about it is Snapcast's Android app, which connect to the snapserver and allow to instantly add another "node" to the system. Is it possible to support streaming/broadcasting to Snapcast clients? I'm not sure what that would entail, but I imagine FD using another port to broadcast its stream, to which any snapclient nodes could connect.

amitkeret avatar Jan 03 '21 12:01 amitkeret

Yes, I suppose that would be possible especially since Snapcast seems to be open source. However, since I have no use for it myself and thus would have a hard time maintaining it, it would need to be done by someone who can do all that.

ejurgensen avatar Jan 03 '21 15:01 ejurgensen

hey, I am trying to use snapcast to stream music from a record player using HiFiBerry DAC+ ADC and Pi to my owntone server using snapcast.

On the pi / DAC side, I have configured snapserver and got the DAC to pipe to /tmp/snapfifo. On the owntone side I am trying to use snapclient to pipe a stream to owntone's library folder, an have owntone auto play it when a stream is present.

Using the below snapclient -player file > pipe somehow works.

snapclient --host testvm.local --logsink null --player file | tail -n +2 > /srv/music/phono

It's still somewhat buggy and I'm trying to find a better way to get snapclient to pipe a stream Any suggestions?

nadigo avatar Dec 06 '21 17:12 nadigo

hey, I am trying to use snapcast to stream music from a record player using HiFiBerry DAC+ ADC and Pi to my owntone server using snapcast.

On the pi / DAC side, I have configured snapserver and got the DAC to pipe to /tmp/snapfifo. On the owntone side I am trying to use snapclient to pipe a stream to owntone's library folder, an have owntone auto play it when a stream is present.

Using the below snapclient -player file > pipe somehow works.

snapclient --host testvm.local --logsink null --player file | tail -n +2 > /srv/music/phono

It's still somewhat buggy and I'm trying to find a better way to get snapclient to pipe a stream Any suggestions?

@nadigo If you find a solution please let us know. I'm also trying to bridge Snapcast and Owntone.

jpbaril avatar Feb 18 '22 21:02 jpbaril

I have successfully used owntone with snapcast by enabling the fifo output in owntonw.conf and setting it to /tmp/snapfifo. Then I set the snapserver steam to the same file.

The sound quality is horrible however. Can we bump up the fifo bitrate? I use 48000 when I do this in mopidy.

TacoDog311 avatar Mar 06 '24 01:03 TacoDog311

OwnTone outputs 44100/16/2 (and that's hardcoded) so if snapserver expects 48000 the quality will indeed be horrible. Do you have a link to snapserver documentation of the fifo input?

ejurgensen avatar Mar 06 '24 21:03 ejurgensen

Found the docs, I see they say to configure snapserver with sampleformat=44100:16:2. Did you do that?

ejurgensen avatar Mar 06 '24 21:03 ejurgensen

you are absolutely right.

this entry in owntone.conf:

fifo {
        nickname = "fifo"
        path = "/tmp/owntonefifo"
}

and this entry in snapserver.conf


[stream]
source = pipe:///tmp/snapfifo?name=modipy
stream = pipe:///tmp/owntonefifo?name=owntone&sampleformat=44100:16:2&codec=flac

lets me stream both services (I'm still deciding which I want to use) to any snapclient with clear audio.

Thank you!

TacoDog311 avatar Mar 07 '24 05:03 TacoDog311