A trivial HTTP server to allow Sonos to play YouTube live streams.
Note: it does not currently work with non-streaming/regular videos, though it may in the future.
Works well running on devices like a NAS or even Raspberry PI
Recommended
$ sudo ./script/update-docker
...
If your setup dictates
$ ./script/bootstram
$ ./script/run
In the Sonos apps:
- "Browse"
- "TuneIn"
- "My Radio Stations"
- "..."
- "Add New Radio Station"
- "Streaming URL"
- Grab the ID portion of the URL you'd like to stream, in the case of
https://www.youtube.com/watch?v=jfKfPfyJRdk
that would bejfKfPfyJRdk
http://<fqdn-or-ip-of-host-running-the-server>:9182/<id-from-above>
, e.g.http://my-nas.lan:9182/jfKfPfyJRdk
- Grab the ID portion of the URL you'd like to stream, in the case of
- "Station Name"
- Whatever you would like to call it, probably just a copy-n-paste of the stream's title
- "OK"
- "Streaming URL"
You should now be able to play the live stream on your Sonos devices.
One of the ways Youtube serves their videos an HLS Manifest, a .m3u8
that happens to be supported by Sonos. However these URLs change over time so you can't just stick one into the "Streaming URL" field of a Sonos radio station. This simple server fetches the current data for the video and thend does a 302 redirect to the current URL. That's it.