Nginx RTMP Module logo

Nginx RTMP Module

High‑performance NGINX RTMP server for live and on‑demand streaming

A versatile NGINX module delivering RTMP, HLS, and MPEG‑DASH live streams, VOD, recording, and FFmpeg‑based transcoding, with low memory footprint and extensive client compatibility.

Nginx RTMP Module banner

Overview

Overview

The NGINX RTMP module turns a standard NGINX installation into a powerful media streaming engine. It targets developers and broadcasters who need a programmable, low‑overhead solution that integrates directly with existing web servers.

Capabilities

It natively handles RTMP, HLS, and MPEG‑DASH for live delivery, and can serve VOD from local FLV/MP4 directories. Built‑in recording lets you capture streams in configurable FLV chunks, while the exec directive launches FFmpeg for on‑the‑fly transcoding or custom processing. HTTP callbacks (on_publish, on_play, on_done, etc.) enable external authentication and analytics. Multi‑worker auto‑push distributes streams across several NGINX workers for scalability. The module runs on Linux, FreeBSD, macOS and Windows (with limited features) and works with popular clients such as Wirecast, Wowza, JWPlayer, and ffmpeg. Advanced buffering keeps memory usage minimal, and XML/XSL statistics are available via HTTP for monitoring.

Highlights

Supports RTMP, HLS, and MPEG‑DASH for live and VOD
Built‑in recording with configurable FLV/MP4 storage
FFmpeg‑driven on‑the‑fly transcoding via exec directives
Multi‑worker auto‑push architecture for scalable distribution

Pros

  • Low memory usage thanks to advanced buffering
  • Broad client compatibility (Wirecast, Wowza, JWPlayer, etc.)
  • Flexible HTTP callbacks and external program execution
  • Cross‑platform support: Linux, FreeBSD, macOS, Windows

Considerations

  • Windows build lacks exec, static pulls, and auto_push
  • Requires manual compilation into NGINX
  • No native graphical management interface
  • Transcoding depends on external FFmpeg installation

Managed products teams compare with

When teams consider Nginx RTMP Module, these hosted platforms usually appear on the same shortlist.

Agora Interactive Live Streaming logo

Agora Interactive Live Streaming

Real-time interactive live video with sub-second latency.

Amazon IVS logo

Amazon IVS

Managed low-latency live streaming on AWS.

Ant Media Server logo

Ant Media Server

Ultra-low latency live streaming server with WebRTC, HLS, SRT, and RTMP

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Small to medium live streaming services needing custom workflows
  • Integrating streaming with existing web infrastructure
  • Developers requiring programmable callbacks and event‑driven actions
  • Environments where low memory footprint is critical

Not ideal when

  • Windows‑only deployments needing full feature set
  • Users seeking a turnkey commercial platform with UI
  • Scenarios requiring built‑in DRM or advanced authentication
  • Projects unable to compile NGINX modules themselves

How teams use it

Live webinar broadcasting

Publish a single RTMP stream and deliver HLS/DASH to web browsers and mobile devices with minimal latency.

On‑demand video library

Serve pre‑recorded FLV/MP4 files via VOD application, with optional per‑stream recording for archival.

Adaptive bitrate transcoding

Automatically transcode incoming high‑resolution streams to lower resolutions using FFmpeg exec, then redistribute via a separate application.

Distributed edge streaming

Push live streams from a central server to multiple remote NGINX workers for load‑balanced delivery.

Tech snapshot

C98%
XSLT1%
HTML1%
Shell1%

Frequently asked questions

How do I enable HLS output?

Add `hls on;` and set `hls_path` inside an application block; serve the directory via an HTTP location.

Can the module record streams automatically?

Yes, using the `record` directives (e.g., `record all; record_path /tmp/av;`).

Do I need FFmpeg installed for transcoding?

Transcoding relies on external FFmpeg; the module only launches the command via `exec`.

Is there support for authentication?

Basic allow/deny rules are available for publish/play; more complex auth can be implemented via HTTP callbacks (`on_publish`, `on_play`).

What are the limitations on Windows?

Windows builds do not support `exec`, static pulls, or `auto_push` directives.

Project at a glance

Dormant
Stars
13,971
Watchers
13,971
Forks
3,595
LicenseBSD-2-Clause
Repo age13 years old
Last commitlast year
Primary languageC

Last synced yesterday