nginx+nginx_mod_rtmp流媒体服务器搭建手记已经进过nginx怎么安装rtmp模块支持直播 这篇文章里讲的都是简单的测试,并没有讲直播的测试。这篇文件来讲一下测试直播
在这个nginx-rtmp-module模块下面就有测试的demo,我们以这个demo程序来做测试
nginx.conf底下添加配置
rtmp { server { listen 1935; application myapp { live on; } } }在测试的域名上nginx.conf文件添加如下配置
server { listen 80; server_name live.phpsong.com; location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root /usr/local/nginx/nginx_mod/nginx_mod_rtmp/; } location /control { rtmp_control all; } location /publish { return 201; } location /play { return 202; } location /record_done { return 203; } location /rtmp-publisher { root /usr/local/nginx/nginx_mod/nginx_mod_rtmp/test; } location / { root /usr/local/nginx/nginx_mod/nginx_mod_rtmp/test/www; } }修改hosts文件
192.168.171.23 live.phpsong.com现在就可以实现直播了
客户端: http://live.phpsong.com/index.html
直播端: http://live.phpsong.com/record.html
QQ交流群:136351212
查看原文:https://www.phpsong.com/2638.html
基于nginx-rtmp-module直播测试
最新推荐文章于 2025-03-27 15:48:04 发布