Is RTMP still the ingest standard?
For ingest, yes. RTMP was created for Flash, and Flash reached end of life in December 2020, yet RTMP is still the protocol nearly every encoder uses to send video to a server: OBS, vMix, hardware encoders and the big platforms all accept it. What changed is the other half of the trip.
- RTMP for delivery, from server to viewer, is practically gone. Browsers do not play it, so viewers receive HLS or WebRTC.
- RTMPS, which is RTMP over TLS, became the norm at some platforms. Facebook, for example, only accepts RTMPS.
- Alternatives grew up around it: SRT for unstable networks, RIST in broadcast contribution and WHIP for WebRTC ingest.
If someone on a new project tells you not to use RTMP because it is old, be skeptical. Old is not the problem. A badly built server is.
How Nginx RTMP works inside
The nginx-rtmp-module, written by Roman Arutyunyan and released in 2012 under a BSD license, adds RTMP to the Nginx web server. It listens on port 1935 and can cut the incoming stream into HLS segments that Nginx then serves over HTTP.
- OBS sends RTMP to port 1935 on your server.
- The module accepts the connection and, if you configured it, checks the stream key.
- It writes the HLS playlist (.m3u8) and the segments (.ts) to disk.
- Nginx's http block serves those files over HTTP or HTTPS.
- The player in the browser requests the playlist and downloads the segments.
A minimal configuration looks like this:
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
# Key check before accepting a publisher
notify_method get;
on_publish http://127.0.0.1:8081/auth;
# HLS for viewers
hls on;
hls_path /var/www/hls;
hls_fragment 2s;
hls_playlist_length 12s;
# Basic relay to YouTube
push rtmp://a.rtmp.youtube.com/live2/YOUR-STREAM-KEY;
}
}
} What it gives you: RTMP ingest with very little overhead, HLS output that any web or mobile player can read, basic relaying to other RTMP endpoints with push, and a stats page in XML.
What it does not give you: adaptive bitrate (it passes on only the quality it receives, so 480p, 720p and 1080p at once means running FFmpeg next to it), SRT, WebRTC, an admin panel (everything lives in configuration files) or active maintenance of the original module, which has been largely dormant for years while community forks patch it. The complete setup, with the http part and security, is in how to set up an RTMP server.
What a self-hosted Nginx RTMP really costs
This is where "self-hosted is free" falls apart. Take a realistic scenario: 500 concurrent viewers, 8 hours a day, with 480p, 720p and 1080p qualities.
Bandwidth is the line that sinks the budget
At an average of 2 Mbps per viewer, 500 viewers need 1 Gbps of sustained output, the entire port of a typical VPS. Over a month, the transfer is 500 viewers × 8 hours × 30 days × 0.9 GB per viewer-hour: 108 TB. Most VPS plans include a few terabytes and bill the rest, and at that size you also need a CDN in front, which bills by the gigabyte too. Run this number with your provider's real rates before anything else.
The rest of the bill, in resources and hours
| Item | What it takes | Why |
|---|---|---|
| Server | 8 vCPU and 16 GB of RAM | Encoding three qualities with x264 in real time |
| CDN | Billed per GB delivered | Unless you serve everything from the VPS |
| Recording storage | About 200 GB of object storage | Keeping the archive off the streaming disk |
| Monitoring | Uptime checks plus metrics | You need to know when it fails |
| Maintenance | 4 to 6 hours a month | Updates, patches, debugging |
| Initial setup | 16 to 24 hours | Before the first frame goes out |
Add a TLS certificate with automatic renewal (free with Let's Encrypt, but someone has to set it up) and a load test: simulating 500 viewers with tools such as k6 or Locust needs another temporary server for a day or two.
The invisible cost: your time when something fails
- Overloaded server mid-stream: transcoding hits 100% CPU, frames drop and viewers see buffering. You stop, resize the server and start again: 25 to 40 minutes lost on air.
- Leaked stream key: someone guesses it or finds it in a badly built web page and starts broadcasting on your channel. You rotate the key, update the encoder and reconnect.
- Attack on port 1935: the firewall cannot cope, the machine goes down and you wait for a reboot. With nothing in front of it, a single VPS is an easy target.
Technical limits of Nginx RTMP
Adaptive bitrate takes extra engineering
To create several qualities you combine the module with FFmpeg, usually launched with exec_push for each incoming stream. The load depends on the source, codec, preset, resolutions and any hardware acceleration, so measure resources and stability with the exact configuration you will run in production.
Monitoring is yours to build
The stat page returns XML with basic metrics: active streams, bitrate, connections. For anything serious you export it to Prometheus with an unofficial exporter, set Grafana alerts for CPU, memory, dropped frames and unstable bitrate, and send them to Slack, Telegram or PagerDuty. That is a small platform around the module, easily a sprint of work.
Redundancy is practically nonexistent
Nginx RTMP has no native clustering. If the server goes down, the stream goes down. Homemade fixes, such as DNS failover or a second server fed by a second encoder, work, but they need more infrastructure and constant testing.
Security comes in pieces
- Stream keys are plain text unless you add an on_publish check against an HTTP endpoint.
- HLS URLs are open: anyone with the .m3u8 can embed your stream. Nginx's secure_link module can sign them, but you write the token logic.
- There is no geoblocking without another layer, such as a GeoIP module or a CDN rule.
- push cannot send RTMPS, so platforms that require it, such as Facebook, need a TLS tunnel in between.
- DRM requires an external solution and a license server.
For comparison, a managed service covers most of this list out of the box. On XtreamCast, SecureToken protects stream URLs in HLS, LL-HLS, WebRTC and SRT, geoblocking works by country and ShieldPower keeps the player on your domains, as explained on our streaming security page. DRM is not on that list: we do not offer it either.
Nginx RTMP vs MediaMTX, SRS and Ant Media
If Nginx RTMP falls short but you want to stay self-hosted, there are more modern options.
MediaMTX
Formerly called rtsp-simple-server, MediaMTX is written in Go and ships as a single binary with no dependencies. It accepts and serves RTSP, RTMP, HLS, WebRTC and SRT, and you configure it with one YAML file that is easy to keep under version control. Development is active. Like Nginx RTMP, it does not create adaptive bitrate qualities without FFmpeg, and it has no graphical panel.
This is where the difference between RTMP and RTSP matters. RTMP is pushed: the encoder opens a TCP connection, usually on port 1935, and sends the stream to the server. RTSP is mostly pulled: it is the control protocol that IP cameras and video recorders expose, usually on port 554, with the media traveling over RTP, and the server or player connects to the camera to fetch it. Browsers play neither. Nginx RTMP only speaks RTMP; MediaMTX speaks both, which makes it the natural choice when your sources are IP cameras.
SRS
SRS (Simple Realtime Server) is MIT licensed and built for performance, with edge servers that cluster like a small CDN. It supports RTMP, HTTP-FLV, HLS, SRT and WebRTC and has an official Docker image. Much of its community discussion happens in Chinese, and it has no native adaptive bitrate either.
Ant Media Server
Ant Media has a free, open source Community Edition and a paid Enterprise Edition. Clustering and adaptive bitrate, which are what make its WebRTC scale to large audiences, live in the Enterprise Edition, and the cost grows with the number of servers.
| Feature | Nginx RTMP | MediaMTX | SRS |
|---|---|---|---|
| RTMP ingest | Yes | Yes | Yes |
| SRT | No | Yes | Yes |
| WebRTC | No | Yes | Yes |
| Adaptive bitrate | External FFmpeg | External FFmpeg | External FFmpeg |
| Clustering | No | No | Edge servers |
| Configuration | nginx.conf | One YAML file | Configuration file |
For the protocol side of the decision, read SRT vs RTMP.
When Nginx RTMP is the right call
Not everything is negative. These are the cases where running your own Nginx RTMP is the correct decision:
- Testing and development: you are building a streaming app and need an RTMP endpoint for OBS. A small VPS is perfect: start it, test, delete it.
- Small audiences: a video podcast with 30 to 60 live viewers, an internal channel for 80 employees. Under roughly 100 concurrent viewers the numbers work, and if you run it well you spend less than on any managed plan.
- Strict internal networks: banking, health or government, when policy forbids the signal from leaving your infrastructure. An on-premises server complies, and IT absorbs the operating cost.
- Learning: breaking and fixing your own server a few times is the best way to understand streaming from the inside.
- A basic relay to two or three destinations: receive RTMP from OBS and push it to YouTube and others, with nothing else on top.
And when not to, however tempting: your business depends on not going down, your audience regularly passes 200 concurrent viewers, nobody is on call outside office hours, or you sell the service to clients with an SLA. If you need DRM or a paywall, Nginx will not give them to you, and neither will we: that is a job for an OTT platform.
The question is not whether Nginx RTMP is good. It is whether your time is worth more running the server or producing the content. If it is the second, pay for a managed one.
Signals that it is time for a managed server
| Signal | Why it matters | Action |
|---|---|---|
| Audience regularly above 200 concurrent viewers | CPU near its limit, dropped frames, buffering reports | Migrate before the next big event |
| An unplanned outage at a critical hour | Lost revenue and reputation; once is enough | Evaluate a managed service with a contractual SLA |
| More than 6 hours a month spent on the server | High opportunity cost | Calculate the real total and compare |
| Restream to more than 4 destinations | Every push leaves from your server and multiplies its upload | Use a service with built-in Restream |
Work out your break-even with hours, not guesses. Take the hours a month your team spends on the server, multiply them by what an hour of that person costs, and add the server, the bandwidth and the CDN. Then compare the total with a managed plan: on XtreamCast, Pro+ costs USD 115/month, comes with WebRTC Ultra Low Latency and XtreamTranscoder enabled and includes 3 TB of monthly transfer, Restream, Recording Cloud and 24/7 human support, with a 99.995% monthly uptime SLA. In many teams the hours alone cover the plan, before counting what a two-hour outage in the middle of a campaign costs.
Three questions settle it: what an hour of your technical team is worth, what an hour of downtime costs you, and whether someone is ready to answer at 9 a.m. on a Sunday when the server fails. If those answers are uncomfortable, run the checklist in how to choose a streaming server and look at our managed RTMP server.
How to migrate from Nginx RTMP without downtime
How long a migration takes depends on channels, files, integrations and tests. This plan works for a typical single-channel setup: inventory everything first, and keep the old server until the new one has proved itself.
Day 1: parallel setup
- Create the channel on the managed service.
- Match the qualities you had. On XtreamCast, XtreamTranscoder keeps your original and adds 720p, 480p and 240p.
- Send a test stream from OBS to the new RTMP endpoint and check that HLS plays.
- Embed the new player on a staging page.
Day 2: dual output
- OBS cannot send to two servers on its own: install the Multiple RTMP Output or the Aitum Multistream plugin.
- Broadcast a real event to both endpoints and compare stability and quality.
- Check Restream on the managed side, if you use it.
- If everything holds, move the embed from staging to production and keep the old URL as a fallback.
Day 3: switchover
- Point OBS only at the new server.
- Watch the first week closely: viewers, bitrate and reported errors.
- Keep the old server running as a fallback for 30 days, then shut it down.
What usually goes wrong
- URLs hard-coded in mobile apps: publish a new app version before the switchover.
- Old embed codes on third-party sites: find out who embeds your player, such as clients and partners.
- Viewers with the .m3u8 bookmarked: a redirect from the old URL helps.
- New stream keys: document them and update every encoder.
Assisted migration is part of our Enterprise+ plan. We have run streaming servers since 2011, first as STREAMINGHD and since 2023 as XtreamCast, and moving to a managed service does not mean RTMP is dead. It means someone else operates it while you focus on the content.
Keep RTMP, drop the server maintenance
Point your encoder at a managed RTMP or SRT ingest and get HLS delivery, Restream and Recording Cloud, with 24/7 human support on paid plans.