Skip to content

Publishing SRT streams

Flussonic supports publishing SRT streams. Publishing streams via the SRT protocol is widely used when delivering video over the Internet or satellite network, because SRT guarantees low latency while offering some content delivery guarantees. Read more about SRT at Using SRT protocol.

Configuration procedure

To configure publishing SRT streams to Flussonic Media Server:

  1. Create a stream with input publish:// as described here.

  2. Choose your way to specify SRT port. Below you will find examples of configuration and examples of URLs for the available ways.

  3. Publish a stream to Flussonic, for example as shown here.

Examples of URLs and configurations

Global port

Specify the port in the srt PORT_NUMBER parameter:


srt 9998;
stream mysrt {
  input publish://;
}

To publish the stream use the following URL:

srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME,m=publish

, where:

  • FLUSSONIC-IP is an IP address of your Flussonic server.
  • SRT_PORT is an SRT port.
  • streamid is a string formatted as described here
  • r=STREAM_NAME is a stream name.
  • m=publish is a publishing mode.

This same URL can be copied in the UI, on the Input tab of the stream profile:

SRT URL for publishing

Separate global options for publishing and playing

You can allow publishing only for SRT streams. Specify the port in the srt_publish { port PORT_NUMBER; } setting:


srt_publish {
  port 9998;
}
stream mysrt {
  input publish://;
}

Use the following link to publish the stream:

srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME

, where:

  • FLUSSONIC-IP is an IP address of your Flussonic server.
  • SRT_PORT is an SRT port.
  • r=STREAM_NAME is a stream name.

Note

m=publish is not required as only publishing is allowed over specified port.

Separate port for a stream

You can allow publishing and playing a stream or a group of streams over single port. Specify the port in the srt PORT_NUMBER parameter in a stream or template settings:


stream mysrt {
  input publish://;
  srt 9998;
}

To publish the stream use the following link:

srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::m=publish

, where:

  • FLUSSONIC-IP is an IP address of your Flussonic server.
  • SRT_PORT is an SRT port.
  • m=publish is a publishing mode.

Separate ports for publishing and playing a stream

You can allow publishing only for a stream or group of streams over a single port. This way only publishing is allowed for an SRT stream or a group of SRT streams (local-level setting).

Specify the port in the srt_publish { port PORT_NUMBER; } in a stream or a template settings:


stream mysrt {
  input publish://;
  srt_publish {
  port 9998;
 }
}

To publish the stream use the following URL:

srt://FLUSSONIC-IP:SRT_PORT

, where

  • FLUSSONIC-IP is an IP address of your Flussonic server.
  • SRT_PORT is an SRT port.

Warning

If you apply both global-level and local-level settings, the latter take precedence over the former ones.

Flussonic allows you to manage SRT publishing by setting some parameters.

Additional parameters for SRT publishing

The list of parameters you can set for srt_publish aside from port to manage SRT publication is given here.

Flussonic also carries such information as agent (Flussonic version) and session ID in the URL. You do not have to specify them manually.

Let's see how to use the parameters to manage the SRT publishing. For example, let's secure an SRT port.

Securing a global port

To secure the global port, set the password in the passphrase parameter of the srt_publish {} setting:


srt_publish {
  port 9998;
  passphrase 0123456789;
}
stream pub {
  input publish://;
}

Parameters are specified in the URL query string and it looks like so:

srt://FLUSSONIC-IP:SRT_PORT?passphrase=PASSWORD&streamid=#!::r=STREAM_NAME

In our case it looks as follows:

srt://FLUSSONIC-IP:9998?passphrase=0123456789&streamid=#!::r=pub,m=publish

Securing a stream port

To secure the port in a stream or a template settings, set the password in the passphrase parameter of the srt_publish {} setting:


stream pub {
  input publish://;
  srt_publish {
    port 9998;
    passphrase 0123456789;
  }
}

Parameters are specified in the URL query string:

srt://FLUSSONIC-IP:SRT_PORT?passphrase=PASSWORD

For our example it looks as follows:

srt://FLUSSONIC-IP:9997?passphrase=0123456789