1. 程式人生 > >nginx-rtmp-module

nginx-rtmp-module

http{}
# RMTP的伺服器配置資訊
rtmp {
        server {
                listen 1935; #推流的監聽埠
                chunk_size 4000;
                publish_time_fix on;

                # 推流其一
                application live {
                        live on; #stream on live allow
                        allow publish all; # control access privilege
                        allow play all; # control access privilege
                }
                #推流其二
                         application hls {
                        live on;
                        hls on;
                        hls_path  /usr/share/nginx/html/hls;
                        hls_fragment 5s;
                }
        }
}