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. To install the module, use one of the following packages: Angie:  Angie PRO:  Connecting the module in the context of  Detailed documentation and source code are available at:
arut/nginx-rtmp-moduleInstallation#
angie-module-rtmpangie-pro-module-rtmpLoading the Module#
main{}: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#