Tech Talk

22 Jan 2021

Secure Reliable Transport

by Simon Byrne


As we all know, internet speeds and jitter are not reliable or consistent. It is a wild world out there! That means moving real-time video across the internet is a challenge. Generally, overcoming these problems requires the provisioning of high-cost reserved links like MPLS or satellite networks.

For those of us who cannot access those high cost links, we used RTMP (Real Time Messaging Protocol) over the standard internet.

RTMP was initially a proprietary protocol and codec developed by Macromedia for streaming audio, video and data over the Internet between a Flash player and a server.

Advertisement

Macromedia is now owned by Adobe, which has released an incomplete version of the specification of the protocol for public use which is loosely based around H.264.

By today’s standards it is old as it was primarily designed for delivering content to the Flash media player. As the Flash player has been phased out, so has RTMP and its development was abandoned in 2012.

There is one notable exception. RTMP is still the main method of pushing audio and video to live stream servers which takes the RTMP and transcodes it into usually HLS for distribution.

Apart from the use above, it is a poor production protocol, mainly because you cannot change codecs. SRT fills that void as it was designed for low-latency live video transmission.

Originally developed and pioneered by Haivision, SRT stands for Secure Reliable Transport. SRT is an open source video transport protocol and technology stack that optimises video streaming performance across unpredictable networks.

It is also designed to deliver the streams securely and features a clever firewall traversal.

Haivision made the protocol open source which means anyone can use it. As a result, there are now over 450 companies in the SRT Alliance of users and developers.

SRT is a UDP protocol. UDP (User Datagram Protocol) is a communications protocol that is primarily used for establishing low-latency and loss-tolerating connections between applications on the internet.

It speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party. It is like a hose of data that just keeps coming, irrespective of whether the receiving party can keep up.

SRT’s key features:

• AES 128/256 bit encryption – Your stream is secure.

• Packet loss recovery through advanced low latency retransmission techniques – this is SRT’s secret sauce.

• Video and audio stream timing recovery – you have predictable latency.

• Ability to designate any endpoint as “sender”, “receiver”, or “rendezvous” mode – more on this later.

• Detect the network performance between endpoints (packet loss, latency, jitter) – it adjusts for conditions.


SRT is superb for connecting quality video across the internet with a fixed latency. For example, I recently did a job where I switched broadcast cameras that were in Adelaide and Melbourne.

The local crews used vMix to send a SRT stream to my vMix instance in the cloud, where I did the switching. In Melbourne we had two cameras, so we had two SRT streams. Because the latency is fixed by me, both cameras were perfectly in sync.

SRT is very simple to set up and it has three modes to establish a connection:

Caller mode
This is where the source calls the Listener. In order to call the Listener, you need the public IP address of that Listener machine.

Listener Mode
In this mode you are simply listening for the incoming stream. In most cases, the Listener machine is behind a firewall and the traffic will have to be forwarded to it.

Rendezvous mode
In this mode, both the SRT source and destination devices are ready to establish the SRT connection as soon as an SRT stream starts. It works by both ends of the connection attempting to make the link.


It is quite handy if you are having difficulty traversing a firewall because the firewall is tricked into forwarding the stream. What happens is that the stream appears on the internet side of the firewall.

On the LAN side of the firewall, you also have a local machine looking for the stream. The firewall makes a best effort to put the two requests together and a link is established. It does not always work but often it solves a problem. In this case you need the public IP addresses for both ends of the link.


There are a couple of other settings:

Port number
You must nominate a port number and that number must be identical on both ends. Then, if there is a firewall on the Listener end, you can use that port number to forward the traffic onto the Listener machine.

The Listener machine will be listening on that port too. You can have multiple SRT streams going to a machine as long as you use different port numbers for each stream.

Latency
The recommendation is that this should be set to triple the ping time. If you ping the listener machine from the caller machine and it comes back at 30 milliseconds, you should set the latency at least 90 milliseconds. However, in my experience it needs to be more because sometimes the ping time is temporarily much longer.

I use a minimum of 200 milliseconds, often 300 milliseconds. But here is the great thing about SRT; if your link is poor, you simply set the latency longer and you will achieve a stable image, albeit delayed.

Passphrase
You can add a passphrase to your encrypted stream if you wish but it is not essential. In my experience, you can get a very acceptable 1080p25 image using about 2.7 Mbit bandwidth.


SRT does not care what codec is used. That means it can take advantage of the newer ones such as H.265 and it is being actively supported and developed by the SRT Alliance, which is the group of 450 manufacturers behind it.

I’m confident that SRT will replace RTMP in the near future.

Want to try it? The free streaming software OBS supports SRT. I know guys who use multiple copies of OBS to send single camera SRT streams and it works great.

Another great app is Larix Broadcaster for both Android and IOS. It is a simple camera app that sends a SRT stream. vMix supports SRT but as far as I know, Wirecast does not.

You can also get hardware SRT encoders and decoders. I have Kiloview encoders but Magewell, Matrox, Epiphan and several other manufacturers make them as well.

Keep an eye on SRT. There is no doubt that it will emerge as the standard that we will be using for years to come.

SRT Alliance
https://www.srtalliance.org

Larix Broadcaster
https://softvelum.com/larix


OBS SRT
https://obsproject.com/wiki/Streaming-With SRT-Protocol



Also by Simon Byrne from the December 2020 edition of CX Magazine, ‘Cloud Computing In Your Production Business’ https://www.cxnetwork.com.au/cloud-computing-in-your-production-business





Lead image video still courtesy About SRT



CX Magazine – December 2020   

LIGHTING  |  AUDIO  |  VIDEO  |  STAGING  |  INTEGRATION
Entertainment technology news and issues for Australia and New Zealand
– in print and free online www.cxnetwork.com.au










© VCS Creative Publishing




Subscribe

Published monthly since 1991, our famous AV industry magazine is free for download or pay for print. Subscribers also receive CX News, our free weekly email with the latest industry news and jobs.