The Real-Time Messaging Protocol (RTMP) is a streaming technology created for high-performance live transmission of audio and video media files over the Internet. Developed by Macromedia in 2002, which was subsequently acquired by Adobe, RTMP was created to enable the transfer of multimedia files utilizing Adobe’s Flash-based platform. However, as support for HTTP Live Streaming (HLS) gains traction, many Content Delivery Network (CDN) providers no longer offer direct support for RTMP streaming which may impact producers who require low latency solutions.
Streaming is an integral part of anyone’s Internet experience today and currently accounts for over two-thirds of all web traffic. This number is expected to grow to 82% by 2020, so understanding the protocols and technologies which enable this rich media experience can help content producers, as well as infrastructure operators, make the right technology decisions for their solutions. With RTMP being the original standard which is slowly being replaced by newer technologies such as HLS, many believe this streaming protocol is obsolete. However, RTMP still has a place in modern technology solutions due to its low latency features and expanded support for Digital Rights Management (DRM).
A Quick Overview of RTMP
There are three components which are needed to create an RTMP solution. A live video encoder, a live and on-demand media streaming server, and a live and on-demand client. The protocol itself is an open specification which enables the delivery of video, audio, and relevant data in the AMF, SWF, FLV, and F4V formats which are compatible with Adobe’s Flash Player.
Unlike HLS, RTMP does not use the standard HTTP or HTTPS ports of 80 and 443. Instead, it uses port 1935 for persistent video packet transmissions. Due to it having a particular port, reserved explicitly for live streaming purposes, it provides streaming communication services with very low latency.
It is also capable of providing an enhanced video quality experience by automatically adjusting its bandwidth utilization through adaptive bitrate streaming. It also provides end users with the ability to seek to later parts of a video file as media players maintain a small buffer which saves bandwidth.
When it comes to encrypting streaming traffic, two methods are available. It can be tunneled using the usual industry standard TLS/SSL mechanisms, or content producers could use RTMPE where media content is wrapped using a lightweight encryption layer. Utilizing these encryption techniques, content producers can protect the copyright of their digital creations with products such as Protected Streaming from Adobe.
The Benefits of RTMP
Even though RTMP is an older streaming protocol, it does have several benefits such as better performance and enhanced protection which make it a viable streaming solution in specific use cases.
Technology Maturity
This protocol has been around since 2002. Due to its long history, and the fact that it is an industry standard technology for multimedia streaming, it is both stable and reliable. Over the years any initial faults and inherent problems have been identified and rectified which means content producers can rely on this protocol for dependability and stability. It is also simple to set up and easy to use, and a user can stream video utilizing multiple formats simultaneously and securing it with the integrated solutions available for this protocol. Furthermore, nearly every streaming device supports RTMP, giving users the ability to publish to a CDN and streaming server. Due to its maturity, this protocol is also embedded into many native mobile devices providing the facility to distribute video from a live camera feed.
Low Latency
Users watching certain events like sporting activities demand low latency so that they can view the proceedings in real-time. Using RTMP guarantees a much lower latency than other industry standard streaming protocols such as HLS which has an average lag of between 20 and 60 seconds. It is therefore vital for video solution architects to consider this latency factor when developing streaming solutions. If the audience demands a near real-time solution, then RTMP is the only protocol which can deliver this experience.
Enhanced Seeking and Playback Functionality
Another benefit of utilizing RTMP for live streaming is its ability to provide users with an enhanced seek capability. If content producers adopt this protocol on their live streaming server, it offers users the capacity to seek to any point in the video with far less buffering than they would experience using an HTTP delivery method such as HLS. Unfortunately, this benefit is only available for desktop environments which have Flash Player installed and is not available on mobile browsers.
Content Security
There are several technologies users can deploy to secure their RTMP streaming content. Both encryption and a wide range of DRM solutions exist which allow streaming authors to protect the copyright of their media. Wowza’s StreamLock AddOn safeguards streaming video using RTMPS which is in essence RTMP over SSL. However, the StreamLock AddOn provides the best security as it offers real-time provisioning of free 256-bit SSL certificates. RTMPE is another method content producers could utilize to protect their transmissions. This encryption solution creates a secure session over an encrypted connection but does however not provide the same level of security found in RTMPS.
Adaptive Bitrate Streaming
RTMP supports adaptive bitrate streaming. This technology provides players with multiple bitrates and resolution options giving them the ability to switch automatically to match the quality of the end user’s current bandwidth connection. Although other streaming protocols like HLS offer the same feature, RTMP is more responsive and delivers better performance when switching from one bitrate to another.
The Disadvantages of RTMP
Unfortunately, no protocol is perfect, and RTMP has a few shortcomings which content producers need to be aware of when choosing to utilize this protocol for streaming solutions.
Port 1935
RTMP utilizes TCP port 1935 which means in certain environments it will be unavailable due to firewalls blocking this port. Unlike HLS which streams over HTTP, a protocol which is generally allowed through corporate firewalls, RTMP’s use of port 1935 requires network administrators to grant access explicitly. However, by tunneling RTMP traffic through HTTPS or utilizing a solution such as Wowza’s StreamLock AddOn, this impediment can be circumvented as port 443 is generally accessible in all environments.
Availability on All Devices
Unlike HLS which is available on any device be it a phone, tablet, laptop or workstation, the Apple ecosystem does not support RTMP which means devices running iOS or MacOS are unable to playback streaming using this protocol. Furthermore, as HLS uses HTML5 and Media Source Extensions, it is both a cost-effective and straightforward protocol to deploy as no media player is required. Unfortunately, this is not the case with RTMP.
Choosing a CDN for RTMP
Content Delivery Networks provide a wide range of benefits which include improved performance, high-availability, and scalability. However, not all CDN’s offer RTMP support which could prove to be an issue in specific scenarios. Selecting the right CDN, one which offers the necessary features needed to support a variety of situations, is therefore essential to content producers who need a low latency live streaming CDN solution.
CDN’s who provide live streaming solutions usually offer services which convert RTMP into HLS before it is streamed to end users. However, selecting a CDN provider who supplies a platform for both protocols is the best possible solution. In this way, a streaming media producer can stream low latency services to users who are capable of receiving RTMP traffic, and then fall back to HLS for other users.
CDNsun offers both HLS and RTMP CDN services. Our RTMP CDN service provides both pull streaming for users who already have a streaming server, and push streaming for customers who do not. CDNsun’s live streaming service automatically transcodes the originating stream into either RTMP or HLS, ensuring users can access the live stream using any device.