RTMP Server Comparison
My experiences with RTMP servers used for Live Streaming.
We needed to do live streaming for our client's project. Due to certain reasons, using the RTMP protocol became mandatory. In this article, I plan to share my experiences with RTMP servers.
Live streaming technology, as you know, is quite expensive. Therefore, considering our client's budget constraints and expectations (traffic, instant load), we predicted that turning to open-source solutions wouldn't cause any problems. We had the opportunity to test several during this process. These are:
Nginx RTMP
Nginx RTMP is a module built on Nginx. With this module, we can broadcast RTMP through Nginx. To set up an RTMP server, we need to compile Nginx with this module. We quickly set up the installation and test environment. Being a module, it doesn't offer many features; it only provides a screen for statistics.
It performs its function quite successfully. The limits are clear, and if this is sufficient for you, I recommend this module. Resource consumption is much lower compared to others, and its performance under load is quite good. Also, the configuration is simple and understandable.
SRS
SRS is a quite advanced RTMP server. Unlike Nginx RTMP, it offers many features. For example, it supports many protocols such as WebRTC, HLS, HTTP-FLV. During our tests, while v4 was the stable version, v5 with many additional features wasn't as stable. You can do a quick installation with Docker. However, the interface it offers is a bit confusing and sometimes can be in Chinese.
We experienced a handshake problem between the mobile library we used and SRS. It took some effort to solve because the solution was in Chinese. Since we couldn't solve this problem with v4, we switched to v5. However, we experienced another stability problem with v5. The application was randomly crashing occasionally. For this reason, we didn't use SRS. Of course, this is a problem specific to our use case and mobile libraries. It could be a very good option in your situation.
Node Media Server
Node Media Server is an RTMP server written in Node.js. In terms of features, the ranking might be: SRS > Node Media Server > Nginx RTMP. Installation is simple and fast. Also, since it's written in Node.js, you can easily customize it. It has the highest resource consumption. Node Media Server offers the cleanest and simplest interface.
While we didn't experience problems with the first versions regarding mobile library support, we started experiencing problems later. The lack of active maintenance for the library was a negative situation for us.
Conclusion
To evaluate in general:
- Installation: Ease of installation
- Interface: Ease of use of the provided interface
- Resource Consumption: Resource usage
- Features: Features offered
- Maintenance: Active maintenance process
| Installation | Interface | Resource Consumption | Features | Maintenance | |
|---|---|---|---|---|---|
| Nginx RTMP | 3 | 3 | 1 | 3 | 2 |
| SRS | 2 | 2 | 2 | 1 | 1 |
| Node Media Server | 1 | 1 | 3 | 2 | 3 |
1 = good, 2 = medium, 3 = poor
Our choice was Nginx RTMP. You can also make a choice according to your use case. I hope this information has been helpful for you.