SRT vs. RTMP: Compare the Two Protocols4 min readReading Time: 4 minutes
If you have stepped into the world of streaming protocols already, you may have come across SRT, or Secure Reliable Transport. You also probably know of RTMP, or Real-Time Messaging Protocol. These are two of the most common protocols used in audio and video streaming. The question is, how are these protocols different from one another? We’ll dig deeper into the characteristics of SRT versus RTMP.
RTMP is a TCP-based protocol. It splits a stream into smaller chunks of data, making them more versatile and faster to be delivered. For a long time, RTMP has been a top choice for many streaming platforms, including Castr.
Developed by Macromedia (now Adobe), RTMP is used for streaming video, audio, and data between a server and a Flash player in real time. Although Adobe announced that it no longer supports Flash, RTMP still remains a common protocol for video livestreaming.
The application of RTMP can also be found as an ingest protocol by Facebook Live, YouTube, Twitch, etc. RTMP helps deliver low-latency videos.
Drawbacks of RTMP
However, in reality, RTMP is not sufficient to meet today’s streaming requirements.
Support for RTMP is diminishing. Content Delivery Networks (CDNs) are favoring other protocols like HLS or MPEG-DASH over RTMP entry points. The protocol does not support HEVC encoded streams nor advanced resolutions. Because of bandwidth limitations, RTMP cannot be used at higher bitrates.
RTMP also experiences issues with multi-language support, security, and support for ad insertion.
That leaves a question for the streaming industry: Is there an alternative protocol for RTMP? The answer is yes. You may consider an HTTP-based protocol like HTTP Live Streaming (HLS), MPEG-DASH, or SRT.
The SRT protocol was created by Haivision and first introduced to the public in 2013. The idea stemmed from the need to reduce the cost of contribution from private networks and satellites.
The biggest benefit of SRT is that the protocol can help securely and reliably transport low-latency media files across unpredictable connections, such as the public internet.
Haivision released SRT as an open-source protocol. The developers in the community can have access to the source code and create their own SRT-based systems. Thousands of companies and organizations worldwide have adopted SRT as a means of delivering high-quality live videos over unreliable networks.
SRT provides end-to-end security with the AES 128/256 encryption for extra safety. It also helps recover video and audio streams almost immediately, as well as monitoring the network health between endpoints, and providing simplified firewall traversal.
Castr leveraged the stupendous technology of SRT and incorporated it into their cloud-based streaming services. Learn more about Castr’s new integration of SRT
Comparing SRT and RTMP
Haivision released a comprehensive whitepaper on measuring the efficiency of SRT versus RTMP. After assessing the two main criteria of a reliable livestreaming protocol: end-to-end latency and the maximum bandwidth for long-distance streams, here are their conclusions.
Testing for end-to-end latency
The end-to-end latency of SRT was more than twice as fast as that of RTMP, according to the experiment. When tested using specialized hardware encoding and decoding tools, the difference was far more noticeable, with SRT being from five to 12 times faster than RTMP.
Testing for maximum bandwidth for long-distance streams
Measuring the maximum bandwidth for long-distance streams help define the protocols’ effectiveness on the video quality. When the team increased the bandwidth for streaming at as high as 1 Gbps for streams from 1-20 Mbps, RTMP worked decently when the sender and receiver were on the same continent. However, it failed at bitrates above 2 Mbps. SRT, meanwhile, had no issues even when the bandwidth was cranked up to 20 Mpbs at any location in the world.
- Despite the major benefits that RTMP has offered in the past, there are other alternative protocols that fit better with the current requirements of the streaming industry. SRT is one of them.
- According to Haivision’s whitepaper, SRT’s performance was up to 12 times faster than that of RTMP.
- SRT also experienced no issues when streamed up to 20 Mbps to any location in the world, while RTMP could not perform long-distance streams at bitrates above 2 Mbps.