Home

Awesome

Secure Reliable Transport (SRT) Protocol

About SRT | Features | Getting Started | Build Instructions | Sample Apps and Tools | Contribute | License | Releases

<p align="left"> <a href="http://srtalliance.org/"> <img alt="SRT" src="http://www.srtalliance.org/wp-content/uploads/SRT_text_hor_logo_grey.png" width="500"/> </a> </p>

License: MPLv2.0 Latest release Quality Gate Status codecov Build Status Linux and macOS Build Status Windows

Ubuntu 23.04 Fedora 37 Debian Homebrew Vcpkg ConanCenter

What is SRT?

Secure Reliable Transport (SRT) is a transport protocol for ultra low (sub-second) latency live video and audio streaming, as well as for generic bulk data transfer1. SRT is available as an open-source technology with the code on GitHub, a published Internet Draft, and a growing community of SRT users.

SRT is applied to contribution and distribution endpoints as part of a video stream workflow to deliver the best quality and lowest latency video at all times.

SecureEncrypts video streams
ReliableRecovers from severe packet loss
TransportDynamically adapts to changing network conditions

In live streaming configurations, the SRT protocol maintains a constant end-to-end latency. This allows the live stream's signal characteristics to be recreated on the receiver side, reducing the need for buffering. As packets are streamed from source to destination, SRT detects and adapts to real-time network conditions between the two endpoints. It helps compensate for jitter and bandwidth fluctuations due to congestion over noisy networks.

SRT implements AES encryption to protect the payload of the media streams, and offers various error recovery mechanisms for minimizing the packet loss that is typical of Internet connections, of which Automatic Repeat reQuest (ARQ) is the primary method. With ARQ, when a receiver detects that a packet is missing it sends an alert to the sender requesting retransmission of this missing packet. Forward Error Correction (FEC) and Connection Bonding, which adds seamless stream protection and hitless failover, are also supported by the protocol.

<p align="right"><em>To learn more about the protocol subscribe to the <a href="https://medium.com/innovation-labs-blog/tagged/secure-reliable-transport">Innovation Labs Blog</a> on &nbsp;<img alt="slack logo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Medium_%28website%29_logo.svg/500px-Medium_%28website%29_logo.svg.png" width="80"></em></p> <p align="right"><em>To ask a question <a href="https://slackin-srtalliance.azurewebsites.net">join the conversation</a> in the <b>#development</b> channel on &nbsp;<a href="https://srtalliance.slack.com"><img alt="slack logo" src="https://github.com/stevomatthews/srt/blob/master/docs/images/Slack_RGB2.svg" width="60"></a></em></p>

Features

:point_down: Click on the ► button to expand a feature description.

<details> <summary>Pristine Quality and Reliability</summary> <p>

No matter how unreliable your network, SRT can recover from severe packet loss and jitter, ensuring the integrity and quality of your video streams.

</p> </details> <details> <summary>Low Latency</summary> <p>

SRT’s stream error correction is configurable to accommodate a user’s deployment conditions. Leveraging real-time IP communications development to extend traditional network error recovery practices, SRT delivers media with significantly lower latency than TCP/IP, while offering the speed of UDP transmission with greatly improved reliability.

</p> </details> <details> <summary>Content Agnostic</summary> <p>

Unlike some other streaming protocols that only support specific video and audio formats, SRT is payload agnostic. Because SRT operates at the network transport level, acting as a wrapper around your content, it can transport any type of video format, codec, resolution, or frame rate.

</p> </details> <details> <summary>Easy Firewall Traversal with Rendezvous Mode</summary> <p>

The handshaking process used by SRT supports outbound connections without the potential risks and dangers of permanent exterior ports being opened in a firewall, thereby maintaining corporate LAN security policies and minimizing the need for IT intervention.

</p> </details> <details> <summary><a href="https://datatracker.ietf.org/doc/html/draft-sharabayko-srt-01#section-6">AES Encryption</a></summary> <p>

Using 128/192/256-bit AES encryption trusted by governments and organizations around the world, SRT ensures that valuable content is protected end-to-end from contribution to distribution so that no unauthorized parties can listen.

</p> </details> <details> <summary><a href="./docs/features/packet-filtering-and-fec.md">Forward Error Correction (FEC) and Packet Filter API</a></summary> <p>

