Generated by GPT-5-mini| Nginx RTMP module | |
|---|---|
| Name | Nginx RTMP module |
| Author | Igor Sysoev; H. Y. Zhuang (contributors) |
| Initial release | 2012 |
| Operating system | Linux, FreeBSD, Windows (via ports) |
| License | BSD license-style |
Nginx RTMP module
The Nginx RTMP module is an open-source extension for the Nginx web server that implements real-time media streaming using the Real Time Messaging Protocol and related protocols. It integrates with existing Nginx event-driven architecture to provide live and on-demand streaming suitable for broadcasters, enterprises, and cloud providers such as Amazon Web Services, Google Cloud Platform, and Microsoft Azure. The project has influenced implementations in content delivery networks like Akamai Technologies and players such as VLC media player and OBS Studio.
The module brings RTMP support to Nginx by handling incoming RTMP publishing from encoders like FFmpeg, Wirecast, and XSplit Broadcaster, and distributing streams to clients using protocols adopted by platforms including YouTube, Facebook Live, and Twitch. It interoperates with streaming standards and tools such as HLS (HTTP Live Streaming), MPEG-DASH, and the RTSP ecosystem, enabling workflows familiar to operators of BBC, CNN, and NBC News who require resilient live delivery.
Primary features include RTMP ingest, HLS packaging, DVR-like recording, on-the-fly transcoding hooks, and stream authentication compatible with services like Akamai Technologies and Cloudflare. The module supports recording archives for publishers such as The New York Times and The Guardian, live relaying for distributors like Red Bull Media House, and stat metrics export that integrates with monitoring stacks used by Prometheus and Grafana. Its lightweight C implementation aligns with performance work in Linux kernel networking and high-performance proxies such as HAProxy.
Built as an Nginx module in C, the architecture leverages the Nginx event loop, worker model, and configuration parsing used by projects like OpenResty. Components include an RTMP session handler, a chunk assembler compatible with Adobe RTMP specifications, HLS segmenter influenced by Apple Inc. practices, and hooks for third-party modules from ecosystems like FFmpeg and GStreamer. Integration points mirror patterns used by NGINX Unit and Envoy for modular extensions.
Configuration uses the Nginx directive syntax familiar to administrators of Red Hat Enterprise Linux, Debian, and Ubuntu. Typical blocks define listeners, application contexts, and directives for live, record, and push behaviors resembling configuration strategies used by Apache HTTP Server and Lighttpd. Authentication, stream keys, and cross-origin settings are configured alongside TLS options found in OpenSSL and Let's Encrypt deployments for secure delivery.
Common workflows include ingest from encoders like OBS Studio and FFmpeg, packaging to HLS for mobile delivery on platforms such as iOS and Android, and origin-edge distribution to CDN providers like Akamai Technologies and Fastly. Use cases span live event coverage by organizations like Reuters, corporate town halls at IBM and Microsoft, remote education initiatives at Coursera and edX, and esports broadcasts for leagues like ESL.
Performance benefits derive from the non-blocking I/O model pioneered in Nginx and also seen in Node.js and NGINX Unit, enabling high concurrent connections similar to large-scale services from Netflix and YouTube. Scalability strategies include horizontal scaling with orchestration tools like Kubernetes, caching at edges with CDNs such as Cloudflare and Fastly, and offloading transcoding to distributed workers running FFmpeg or hardware encoders from NVIDIA. Benchmarks often reference throughput expectations found in carrier-grade systems by Cisco Systems and Juniper Networks.
Security is managed using TLS termination via OpenSSL or BoringSSL, token-based authentication patterns similar to OAuth 2.0, and IP-based allowlists deployed by enterprises like Bank of America and Goldman Sachs. Stream keys and signed URLs are used to restrict publisher access in workflows comparable to Stripe and PayPal payment integrations, while audit logging integrates with SIEM tools from Splunk and Elastic.
Development follows open-source practices used by projects such as Linux kernel and FFmpeg, with contributions via platforms like GitHub and issue tracking patterns akin to JIRA used by corporate teams. Extensions include third-party modules for DRM integrations used by Widevine and PlayReady, analytics hooks compatible with Google Analytics and Matomo, and containerized deployments aligning with Docker and Helm best practices. Cross-platform builds reference toolchains from GCC and Clang and packaging strategies employed by Debian and Homebrew.
Category:Streaming software