乌班图 安装 nginx rtmp服务器

乌班图 安装 nginx rtmp服务器

安装所需要的库
$sudo apt install build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev

安装nginx
$wget http://nginx.org/download/nginx-1.15.0.tar.gz

下载nginx-rtmp-module

$ wget https://github.com/arut/nginx-rtmp-module/archive/master.zip

解压文件,进入nginx目录

$ tar -zxvf nginx-1.15.0.tar.gz

$ unzip master.zip

$ cd nginx-1.15.0

进行编译和安装

./configure --with-http_ssl_module --add-module=…/nginx-rtmp-module-master --with-cc-opt=“-Wno-error -Wno-deprecated-declarations”

$ make

$ sudo make install

安装rtmp 服务插件
vim /usr/local/nginx/conf/nginx.conf 在最后添加
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}

安装完成之后,可以运行

启动
$ sudo /usr/local/nginx/sbin/nginx
停止
$ sudo /usr/local/nginx/sbin/nginx -s stop

推流地址格式:rtmp://192.168.204.141:1935/live/test

参考
https://blog.csdn.net/mbdong/article/details/119799552
https://blog.csdn.net/helixiao/article/details/99441329

web端播放器可以使用VLC,下载地址为
https://www.videolan.org/

利用libx264 转yuv码流为h264
https://blog.csdn.net/qq_41248872/article/details/83068869

https://blog.csdn.net/leixiaohua1020/article/details/42078645

https://www.cnblogs.com/dong1/p/10290343.html

下载libx264
https://blog.csdn.net/w13511069150/article/details/124097292

libx264 文章阅读
https://blog.csdn.net/qq_34771252/article/details/90207617

libx264 在各个平台编译问题,可以借鉴以下方法:
https://www.cnblogs.com/dong1/p/10290343.html

web网页播放网络视频方案学习
https://blog.csdn.net/a843334549/article/details/117319350

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值