Knowledge Base

Install and use the SRT protocol with srt-live-server

Secure Reliable Transport (SRT) is an open source video transport protocol that utilizes the UDP transport protocol. SRT provides connection and control, reliable transmission similar to TCP, however, it does so at the application layer, using UDP protocol as an underlying transport layer. It supports packet recovery while maintaining low latency (default: 120 ms). SRT also supports encryption using AES. This is the official website: https://www.srtalliance.org

Before continuing you should have a look at this very interesting, detailed page from the Wiki of the OBS website: https://obsproject.com/wiki/Streaming-With-SRT-Protocol.

In the future I'll write a bit more on the SRT protocol. But for now here are just the basics to install SRT on Ubuntu 20.04. We'll be installing it from the github page https://github.com/Haivision/srt. You may want to have a look for additional, interesting info on SRT.

sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential
cd /opt
git clone https://github.com/Haivision/srt
cd srt
./configure
sudo make
sudo make install

Once it's done compiling you can use SRT streaming. An example tool of that is included and it's called "srt-live-transmit". The srt-live-transmit tool is a universal data transport tool with a purpose to transport data between SRT and other medium. For more information on the possibilities have a look at the official github page here: https://github.com/Haivision/srt/blob/master/docs/srt-live-transmit.md. For a list of all the directives go here https://github.com/Edward-Wu/srt-live-server/wiki/Directives

Having compiled SRT it makes sense we also install a servery-ish application that uses SRT. One of these apps is "srt-live-server" and it's really easy to install.

cd /opt
git clone https://github.com/Edward-Wu/srt-live-server
cd srt-live-server
sudo make
sudo make install

Compiling should be done really fast. Once it's done with compiling go to the bin folder and enter ./sls-h or if you want to load it with a pre-set config simply use ./sls-c ../sls.conf. Don't forget to have a look at the sls.conf file as it will get you started.

cd bin
./sls -h
./sls -c ../sls.conf

I know this guide is not really informative, so if you're looking for more information on using srt-live-server , please visit the github page here: https://github.com/Edward-Wu/srt-live-server.

Table of Contents