SRT (Secure Reliable Protocol) has a lot of features that make it a reliable replacement for other delivery protocols like RTMP or RTSP. One of the features that RTMP or RTSP users enjoy is the ability to pull media streams from the source media server by their application name and stream name via single port. This gives a lot of flexibility for both source and recipient parties.
Nimble Streamer now brings that convenience of RTMP to SRT.
When providing output SRT streams via Listen mode, Nimble allows the following setup.
- Live streams input is set up from any protocol like SRT, RTMP, NDI, MPEGTS UDP, streams from Live Transcoder or any other described here. The respective output streams are available for further usage as described in our tutorials.
- SRT output with Listen mode is set with Use stream ID option for sources, as shown below.
- The receiving party uses SRT streamid parameter defined as "appname/streamname" just like in RTMP pulled streams.
- Nimble generates the SRT output using the live stream which was requested in streamid parameter.
So having just one IP address and one port, Nimble can serve multiple output streams just as the receivers are requesting.
This feature is part of Nimble Addenda package and it requires active Addenda license registered on Nimble server instance.
Setup process
Before moving forward, you need to enable this parameter in nimble.conf and restart Nimble instance:
srt_multipoint_listener_enabled = true
Read this page for more details about changing parameters of Nimble Streamer.
We assume you already have some incoming stream to process. E.g. you have some RTMP encoder publishing content into Nimble Streamer and it's available in Nimble via "live" application name and the incoming stream as "output" stream name.
To set up SRT part, go to Live streams settings menu, choose UDP streaming tab.
Just like for regular SRT output, click the Add SRT setting button.
In the new dialog, choose Listen mode - as this feature is working only in Listen - and specify local IP and port. We recommend using All interfaces selection (0.0.0.0).
Besides other parameters, select Use stream ID radio button. This will set Source app and stream name to {STREAM_ID} placeholder which means the streamid parameter will be used to determine the source stream.
You can read more about other options in SRT output setup.
Once you save settings, they will be applied to the server within a few seconds.
That's it, you can now pull streams via SRT in Caller mode with proper streamid.
Usage
Let's see a couple of examples or obtaining the stream with proper streamid parameter.
First, here's an example of an srt-live-transmit tool getting the stream and playing it:
./srt-live-transmit "srt://192.168.0.114:2022?mode=caller&streamid=live/output" file://con | ffplay -
You can see it requesting SRT stream with streamid containing app and stream name (streamid=live/output).
Here's how the SRT stream setup may look like in Larix Player mobile app which supports SRT playback in all modes for both Android and iOS.
You can see IP and port of media server, SRT is set in Caller mode and then streamid parameter is set to "live/output".
Feel free to use this feature set for providing SRT streams.
Let us know if you have any questions about this feature.
Follow us in social media to get updates about our new features and products: YouTube, Twitter, Facebook, LinkedIn, Reddit, Telegram
Related documentation
Nimble Streamer SRT capabilities, SRT Publisher Assistance Security Set, Nimble Addenda,