需要准备的资料
https://github.com/arut/nginx-rtmp-module
http://nginx.org/en/download.html
https://obsproject.com/
http://www.videolan.org/vlc/
官方中文文档
https://www.jianshu.com/nb/20132113
安装nginx+nginx-rtmp
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
unzip master.zip
配置文件如下
./configure --sbin-path=/usr/bin/nginx --add-module=../nginx-rtmp-module-master
#默认安装路径/usr/local/nginx
配置直播环境
cd nginx/conf
vi nginx.conf
## 在跟节点下写入以下配置
rtmp{
server{
listen 1935;
application myapp{
live on;
}
}
}
重启nginx即可。
cd /usr/local/nginx/sbin/
./nginx -s reload
推流测试
Image 2.png
然后点击开始推流
播放测试
Image 3.png










网友评论