Hello,
I would like to be able to add, via the Snapcast API and the Stream.AddStream method, the URL of a stream.
This could easily read WebRadio from a given url (http://129.122.92.10:88/broadwavehigh.mp3 for example) directly thanks to the API, indicating the URL of the WebRadio in the JSON frame.
This would allow, thanks to the Stream.RemoveStream method to easily add and remove WebRadio via the API.
Is it possible ?
If so, what parameters should we indicate in the streamUri field?
Thank you !
I've never used the Stream.AddStream and Stream.RemoveStream methods, but with help of the player setup guide, this seems to work quite well:
Add in snapserver.conf in the [stream] section (this should also be possible using the Stream RPC command):
stream = process:///usr/bin/mpv?name=Webradio&sampleformat=48000:16:2¶ms=http://129.122.92.10:88/broadwavehigh.mp3 --no-terminal --audio-display=no --audio-channels=stereo --audio-samplerate=48000 --audio-format=s16 --ao=pcm:file=/dev/stdout
Of course, you need to have mpv installed.
interpreting the :+1: reaction as the problem is solved
Most helpful comment
I've never used the
Stream.AddStreamandStream.RemoveStreammethods, but with help of the player setup guide, this seems to work quite well:Add in
snapserver.confin the[stream]section (this should also be possible using theStreamRPC command):Of course, you need to have
mpvinstalled.