基于nginx-rtmp-module直播测试

nginx+nginx_mod_rtmp流媒体服务器搭建手记已经进过nginx怎么安装rtmp模块支持直播 这篇文章里讲的都是简单的测试,并没有讲直播的测试。这篇文件来讲一下测试直播

基于nginx-rtmp-module直播测试

在这个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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值