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 or to Flussonic Cloud.

To use this function, go to the Output tab in the stream settings and scroll down to the Push live video to certain URLs section. Here you can add URLs to which Flussonic will push the stream.

Flussonic push options

Flussonic supports push over the following protocols:

RTMP

This protocol is usually utilized for pushing streams to the social networks. Please refer here for more details and examples.

You can also use this protocol for pushing the stream to your Flussonic Cloud. The publish links are available in the stream settings in your account.

HTTP MPEG-TS

This protocol is suitable for sending streams to third-party video streaming services. The publish link must be provided by the service you are pushing to.

HLS

You can push streams to a CDN using this protocol; usually CDNs support it. Below is an example configuration for sending a stream to the Akamai CDN.

Example: pushing a stream to the Akamai CDN


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

Please refer here for the description of the additional parameters. If you don't need the additional parameters, you can just paste the push URL to the corresponding field in the Flussonic UI.

M4S

Use this protocol to push streams to another Flussonic server. 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.

M4S URL can be composed like that: m4s://FLUSSONIC-IP:PORT/STREAM_NAME. The receiving Flussonic must have an appropriate stream configured to receive the sent data, see here for more details.

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://example.com/router;.

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 the 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 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://example.com:1935/live/STREAM_NAME 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://example.com:1935/live/STREAM_NAME 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://example.com:1935/live/STREAM_NAME retry_timeout=10 retry_limit=5 disabled;

  • timeout (Timeout in the UI) — This option stops the pusher after specified value if source stream or publishing is stoped.

    push rtmp://example.com:1935/live/STREAM_NAME timeout=10;