Streaming video content is now more popular than ever, and there is now no shortage of video streaming protocol options we can use to stream our content.
If you are just streaming your content for fun, then using software encoders to stream your content might be enough. However, if you want to reliably stream your content in high-quality, then using RMTP as your streaming protocol is recommended.
Here, we will discuss a relatively technical topic: what is RMTP streaming, its benefits, and how we can implement it when live streaming our videos.
Let us begin with the first one: what is RMTP streaming?
What Is RMTP Streaming?
RMTP stands for Real-Time Messaging Protocol, and in a nutshell, is a content delivery method that is specially designed and optimized for video live-streaming.
RTMP is a part of Adobe’s proprietary protocol and was originally developed by Macromedia before it was purchased by Adobe. So, it is actually a fairly old protocol.
A common misconception is to think that RTMP is a codec, but it’s not. Instead, it typically leverages the H.264 advanced video coding.
RMTP is instead based on TCP (Transmission Control Protocol) and is versatile enough to stream not only video, but also audio, text, and even text content.
A key characteristic of RTMP is that it splits data/files into chunks so it can deliver the stream smoothly. RTMP, albeit being a relatively old protocol, is still the standard for streaming your videos to your online video platform (like Viloud player or YouTube).
However, it’s no longer the preferred protocol to deliver streams to viewers (where newer protocols like HLS) is preferred. So, RTMP works together with another protocol (like HLS) to make a seamless, fast live-streaming possible.
So, when streaming with RTMP, video content typically follows the following workflow:
- Streamed by camera/video source to an RTMP encoder
- The RTMP encoder prepares the content for delivery
- After it is prepared into a ready-to-stream format, it is then sent to a video hosting platform (like Viloud or directly to YouTube).
- It is then encoded for delivery to viewers using HLS protocol
- Distributed to viewers
Pros and Cons of RTMP Streaming
While RTMP is, as discussed, the most common protocol used for delivering content from a video source (camera) to a video hosting platform at the moment, it’s not 100% perfect. Below are some of the benefits and disadvantages of RTMP streaming.
Pros:
- Being an Adobe proprietary protocol, it is natively supported by flash players and various Adobe products. Flash-based players are still one of the most common forms of internet video streaming players at the moment.
- Being a passive protocol, it doesn’t have any limitation with active client connection (this doesn’t apply to RTMFP)
- Optimized for live streaming and allows dynamic streaming (where video quality is automatically adjusted based on the viewer’s available bandwidth)
- Widely adopted, so it has a broad DRM support
Cons:
- RTMP only works in Flash players and won’t work in HTML 5 players which are rapidly increasing in popularity
- Newer codecs like H.265 are not supported by RTMP
- RTMP data is streamed to the player (not directly to the viewer), so it requires higher bandwidth than the video’s actual bitrate. As a result of this, when there’s a drop in connection, the stream will stutter.
- Most RTMP content is sent via port 1935, which is a non-standard port. So it’s often blocked by firewalls. We can bypass this issue by tunneling the content over HTTP (via RTMPT), but it will burden the server and result in a drop in performance.
The Current State of RTMP
Although Flash players are still pretty common on many websites, it has been steadily replaced especially by HTML 5 players. In fact, Adobe itself will stop supporting Flash after 2020. So, what will it mean for RTMP?
It’s important to note that despite the decline of Flash, this won’t mean RTMP will completely go away.
Mainly due to its widespread popularity until recent years, and the versatility of the protocol, RTMP is still used by Facebook Live, YouTube, and Twitch, among other popular platforms.
Although RTMP has its disadvantages (like what we’ve discussed above), we can still expect widespread use of RTMP at least for the next five years.
RTMP Streaming With Viloud
With Viloud, you can broadcast live video via any RTMP hardware encoder or software encoders like OBS and Wirecast. This way, you can embed a Viloud player on a website or send the live feed to your Viloud channel(s).
The channel will automatically switch to a live state, and when the live broadcast ends it will switch into its normal (VOD or linear) state.
End Words
Even with the decline of flash players, RTMP encoders will still be the leading protocol to deliver your video content to the video hosting solution, at least for the next five years.
So, getting a video hosting service that supports RTMP, like Viloud, is very important if you want to ensure a stable, high-quality live broadcast whether on your website or in third-party platforms like Facebook Live or a Roku Channel.