一、序言
核心:服务端(nginx-rtmp-module) + 推流端(OBS) + 接受端(jwplayer)
二、服务端
1. 下载nginx-rtmp-module模块
地址:https://github.com/arut/nginx-rtmp-module
2. 编译安装nginx
cd ./nginx-1.10.0/
./configure --add-module=/path/to/nginx-rtmp-module --with-http_ssl_module
make
make install
注:根据实际情况修改两处代码路径
3. 配置nginx
3.1 加入节点
rtmp {
server {
listen1935;
application mytv {
live on;
}
}
}
注:mytv是应用名称
3.2 RTMP监听状态(可选)
http {
server {
listen8080;#This URL provides RTMP statistics in XML
location /stat{
rtmp_stat all;#Use this stylesheet to view XML as web page
#in browser
rtmp_stat_stylesheet stat.xsl;
}
location/stat.xsl {#XM