GStreamer support for the RIST Specification

During last few months I had the chance to work with Net Insight implementing the RIST TR-06-1 Simple Profile support in GStreamer. You may wonder what this specification is and were it comes from. RIST stands for Reliable Internet Stream Transport. The specification is developed by the Video Services Forum, which regroup nearly all major companies producing streaming appliance for television production. Unlike other alternatives, this specification is not created from scratch but based on already deployed streaming solutions. The companies in the forum basically put together what they have been doing in order to create a variant that would allow interoperability between each others.

RIST is RTP

The RIST specification does not re-invent the wheel. Instead, it reuses as much of the RTP specification as possible. With the Simple Profile (the first and only profile as of writing this post), RIST leverages RTP/RTCP technologies along with RTP retransmission in order to protect the stream from packet loss. What RIST does differently from standard RTP is that it defines a denser way for communicating lost packets from receiver to sender (the range nacks). It also mandates how ports should be assigned between RTP and RTCP streams according to the RFC recommendations. In order to avoid the need for run-time signalling, RIST also defines specific SSRC assignment for the media and the retransmission stream. Retransmission is sent over the same port as normal RTP media to avoid the need for more sockets, but should still be compatible with a receiver unaware of the RIST RTX method. It also works with multicast and allow for multiplexing streams over multiple links (bonding).

If you are interested in more details, we recommended reading the freely available specification. Meanwhile, what is interesting is how we managed to leverage the GStreamer RTP stack in order to implement RIST. As of today, we have released a new plugin against the gst-plugin-bad repository. Note that this work relies on bug fixes and new features in the GStreamer RTP stack in order to work properly. All of this work is already upstream in the master branch of GStreamer.

Plugin

This new plugin introduces four new elements: ristrtxsend, ristrtxreceive, ristsrc and ristsink. But in general, only ristsrc and ristsink are going to be used by applications. They are respectively the receiver and the transmitter element. While the ristrtx elements are responsible for sending and merging the retransmission packets.

Both ristsrc and ristsink element are GstBins built around the rtpbin element. A typical RIST transmitter pipeline would payload an MPEG TS television stream into RTP and send it using ristsink element.

And inside the ristsink element, the pipeline would look like the following.

On the receiver side, one could build a custom pipeline, but ristsrc also implements the “rist://” URI scheme. This way, any GStreamer based player can become a RIST renderer.

And inside the ristsrc, the pipeline looks like the following.

You can find more details about the plugin element interface temporarily here until this ends up in the main GStreamer official documentation.

Upcoming Work

What is not currently included in this merge request is bonding support. Bonding consist of using multiple links in order to achieve better protection, higher bandwidth or both. We already have some work in progress for adding support and we do expect a follow up merge request in the short term. In RIST, each links has their own RTP Session. On sender all sessions shares a single transmission storage which can remember last time a specific seqnum was retransmitted. On receiver, all sessions shares a single rtpjitterbuffer, which aggregate the flow, avoid to request packets that was received through another link. You can find an example pipeline, this particular pipeline implements a fully redundant strategy. using the tee in lieu of a dispatcher on the sender and a funnel in lieu of an aggregator on the receiver.

RIST Bonding Sender with a tee for full redundancy
RIST Bonding Receiver, with a simple funnel for full redundancy

2 Replies to “GStreamer support for the RIST Specification”

  1. Hi Zaidan,

    If you click on the third link in my post, you’ll brought to the Merge Request page for this feature. All merge request matches a user branch in gitlab, so you can also find my work in this branch.

    https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/289

    https://gitlab.freedesktop.org/ndufresne/gst-plugins-bad/tree/rist-v2

    This new plugin requires GStreamer 1.15.90 (1.16.0 RC1). It was too late to include in 1.16 stable release, but I’ll be maintaining a 1.16 stable backport when that is released. I’ll post the link here and on twitter (ndufresne). If you need help building and testing this, feel free to come by IRC freenode #gstreamer.

    regards,
    Nicolas

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.