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:
- Create a stream with
input publish://
as described here. - Make sure to setup an RTMP port.
- 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 nameclient15/published1
, then specify in your third party software:- server URL:
rtmp://FLUSSONIC-IP/client15
- stream name:
published1
- server URL:
-
rtmp://FLUSSONIC-IP/static/stream_name
. In this case, in a third-party application you can specify the application namestatic
, 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, thestatic
part will be considered as a part of the stream name. - server URL:
Publishing to a dynamic stream¶
Flussonic uses the following logic when publishing via RTMP to a dynamic stream:
- The server concatenates the application name with the path being published. Thus, the pairs
rtmp://FLUSSONIC-IP/chats/my
,chat-15
andrtmp://FLUSSONIC-IP/chats
,my/chat-15
produce the published stream namechats/my/chat-15
- The program searches for the first publishing prefix this name contains. In the above examples, that would be the prefix named
template
. - 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;
}