Using SRT Protocol in FAB Subtitler LIVE

The SRT (Secure Reliable Transport) protocol is often used to transfer video over the internet because it supports recovery of lost packets which is not the case with UDP and RTP protocols. The video encoder generally uses UDP to send the SRT video stream to a UDP port on the receiving device. The receiving device sends data to the same UDP port of the video encoder to report packets which were not received so that the video encoder sends them again.

The SRT protocol is used to transfer live video from one IP address to another IP address (1 to 1). In case of FAB Subtitler this is not very useful because generally there are several FAB Subtitler PCs and SRT does not support 1 to N transfers. Therefore currently live video streams over SRT protocol cannot be received directly by FAB Subtitler.

Therefore on the receiving side it is necessary to use a gateway which will convert SRT to UDP multicast so that multiple FAB Subtitler LIVE PCs can receive it correctly. By converting SRT to UDP multicast it is then possible to display live video simultaneously on multiple PCs with FAB Subtitler LIVE provided that the Ethernet switch supports UDP multicast.

Converting SRT to UDP/RTP Multicast

To convert SRT to UDP/RTP multicast a gateway is required. You can use the Haivision Gateway or any other product.

However the easiest and most economical way is to use the srt-live-transmit program under Linux (also in a virtual machine). Use the following parameters to start the program so that SRT traffic from 192.168.216.34:6600 will be converted to UDP/RTP multicast on 239.192.1.251:1234

srt-live-transmit srt://192.168.216.34:6600?latency=400 udp://239.192.1.251:1234

Always use udp:// prefix, independently of whether the video stream is RTP or UDP packed.

The parameter latency might have to be adjusted but it shall never be less than 80 milliseconds. To see the status of the connection add the following parameters: -v -s:2000

Details about how to configure the SRT protocol correctly can be found here:

https://www.haivision.com/blog/all/how-to-configure-srt-settings-video-encoder-optimal-performance/

A raspberry pi or a Linux virtual machine are very convenient for srt-live-transmit because it only takes a few minutes to set them up for srt-live-transmit.

Displaying LIVE video in FAB Subtitler

To display live video please use the Display tab and the following functions:

  • Editor over video: Displays the video in the active editor window
  • Video in a window: Displays the video in a separate window which can also be displayed in full-screen mode on a secondary PC monitor
  • Teletext decoder: Displays a window with a teletext decoder
  • Video source: Allows changing the video source if the configured video in a window source supports multiple sources (i.e. the channel number for analogue antenna reception or the URL for video over IP)

To configure FAB Subtitler to received Video over UDP/RTP please set the following settings in Options:

By clicking on the button “Channels” you can define the URLs which are used for every channel that shall be received over IP and displayed. The URL shall be specified as:

udp://239.192.1.251:1234

Converting UDP/RTP to SRT

To convert an UDP video stream to SRT the easiest way is to use the srt-live-transmit program. Use the following parameters to start the program so that UDP on 239.192.1.251:1234 will be converted to SRT an made available for client SRT connection on UDP port 6600:

./srt-live-transmit udp://239.192.1.251:1234 srt://:6600?latency=400 

Additional parameters are required for RTP because of the different packet size:

./srt-live-transmit udp://239.192.1.251:1234 "srt://127.0.0.1:1234/?mode=listener&payloadsize=1456" -c:1456

Always use udp:// prefix, independently of whether the video stream is RTP or UDP packed.

The parameter latency might have to be adjusted but it shall never be less than 80 milliseconds. To see the status of the connection add the following parameters: -v -s:2000

FAB strongly recommends to use RTP packed transport streams as the input to srt-live-transmit whenever possible. UDP stream without RTP encapsulation is much more susceptible to errors and might therefore result in occasional errors in the displayed video.

Detecting problems in SRT/UDP/RTP live streams

You will find a description of how to analyze errors in TS/IP live streams on this page.

Example of long distance transfer of video using the SRT protocol

The picture below shows an example of transfer of live video over long distance from Frankfurt to Hamburg using the SRT protocol.

  • A Kiloview E1 encoder (or any other encoder with SRT support) encodes live SDI video and sends live video encapsulated in the SRT video stream from Frankfurt to Hamburg.

  • In Hamburg there is a virtual machine with Linux OS (Debian or other) that receives the SRT live video stream from Frankfurt and converts it to UDP multicast on the local network.

  • The UDP multicast video stream is then received by FAB Subtitler LIVE PCs and live video and audio is reproduced by the PC within the FAB Subtitler LIVE application.

  • The IP addresses and port numbers in the above picture are examples only and can be modified in real applications.

  • The configuration of the Kiloview E1 encoder for SRT-TS Pushing is the following:

  • The following commands are necessary to build srt-live-transmit from source code on Linux OS:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install git tclsh pkg-config cmake libssl-dev build-essential
git clone https://github.com/Haivision/srt.git
cd srt
./configure
make
  • To start the srt-live-transmit program as a SRT->UDP gateway use the following command which will receive the SRT protocol data as a listener on UDP port 1025 and transmit the live video stream on udp://239.192.1.248:1234
/home/user/srt/srt-live-transmit srt://:1025?latency=400 udp://239.192.1.248:1234
  • To make sure that the srt-live-transmit program will be started automatically when the Linux OS computer starts simply add the line below to the end of the file which is displayed when starting “crontab -e”
@reboot /home/user/srt/srt-live-transmit srt://:1025?latency=400 udp://239.192.1.248:1234

This page was last updated on 2022-08-09