Skip to content

Pushing a Stream to Other Servers

How to copy (push) a stream to other servers

You can tell Flussonic to copy a stream to other servers by using the push directive. For example, you can push a stream to a CDN.

stream breakingnews {
  input publish://;
  push rtmp://localhost:1935/static/breakingnews1;
  push tshttp://localhost:80/breakingnews2/mpegts;
  push hls://cdn3/breakingnews3 disabled;

The push directive supports the RTMP, HTTP MPEG-TS, HLS, and M4S protocols.

To push streams to another Flussonic server, use our M4S video protocol. This is a persistent protocol that does not create delays and is used to transfer data from Flussonic to Flussonic for further delivery via WebRTC/RTMP.

Pushing with a 302 redirect

When publishing via m4s:// Flussonic will understand HTTP 302 and will follow to the specified address. This means that you can specify not only the Flussonic server address, but also your own backend for choosing a publishing location. For example, m4s://;.

How to manage pushed streams

If the stream is configured to be pushed to an URL that has become offline, then Flussonic by default endlessly retries to push the stream to this URL.

Flussonic can monitor streams that it sends to other servers and collect statistics on unsuccessful sending attempts. A visual display of push statuses in the UI will help you take action — stop (pause) offline streams or limit attempts to send them.

Push statuses are shown as indicators on the main page in the Streams list and in stream settings on the Output tab (Push live video to certain URLs). The reason for stopping the pushing process can be found in the logs.

Flussonic push options

To control how streams are sent via push and prevent CPU overuse if there are many offline streams, use the options:

  • retry_timeout (Retry timeout in the UI) — how often Flussonic should retry attempts to send the stream. It is an interval in seconds, 5 seconds by default.

    You can increase Retry timeout to reduce server load.

    push rtmp:// retry_timeout=10;

  • retry_limit (Limit in the UI) — how many times in a row Flussonic should retry attempts to send a stream.

    You can set Limit to limit the number of attempts to send a stream. After this limit is reached, the stream will have the 'error' status.

    push rtmp:// retry_timeout=10 retry_limit=5;

  • disabled (Enable turned off in the UI) — disable sending the stream.

    Temporary disabling, or pausing, an offline stream eliminates the necessity to remove it from the the configuration in order to stop Flussonic trying to push it. In this way, the URL and other settings of a disabled stream remain in Flussonic.

    push rtmp:// retry_timeout=10 retry_limit=5 disabled;

  • timeout — This option stops the pusher after specified value if source stream or publishing is stoped.

    push rtmp:// timeout=10;

Example: pushing a stream to the Akamai CDN

stream breakingnews {
  input publish://;
  segment_count 10;
  segment_duration 10;
  push hls://post.[HOSTNAME][STREAM_ID]/[STREAM_NAME]/;