Starting with version 2.8.0, our video SDK supports RIST streaming.
What is RIST?
Reliable Internet Stream Transport (RIST) is an open source, open-specification transport protocol designed for reliable transmission of video over lossy networks (including the Internet) with low latency and high quality.
The RIST protocol is quite similar to SRT, but still has some differences. You can read more about the common features and differences of these protocols here: https://www.elecard.com/page/article_rist_vs_srt
Medialooks RIST
You can use RIST with Medialooks SDK just like regular UDP/DVB protocols. On the streamer side:
- Run Writer Sample/Sample File Writing
- Choose "RIST Streaming" as format
- Set desired audio and video codecs
- Set URL value by the following pattern
rist://ip_address:port[?options]
On the receiver side:
- Run the Network Playback Sample
- URL should be the following rist://@ip_address:port
(please pay attention to '@' symbol)
RIST has two profile types - Simple and Main, you can set RIST profile in the Writer config, for example:
format='mpegts' protocol='rist://' rist_profile='simple' video::codec='mpeg2video' video::b='5M' audio::codec='aac'
Please see more info about profiles - https://en.wikipedia.org/wiki/Reliable_Internet_Stream_Transport
Options for RIST streaming
There is a lot of optional settings available for the RIST (e.g. buffer, bandwidth) - you should set them directly in the target URL (separated by '&' symbol in 'key=value' structure), and not in _bsProps parameter of the WriterNameSet (or WriterSet) method.
Parameter | Description |
---|---|
buffer=# | Sets the buffer size in milliseconds. The buffer size will work best at four to seven times the ping time. This allows time for requests for the retransmission of a lost or corrupted packet, and the subsequent retransmission of its replacement. |
bandwidth=# | Sets the maximum bandwidth in Kbps. It is necessary to configure the bandwidth to be higher than the max bandwidth of your stream(s). This is in order to allow room for messaging headroom, plus the re-requested packets. When tuning a connection for the first time, analyze your stream statistics locally at first, then start at 10% higher for a constant bitrate, 100% higher for variable bitrate. |
return-bandwidth=# | Sets the maximum bandwidth in Kbps for just the receiver-to-sender direction. This is an option which may sometimes help avoid congestion insofar as it may limit re-request messages in poor network conditions. |
reorder-buffer=# | Sets the size for a secondary buffer in which after all re-requested packets have been received, the out-of-order packets are released in the correct order. in most cases there should be no need to adjust this setting, but it may be helpful in conjunction with very long distance/large buffer/poor network conditions. |
cname=abcde | Provides a canonical name for the media. If multiplexing more than one stream through a tunnel, this provides a convenient way to identify a particular stream within the log. |
rtt-min=# | Sets the minimum rtt setting in milliseconds. This can help reduce congestion by reducing the number of repeated re-requests in poor network conditions. |
rtt-max=# | Sets the maximum rtt setting in milliseconds. See rtt-min for a more complete description. in most cases, minimum and maximum should be set to be equal to one another. |
verbose-level=# | The verbosity settings match the standard Syslog options. These are self explanatory: -1 for disable. 3 for errors only. 4 adds warnings. 5 adds notices. 6 adds info. 7 for debug mode. |
aes-type=# | Specifies the specific encryption. Specify "128" for AES-128 or "256" for AES-256. Remember that you must also specify the pass phrase, and that encryption is not supported for the 'simple' profile of RIST protocol at all. |
miface=(device) | Sets the adapter for multicast protocol, as an example &miface=eth1. Note that the rist:// URLs must be unicast IP addresses; however, the media stream URLs, as in udp://xxx.xxx.xxx.xxx may be multicast. |
session-timeout=# | Terminates the RIST connection after inactivity/lack of keepalive response for the limit (in milliseconds) which you set with this parameter. |
secret=abcde | Sets the specified passphrase for Main or Advanced profile encryption. Note that simple protocol does not support encryption, and that you must in addition to the "secret" specify the "aes-type" parameter. The rotating keys shall be placed inside the rtcp messages, using your passphrase as the pre-shared key. Be sure that the passphrase for sender and receiver match! |
key-rotation=# |
Sets the key rotation period in milliseconds when aes and a passphrases are specified. |
congestion-control=# |
RIST provides built in congestion control, which is important in situations in which a sender drops off the connection, but the receiver still sends re-requests. The three options for this parameter are 0=disabled, 1=normal and 2=aggressive. In general, don't set the parameter to "aggressive" unless you've definitely established that congestion is a problem. |
min-retries=# |
Sets a minimum number of re-requests for a lost packet. Note that setting this too high can lead to congestion. Regardless of this setting, the size of the buffer and the roundtrip time will render too high a minimum value here irrelevant. |
max-retries=# |
Sets a maximum number of re-requests for a lost packet. See "min-retries." |
weight=# |
Sets the relative share for load balanced connections. The best way to describe this will be to provide an example. The default is five, so in a setup where two paths are given weights of 5 and 10 respectively, the former would receive 1/3 of packets sent, and the latter would receive 2/3. |
stream-id=# |
Sets an arbitrary numeric identifier for a multiplexed stream. This parameter can be applied to the rist:// url on the sender, and to the udp:// or rtp:// URL on the receiver. The former "assigns" the ID. The latter allows you to specify which multiplexed stream the receiving side will output as a given IP/port output URL. You can therefore have up to ten streams in and ten streams out for a single RIST connection. Each individual stream must have a unique ID and its output shall then handle the ID accordingly. |