Usage
Ping
You can check the status of the service
by sending a GET request to the /ping endpoint.
The service should respond with a 204 No Content status code.
For example, you can use curl to do that:
curl --request GET http://localhost:10101/ping
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 ffmpeg for that:
ffmpeg \
-re \
-f lavfi \
-i sine \
-c libopus \
-f ogg \
-ar 48000 \
-b:a 256k \
-metadata title=test \
srt://127.0.0.1:10100
Managing playlists
You can manage the currently used playlist using the /playlist endpoint.
You can use the following HTTP methods:
GETto retrieve the current playlistPUTto update the current playlistDELETEto remove the current playlist
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
OpenAPI
You can view the OpenAPI
documentation made with Scalar
by navigating to the /openapi endpoint in your browser.
You can also download the specification in YAML format
by sending a GET request to the /openapi/openapi.yaml endpoint.
For example, you can use curl to do that:
curl --request GET http://localhost:10101/openapi/openapi.yaml