SRT (Secure Reliable Transport) is a low-latency video streaming protocol that was developed by Haivision, a company specializing in video networking solutions. It is designed to be used in environments where low latency is critical, such as live streaming events and news broadcasts. In this guide, we will cover the basics of SRT, including how it works, its key features, and how to set up an SRT live streaming workflow.
What is SRT?
SRT is a video streaming protocol that uses advanced network technologies to deliver low-latency video streams over the internet. It is designed to be able to transmit video over unpredictable networks, such as the internet, without sacrificing quality or reliability.
One of the key features of SRT is its ability to adapt to changing network conditions in real-time. This means that it can automatically adjust the video stream to maintain a stable connection and minimize latency, even if the network conditions are poor.
Another important feature of SRT is its ability to encrypt the video stream, making it secure and resistant to tampering. This is especially important for live streaming applications where the video content may be sensitive or valuable.
How does SRT work?
SRT uses a combination of advanced networking technologies to deliver low-latency video streams over the internet. These technologies include:
- UDP (User Datagram Protocol): SRT uses UDP to transmit video data over the internet. UDP is a lightweight protocol that allows for fast data transmission, but does not guarantee delivery or provide error correction.
- ARQ (Automatic Repeat reQuest): SRT uses ARQ to ensure reliable delivery of video data over the internet. If a packet is lost or corrupted, SRT will automatically request that it be resent, ensuring that the video stream is uninterrupted.
- Forward Error Correction (FEC): SRT uses FEC to prevent errors from propagating through the video stream. If a packet is lost or corrupted, SRT can use the FEC data to recreate the missing packet, ensuring that the video stream remains uninterrupted.
- Packet Loss Concealment (PLC): SRT uses PLC to minimize the impact of packet loss on the video stream. If a packet is lost, SRT can use PLC to recreate the missing data, minimizing the impact on the video quality.
Key features of SRT
SRT has a number of key features that make it well-suited for low-latency live streaming applications:
- Low latency: One of the main advantages of SRT is its ability to deliver video streams with extremely low latency. SRT can deliver video streams with latencies as low as 100 milliseconds, making it ideal for applications where real-time interaction is critical.
- Adaptive bitrate: SRT can automatically adjust the video bitrate in real-time to match the available bandwidth, ensuring that the video stream is stable and of high quality.
- Encryption: SRT can encrypt the video stream to ensure that it is secure and resistant to tampering. This is important for applications where the video content may be sensitive or valuable.
- Cross-platform compatibility: SRT is compatible with a wide range of platforms and devices, making it easy to use in a variety of live streaming applications.
Setting up an SRT live streaming workflow
To set up an SRT live streaming workflow, you will need the following components:
- Encoder: An encoder is a device or software that converts video and audio into a digital format that can be transmitted over the internet. There are a variety of encoders available on the market, ranging from professional hardware encoders to software-based encoders that can be run on a computer.
- SRT sender: An SRT sender is a device or software that transmits the video stream from the encoder to the SRT receiver. The SRT sender is responsible for encoding the video stream and transmitting it over the internet using the SRT protocol.
- SRT receiver: An SRT receiver is a device or software that receives the video stream from the SRT sender and decodes it for display. The SRT receiver is responsible for receiving the video stream and decoding it for display on a device or software player.
- Player: A player is a device or software that displays the video stream on a screen or device. There are a variety of players available, ranging from professional hardware players to software-based players that can be run on a computer or mobile device.
To set up an SRT live streaming workflow, you will need to connect the encoder to the SRT sender, and the SRT receiver to the player. The SRT sender and receiver will communicate over the internet using the SRT protocol, transmitting the video stream from the encoder to the player with minimal latency.
Additional considerations
When setting up an SRT live streaming workflow, there are a few additional considerations to keep in mind:
- Network conditions: SRT is designed to be able to transmit video over unpredictable networks, but it is important to ensure that the network conditions are as stable as possible to minimize latency and maintain a high-quality video stream.
- Firewall and NAT: If your network has a firewall or NAT (Network Address Translation), you may need to configure it to allow SRT traffic to pass through.
- Bandwidth: The video stream transmitted over SRT will consume bandwidth on both the sender and receiver sides. It is important to ensure that you have sufficient bandwidth available to support the video stream.
- Quality of Service (QoS): If you are using a shared network, you may want to consider implementing QoS to ensure that the video stream has sufficient bandwidth and is not disrupted by other traffic on the network.
Latency with SRT Streaming
The latency of an SRT video stream from a lens to a player will depend on a number of factors, including the hardware and software being used, the network conditions, and the distance between the sender and receiver. In general, SRT is designed to deliver video streams with latencies as low as 100 milliseconds, making it well-suited for applications where real-time interaction is critical.
However, it is important to note that latency can be affected by a variety of factors, and it is not always possible to achieve the lowest possible latencies in all circumstances. Factors that can affect latency include:
- Hardware and software: Different hardware and software configurations can have different latencies. It is important to choose hardware and software that is optimized for low latency.
- Network conditions: Network conditions, such as bandwidth, packet loss, and congestion, can affect the latency of an SRT video stream. It is important to ensure that the network is stable and has sufficient bandwidth to support the video stream.
- Distance: The distance between the sender and receiver can also affect the latency of an SRT video stream. The farther apart the sender and receiver are, the longer it will take for the video stream to travel between them, leading to higher latency.
It is always a good idea to test and measure the latency of an SRT video stream to ensure that it meets the needs of your application.
A Complete SRT workflow
It is possible to use SRT to transmit a video stream from a lens directly to a player. To do this, you will need the following components:
- Camera: The camera will capture the video from the lens and output it in a digital format.
- Encoder: The encoder will convert the video from the camera into a digital format that can be transmitted over the internet using the SRT protocol.
- SRT sender: The SRT sender will transmit the video stream from the encoder to the SRT receiver over the internet using the SRT protocol.
- SRT receiver: The SRT receiver will receive the video stream from the SRT sender and decode it for display.
- Player: The player will display the video stream on a screen or device.
To set up this workflow, you will need to connect the camera to the encoder, and the encoder to the SRT sender. The SRT sender and receiver will communicate over the internet using the SRT protocol, transmitting the video stream from the camera to the player with minimal latency.
It is important to note that the quality and stability of the video stream will depend on the network conditions and the bandwidth available. It is always a good idea to ensure that the network is stable and has sufficient bandwidth to support the video stream.
SRT Adaptive Bit Rate Streaming
SRT supports adaptive bitrate (ABR) streaming. Adaptive bitrate streaming is a technique that allows the video stream to automatically adjust its bitrate in real-time to match the available bandwidth. This helps to ensure that the video stream is stable and of high quality, even if the network conditions change.
SRT uses a number of techniques to support adaptive bitrate streaming, including:
- Adaptive bitrate control: SRT uses adaptive bitrate control to adjust the bitrate of the video stream in real-time based on the available bandwidth. If the available bandwidth increases, SRT can increase the bitrate of the video stream to deliver a higher quality video. If the available bandwidth decreases, SRT can decrease the bitrate of the video stream to maintain a stable connection.
- Dynamic stream selection: SRT supports multiple video streams at different bitrates, allowing the SRT receiver to dynamically select the best stream based on the available bandwidth.
- Forward Error Correction (FEC): SRT uses FEC to prevent errors from propagating through the video stream. If a packet is lost or corrupted, SRT can use the FEC data to recreate the missing packet, ensuring that the video stream remains uninterrupted.
By using these techniques, SRT is able to deliver high-quality video streams with minimal latency, even in changing network conditions.
What Platforms are supporting SRT
There are several live streaming platforms that support SRT as a streaming protocol. Some examples include:
- OBS Studio: OBS Studio is a free and open-source live streaming software that supports SRT as a streaming protocol. OBS Studio can be used to stream to a wide range of platforms, including YouTube, Twitch, and Facebook Live
- Streamlabs OBS: Streamlabs OBS is a free and open-source live streaming software that is built on top of OBS Studio. It supports SRT as a streaming protocol and can be used to stream to a wide range of platforms, including Twitch, YouTube, and Facebook Live.
- Wirecast: Wirecast is a professional live streaming software that supports SRT as a streaming protocol. Wirecast can be used to stream to a wide range of platforms, including YouTube, Twitch, and Facebook Live.
- Haivision Makito X: Haivision Makito X is a professional hardware encoder that supports SRT as a streaming protocol. It can be used to stream to a wide range of platforms, including YouTube, Twitch, and Facebook Live.
In addition to these platforms, there are many other live streaming platforms and tools that support SRT as a streaming protocol. It is always a good idea to check with the platform or tool you are using to see if they support SRT as a streaming protocol.
SRT Video Players
There are a variety of video players that support SRT as a streaming protocol. Some examples of video players that support SRT include:
- VLC media player: VLC media player is a free and open-source media player that supports a wide range of video and audio formats, including SRT. VLC media player can be used to play SRT streams on a variety of platforms, including Windows, macOS, Linux, and Android.
- MPV: MPV is a free and open-source media player that supports a wide range of video and audio formats, including SRT. MPV can be used to play SRT streams on a variety of platforms, including Windows, macOS, and Linux.
- FFmpeg: FFmpeg is a free and open-source software library for working with audio and video. It can be used to play SRT streams on a variety of platforms, including Windows, macOS, and Linux.
- Haivision Makito X Player: Haivision Makito X Player is a professional hardware player that supports SRT as a streaming protocol. It can be used to play SRT streams on a variety of platforms, including Windows, macOS, and Linux.
- Wirecast: Wirecast is a professional live streaming software that includes a built-in player that supports SRT as a streaming protocol. Wirecast can be used to play SRT streams on a variety of platforms, including Windows and macOS.
There are many other video players that support SRT as a streaming protocol. It is always a good idea to check with the player you are using to see if it supports SRT as a streaming protocol.
Conclusion
SRT is a powerful and flexible video streaming protocol that is well-suited for low-latency live streaming applications. By using advanced networking technologies and a robust feature set, SRT is able to deliver high-quality video streams with minimal latency, making it a valuable tool for professionals working in the live streaming industry.