stijnvdb88 / Snap.Net

A cross-platform control client and player for https://github.com/badaix/snapcast
GNU General Public License v3.0
121 stars 11 forks source link

Unable to broadcast #29

Closed eriqjaffe closed 3 years ago

eriqjaffe commented 3 years ago

I'm unable to get broadcasting working in Windows. Clicking the button to start a broadcast does nothing (not even a momentary state change) and running "Snap.Net.Broadcast.exe -s 1 -h 192.168.4.100 -p 4953" returns "Failed to connect. Exception: No connection could be made because the target machine actively refused it 192.168.4.100:4953" I am using a Virtual Audio Cable as shown in the readme so I can broadcast specific apps, but I get the same behavior regardless of which output I try to use.

The snapcast server appears to be listening on port 4953:

tcp 0 0 127.0.0.1:4953 0.0.0.0:* LISTEN 1361/snapserver

My snapserver.conf is as follows, and the tcp line is basically just cutting and pasting the example text:

source = pipe:///tmp/snapfifo?name=MPD
source = pipe:///tmp/snapfifo1?name=MPD Christmas
source = librespot:///usr/bin/librespot?name=Spotify&username=******e&password=*********&devicename=Snapcast&bitrate=320&nomalize=true&autoplay=false&killall=false
source = airplay://usr/bin/shairport-sync?name=Airplay&devicename=Airsnap
source = tcp://127.0.0.1?port=4953&name=snapbroadcast

Both of the MPD instances, Spotify and Airplay all work as expected. I can't figure out if I'm doing something wrong or not.

stijnvdb88 commented 3 years ago

Hi! I think I've seen this before, can you try filling in the server's lan ip instead in the conf?

source = tcp://192.168.4.100?port=4953&name=snapbroadcast

eriqjaffe commented 3 years ago

That did it, thanks!

eriqjaffe commented 3 years ago

As a note, this seems to have a side-effect of causing the snapserver service to fail on boot. Manually starting the service after bootup works as expected. Certainly not a show stopper, just something I have to remember.

stijnvdb88 commented 3 years ago

This definitely shouldn't cause snapserver to fail like that - is it possible the service is trying to start before your LAN connection is up? It might be worth opening an issue at https://github.com/badaix/snapcast if the problem persists

eriqjaffe commented 3 years ago

After playing around with it a bit, this also seems to get the job done without any errors on boot.

source = tcp://0.0.0.0?port=4953&name=snapbroadcast

stijnvdb88 commented 3 years ago

Thanks for the update - that's a much better solution! I've updated the readme to suggest this instead