RTMP#
The RTMP module provides live streaming capabilities in HLS and MPEG-DASH formats for those who want to use a simplified solution based on the HTTP protocol. The stream is published in MPEG-TS format over HTTP.
Installation#
To install the module, use one of the following packages:
Angie:
angie-module-rtmp;Angie PRO:
angie-pro-module-rtmp.
Loading the Module#
Load the module in the main{} context:
load_module modules/ngx_rtmp_module.so;
Configuration Example#
http {
server {
listen 443 ssl;
server_name example.com;
ssl_certificate /var/ssl/example.com.pem;
ssl_certificate_key /var/ssl/example.com.private;
location /keys {
root /tmp;
}
}
server {
listen 80;
server_name example.com;
location /hls {
root /tmp;
}
}
}
rtmp {
server {
listen 1935;
hls on;
hls_path /tmp/hls;
hls_keys on;
hls_key_path /tmp/keys;
hls_key_url https://example.com/keys/;
hls_fragments_per_key 2;
}
}
Additional Information#
Version: v1.2.2
Detailed documentation and source code are available at: arut/nginx-rtmp-module