Difference between revisions of "SRT"
|Line 64:||Line 64:|
Latency = 100</code>
Latency = 100</code>
Latest revision as of 18:59, 21 April 2021
SRT (Secure Reliable Transport) is an open source video streaming protocol that optimizes video transport over unpredictable networks by adapting to real-time network conditions and minimizing packet loss. It also supports end-to-end AES encryption so streams are better protected at all points. SRT protocol is used heavily in broadcast news, live sports and live events world. Due to its ease of transmition, support for codecs like H264 and H265 it is well suited for passing streams from field sources to broadcast stations and transcoding endpoints for real-time broadcast. As well SRT functions well for peer to peer scenerios.
There are no fees to incorporate the technology into any device or service so it has proven itself superior to RTMP because RTMP is not open source and can not be used to download without licensing. SRT has also enjoyed better traction than RTSP for internet based applications.
The videostreamoutTOP is used to transmit the video while the videostreaminTOP is used to receive the video.
Transmitting SRT - Listener and Caller
SRT uses a listener and caller model which determines the mode of transmition for the transmition start and end points. The video source and destination can be either a listener or caller. The listener end can be thought of as an available IP location with an open port. The caller side is a client that will require the address of the listener and it will try to connect when initiated.
For example if the video source is a Video Stream Out TOP, and the desired mode for the video source to be a listener, the Desination URL will be something like:
The listener, caller role of the video stream in and out TOPs can be reversed simply by flipping the mode arguements "listener" and "caller" of the URLs.
Peer to Peer Streaming Over the Internet
Once you are able to get SRT streaming on a local network using the previous section example, to do the same over the internet requires some configuration on your intenert firewall.
Use your Internet router configuration tools to locate settings for NAT/Gaming or Port Forwarding. You will need to setup a range of ports that forwards calls from the internet to the "host" or "device" on the protected network. The device or host will generally be assigned using its local IP address or its MAC address.
This host, on the local network can be setup using Video Stream Out TOP using listener mode for SRT. In this scenerio you can use a broadcast address to make it easier to find for the router:
Next you can test this connection in the same instance of TouchDesigner by using a Video Stream In TOP configured with an SRT caller setup. However you will first need to determine the IP address of router. This can by done by typing "Whats my IP address" into google search. The serach will return an IP4 address in the format [XXX.XXX.XXX.XXX]. Use this IP address in the URL like this:
Using SRT on Other Devices
The following apps have been succesfully tested with TouchDesigner's SRT implementation using an audio video stream.
Apple IPhone: Haivision Play Pro
This is a very useful app for testing your streams from TouchDesigner over the Internet. To stream to the app from a Video Stream Out TOP use the follow URL:
On the app side fill out the settings as follows in the "Play and SRT Stream" section.
Mode = "Caller"
Address = "[XXX.XXX.XXX.XXX]"
Caller's Port = "5000"
Encryption = "Off"
StreamID = (Nothing - leave it blank)
Latency = 100
SRT Relay Server
We have successfully tested this relay server.