nginx 搭建rtmp直播服务器
2017-11-30 16:22
393 查看
rtmp直播
mac 环境.
rtmp直播
安装
部署
直播
点播
问题
openssl 安装升级
brew 安装
源码安装
直播排查
安装
nginx 官网地址rtmp 模块地址
./configure --add-module=../nginx-rtmp-module/ --with-http_ssl_module make && make install
部署
直播
rtmp { server { listen 1935; chunk_size 4096; application live { live on; record off; } }
直播地址为 : rtmp://192.168.31.185/live/
点播
application vod { play /var/flvs; }
点播地址 : rtmp://192.168.31.185/vod/ 后面加上配置目录下对应文件名
http://www.tuicool.com/articles/iauQNr 点播处的地址写法不对,是rtmp开头
问题
openssl 安装升级
brew 安装
brew install opensslln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/bin/openssl
这样系统自带的openssl 还是在/usr/bin 下, 但不会影响我们新装的openssl
openssl version 确认版本
源码安装
https://www.openssl.org/openssl 建议选用1.0.2 稳定版 http://stackoverflow.com/questions/35965735/how-to-make-librtmp-compile-on-mac-os-x
./config 执行时会有提示 选择编译的版本,x86_64需要执行后面的命令
./Configure darwin64-x86_64-cc
查看编译位数 lipo -info *.a
没有安装openssl库的 [需要下载openssl](https://www.openssl.org/)并指定路径 –with-openssl=../openssl-OpenSSL_1_0_2j/
手动修改 objs/Makefile:
./config –prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
改成
./Configure darwin64-x86_64-cc –prefix=/Users/xxx/Downloads/openssl-1.0.1e/.openssl no-shared no-threads
直播排查
通过ffmpeg推流、ffplay拉流验证服务是否正常通过自己程序推流时,抓包查看rtmp交互流程,并注意是否有关键帧
调用ffmpeg库推流时,注意编码后avpkt的 flag、pts、dts、duration等是否正常
相关文章推荐
- OSX安装nginx和rtmp模块(rtmp直播服务器搭建)
- 搭建直播服务器,使用nginx与nginx-rtmp-module搭建流媒体服务器;
- Mac上搭建直播服务器Nginx+rtmp
- 搭建直播服务器,使用nginx与nginx-rtmp-module搭建流媒体服务器;
- 树莓派nginx+rtmp搭建直播服务器
- NGINX-RTMP直播服务器搭建-OBS录制推流-VLC视频流播放
- 简单直播实现(一:创建本地rtmp服务器)Mac上搭建直播服务器Nginx+rtmp
- iOS简单直播实现(一:创建本地rtmp服务器)Mac上搭建直播服务器Nginx+rtmp
- OSX安装nginx和rtmp模块(rtmp直播服务器搭建)
- 使用Nginx+nginx-rtmp-module搭建直播服务器
- Mac上搭建直播服务器Nginx+rtmp
- 树莓派使用nginx+rtmp搭建直播服务器
- Mac上搭建直播服务器Nginx+rtmp
- Nginx 搭建rtmp直播服务器
- [置顶] 利用Nginx—rtmp—moudle搭建直播服务器
- Mac上搭建直播服务器Nginx+rtmp
- iOS简单直播实现(一:创建本地rtmp服务器)Mac上搭建直播服务器Nginx+rtmp
- OSX安装nginx和rtmp模块(rtmp直播服务器搭建)
- Mac上搭建直播服务器Nginx+rtmp
- Nginx搭建rtmp流媒体服务器(Ubuntu 14.10)