Skip to content

Publishing RTMP streams

Flussonic supports publishing RTMP streams. Publishing streams via the RTMP protocol is widely used when delivering live video over the Internet, because RTMP guarantees content delivery and allows for low latency. Read more about RTMP at Using RTMP protocol.

The publication is configured in a usual way as described at Publishing Video to the Server. Please refer to The Publication from OBS Studio to Flussonic Media Server for the example of configuration.

Below are URLs that you can use to publish from a third party software to Flussonic. Read more about the features of URL when using the RTMP protocol here.

Note

Make sure to set ports in order to publish via RTMP or RTMPS to Flussonic.

Configuration procedure

To configure publishing SRT streams to Flussonic Media Server:

  1. Create a stream with input publish:// as described here.
  2. Make sure to setup an RTMP port.
  3. Publish a stream to Flussonic, for example as shown here.

Publishing to a static stream

You can use the following RTMP URLs for publishing to a static stream:

  • rtmp://FLUSSONIC-IP/stream_name. In this case, the application name should be specified as part of the stream name in Flussonic. For example, if you use stream name client15/published1, then specify in your third party software:

    • server URL: rtmp://FLUSSONIC-IP/client15
    • stream name: published1
  • rtmp://FLUSSONIC-IP/static/stream_name. In this case, in a third-party application you can specify the application name static, and Flussonic will recognize this reserved word as the application name and discard it:

    • server URL: rtmp://FLUSSONIC-IP/static
    • stream name: published

    Note

    However, if you have explicitly configured a stream with complex static/published name in Flussonic, the static part will be considered as a part of the stream name.

Publishing to a dynamic stream

Flussonic uses the following logic when publishing via RTMP to a dynamic stream:

  1. The server concatenates the application name with the path being published. Thus, the pairs rtmp://FLUSSONIC-IP/chats/my, chat-15 and rtmp://FLUSSONIC-IP/chats, my/chat-15 produce the published stream name chats/my/chat-15
  2. The program searches for the first publishing prefix this name contains. In the above examples, that would be the prefix named template.
  3. Then, all authorization interfaces and the like use the complete stream name: chats/my/chat-15.

Please note that you should not use the the reserved static part in the URL for RTMP publishing with a dynamic name. If you do so, the static part will be considered as an application name and omitted when creating a stream in Flussonic. For example:

rtmp://flussonic-ip/static/test

In this case, a stream test will be created in Flussonic. If you don't want static to be omitted, configure explicitly a stream for publishing with the static name static/test instead of using a template.

Transcoding audio

If published RTMP streams contain audio in PCMU, then you can transcode it to AAC, or specify that the audio tracks must not be transcoded:

  • output_audio=(keep|add_aac|aac). Specifies audio transcoding options. You can get the resulting audio for playback in AAC (aac), AAC+PCMU (add_aac) or leave the original codec without change (keep). By default, keep is used.
template chats {
  prefix chats;
  input publish://;
  output_audio aac;
}