nginx rtmp win32配置

下载版本

官方的nginx不带rtmp模块,可在
https://github.com/illuspas/nginx-rtmp-win32
使用:nginx-rtmp-win32-1.2.1.zip

配置文件

nginx.conf

worker_processes  1;
error_log  logs/error.log debug;
events {
    worker_connections  1024;
}
rtmp_auto_push on;
rtmp_auto_push_reconnect 1s;
rtmp_socket_dir /tmp;
rtmp {
    out_queue 4096;
    out_cork 8;
    max_streams 4096;
    server {
        listen 90;


        drop_idle_publisher 30s;
		
        application live {
            live on;
        }
		
      
    }
}

http {
    server {
        listen      80;
		
        location / {
            root html;
        }
		
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root html;
        }
		
       
    }
}

/tmp需要有可写权限。

推流地址

http://ip:90/live/test

播流

也使用推流同样地址即可

更多推荐