I found several issues when I tried to broadcast Youtube audios to Sonos.
The main issue is that the generated url by SWYH is sometimes incorrect.
----------------TL;DR-----------------
I have a VirtualBox installed on my laptop so I have more than 1 active ethernet interface (for non-technical people, it’s basically a network adapter…).
Apparently when generating the HTTP stream url, SWYH doesn’t pick the actual IP address it’s using and use random one (or first one?) it gets from the windows system. Thanks for all the efforts but… sorry to say that… it is causing trouble for some people - someone may have more than 1 adapter enabled but hmm SWYH could only bind to one of the addresses.
Another minor issue is that the suffix of the audio file never changes. Even if I choose stream with PCM/L16, it still gives a .mp3 suffix.
So I manually assembled the url by looking at my adapter’s ip, with fixed port, with firewalls shutdown and it finally works for me.
--------------TL;DR---------------------
If you are a user:
Not encoded correctly - I guess what’s happening is Sonos just got an error response and it tries to play it as a mp3, which causes error. If you meet this response it means you are not using the right url.
- Use start -> cmd -> ipconfig to check all interfaces you have. Try the IPs looks like ‘192.168.0.123’ (if you are behind a router), instead of the one given by SWYH until this issue is fixed.
- Use ‘fixed port’ in SWYH Settings. Use mp3 first.
- Add Radio station to Sonos controller, you should add something like “http://192.168.0.123:15901/stream/swyh.mp3”
- Shutdown your firewalls. You can always turn them back on later and see if it’s their fault.
- You can test the url from another device, which may be faster than changing the radio station in Sonos. Just use your iPhone or Android device, enter the url you think which might work and see if it could stream.
To SWYH Developers,
- The HTTP Live Stream option should give the IP address SWYH service bound to, not a random one from the host ip list.
- The suffix should change accordingly.
- Thanks a lot for your excellent work!