SRT
The datarhei Core includes a simple SRT server for publishing and playing streams. It is not enabled by default. You have to enable it in the config in the srt section or via the corresponding environment variables.
SRT is a modern live streaming protocol with a low latency and network failure tolerance. Read more.
The SRT server supports publishing and requesting streams, similar to an RTMP server. With your SRT client you have to connect to the SRT server always in caller mode and live transmission mode.
Example:
Passphrase
If a passphrase is set in the config (or via environment variable), you have to provide the passphrase in the SRT URL. Example SRT URL with the passphrase foobarfoobar
:
StreamID
In order to define whether you want to publish or request a resource, you have to provide your intent in the streamid.
The streamid
is formatted as follows:
The resource
is the name of the stream. This can be anything. You can publish only one stream with that same name.
The mode is either request
or publish
. If you don't provide a mode, request
will be assumed. You can only request resources that are currently publishing. You can only publish resources that are not already publishing.
The token
is the one defined in the config (see srt.token). If no token is configured, you can omit the token in the streamid.
Examples
Publishing the resource 12345
with the token foobar
:
Publishing the resource 12345 with no token defined in the configuration:
Requesting the resource 12345 with no token defined in the configuration:
Requesting the resource 12345 with the token foobar
:
The whole SRT URL might look like this for the last example:
API
Via the SRT endpoint in the API you can gather statistics about the currently connected SRT clients.
Last updated