SRT 1.4 sees the introduction of the packet filter API. This mechanism allows custom processing to be performed on network packets on the sender side before they are sent, and on the receiver side once received from the network. The API allows users to write their own plugin, thereby extending the SRT protocol's capabilities even further with all kinds of different packet filtering. Users can manipulate the resulting packet filter data in any way, such as for custom encryption, packet inspection, or accessing data before it is sent.

The first plugin created as an example of what can be achieved with the packet filter API is for Forward Error Correction (FEC) which, in certain use cases, can offer slightly lower latency than Automatic Repeat reQuest (ARQ). This plugin allows three different modes:

</p> </details> <details> <summary><a href="./docs/features/bonding-quick-start.md">Connection Bonding</a></summary> <p>

Similar to SMPTE-2022-7 over managed networks, Connection Bonding adds seamless stream protection and hitless failover to the SRT protocol. This technology relies on more than one IP network path to prevent disruption to live video streams in the event of network congestion or outages, maintaining continuity of service.

This is accomplished using the socket groups introduced in SRT v1.5. The general concept of socket groups means having a group that contains multiple sockets, where one operation for sending one data signal is applied to the group. Single sockets inside the group will take over this operation and do what is necessary to deliver the signal to the receiver.

Two modes are supported:

</p> </details> <details> <summary><a href="./docs/features/access-control.md">Access Control (Stream ID)</a></summary> <p>

Access Control enables the upstream application to assign a Stream ID to individual SRT streams. By using a unique Stream ID, either automatically generated or customized, the upstream application can send multiple SRT streams to a single IP address and UDP port. The Stream IDs can then be used by a receiver to identify and differentiate between ingest streams, apply user password access methods, and in some cases even apply automation based on the naming of the Stream ID. For example, contribution could be sent to a video production workflow and monitoring to a monitoring service.

For broadcasters, Stream ID is key to replacing RTMP for ingesting video streams, especially HEVC/H.265 content, into cloud service or CDNs that have a single IP socket (address + port) open for incoming video.

</p> </details>

Getting Started with SRT

The SRT APIIETF Internet DraftSample Apps
Reference documentation for the SRT library APIThe SRT Protocol Internet DraftInstructions for using test apps (srt-live-transmit, srt-file-transmit, etc.)
SRT Technical OverviewSRT Deployment GuideSRT CookBook
Early draft technical overview (precursor to the Internet Draft)A comprehensive overview of the protocol with deployment guidelinesDevelopment notes on the SRT protocol
Innovation Labs BlogSRTLab YouTube ChannelSlack
The blog on Medium with SRT-related technical articlesTechnical YouTube channel with useful videosSlack channels to get the latest updates and ask questions <br />Join SRT Alliance on Slack

Additional Documentation

Build Instructions

Linux (Ubuntu/CentOS) | Windows | macOS | iOS | Android | Package Managers

Requirements

Build Options

For detailed descriptions of the build system and options, please read the SRT Build Options document.

Sample Applications and Tools

The current repo provides sample applications and code examples that demonstrate the usage of the SRT library API. Among them are srt-live-transmit, srt-file-transmit, and other applications. The respective documentation can be found here. Note that all samples are provided for instructional purposes, and should not be used in a production environment.

The srt-xtransmit utility is actively used for internal testing and performance evaluation. Among other features it supports dummy payload generation, traffic routings, and connection bonding. Additional details are available in the srt-xtransmit repo itself.

Python tools that might be useful during development are:

Contributing

Anyone is welcome to contribute. If you decide to get involved, please take a moment to review the guidelines:

For information on contributing to the Internet Draft or to submit issues please go to the following repo. The repo for contributing in SRT CookBook can be found here.

License

By contributing code to the SRT project, you agree to license your contribution under the MPLv2.0 License.

Release History

Footnotes

  1. The term “live streaming” refers to continuous data transmission (MPEG-TS or equivalent) with latency management. Live streaming based on segmentation and transmission of files like in the HTTP Live Streaming (HLS) protocol (as described in RFC8216) is not part of this use case. File transmission in either message or buffer mode should be considered in this case. See Section 7. Best Practices and Configuration Tips for Data Transmission via SRT of the Internet Draft for details. Note that SRT is content agnostic, meaning that any type of data can be transmitted via its payload.