Skip to content

Accept publication over SRT

You can easily publish a stream via SRT to any server with Flussonic Media Server.

Note

If you have many servers and the number of active publishing sessions is unknown, use a more complex solution: SRT publishing from many authors.

Configuration in the UI

To configure publishing SRT streams to Flussonic Media Server:

  1. Create a stream with empty Source URL, then set Publication to Enabled in the profile of that stream.
  2. Specify SRT (dedicated publish port) and passphrase for publishing to this stream.
  3. Save the settings. After that, a URL will be shown in SRT (DEDICATED PUBLISH PORT). Use it for publishing.

    SRT URL for publishing

Note

The above instruction is for setting a separate port for publishing via SRT to a specific stream. If you want to use the global port for publishing via SRT to all streams, use the SRT (SHARED) link and set the port on the Config tab. Learn more about ports for SRT at SRT ports.

Testing the publication

Publish a stream to Flussonic, for example like this:

ffmpeg -re -i /opt/flussonic/priv/bunny.mp4 -c copy -y -f mpegts 'srt://localhost:9050?passphrase=mytopsecret'

Settings in the config file

You can configure the stream for publishing in the config file. Depending on way to specify SRT port, the settings are different:

  • Global port (SRT (SHARED) in the UI)
srt_publish {
  port 9998;
  passphrase 0123456789;
}
stream pub {
  input publish://;
}

Use the URL for publishing:

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

  • Separate global option for publishing
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

  • 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 port for publishing a stream
stream pub {
  input publish://;
  srt_publish {
    port 9998;
    passphrase 0123456789;
  }
}

URL for publishing:

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

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.