Usage
Sending live audio
You can send live audio using the
SRT
protocol.
You can use any audio codec and container,
but we recommend using Opus and
Ogg respectively.
They are free and open source, focused on quality and efficiency,
and support embedding metadata into the stream.
For example, you can use Liquidsoap for that:
liquidsoap \
'output.srt(
host="127.0.0.1",
port=10100,
%ogg(%opus),
sine()
)'
Alternatively, you can use ffmpeg to do the same:
ffmpeg \
-re \
-f lavfi \
-i sine \
-c libopus \
-f ogg \
srt://127.0.0.1:10100
Managing playlists
You can manage currently used playlist using the /playlist endpoint.
You can use the following HTTP methods:
GETto retrieve the current playlist dataPUTto update the current playlist data
For example, to change the playlist to use a different one,
you can use curl
to send a PUT request to the /playlist endpoint:
curl \
--request PUT \
--header "Content-Type: application/json" \
--data '{"id": "123e4567-e89b-12d3-a456-426614174000"}' \
http://localhost:10101/playlist