nginx安装nginx-rtmp-module视频流媒体播放服务器模块
来源:互联网 发布:phaser.js 编辑:程序博客网 时间:2024/05/29 17:30
一、下载 nginx-rtmp-module
官方github地址:https://github.com/arut/nginx-rtmp-module
git clone https://github.com/arut/nginx-rtmp-module.git
如果无法执行 -bash: git: command not found 说明没有安装git
安装git: yum -y install git
二、安装:nginx
wget http://nginx.org/download/nginx-1.8.1.tar.gz
tar -zxvf nginx-1.8.1.tar.gz
cd nginx-1.8.1
./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module
make && make install
安装中遇到的问题:
问题1:编译C 问题(在nginx-1.8.1目录下) yum install gcc gcc-c++
问题2:make编译问题(在nginx-1.8.1目录下)yum -y install openssl openssl-devel
问题3:./configure: error: the HTTP rewrite module requires the PCRE library.错误
yum -y install pcre-devel
三、修nginx配置文件
server {
listen 1935; #监听的端口
chunk_size 4000;
application hls { #rtmp推流请求路径
live on;
hls on;
hls_path /usr/local/nginx/html/hls;
hls_fragment 5s;
}
}
}
还有就是这个路径,看你自己的实际情况的访问根目录来,我的是/usr/local/nginx/html/这个路径,然而/usr/local/nginx/html/hls肯定没有这个目录,所以需要建一个放流文件的目录hls,并且需要改权限可读可写的权限
修改http中的server模块:
主要是改了一下端口号,改成了81;然后root目录 按实际情况改!
server {
listen 81;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/local/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
然后启动nginx:
/usr/local/nginx/sbin/nginx
关于更多rtmp的参数可以参考:https://github.com/arut/nginx-rtmp-module/wiki
参考地址:http://www.cnblogs.com/lipcblog/p/6824145.html
http://blog.csdn.net/ystyaoshengting/article/details/48436409 如何安装nginx第三方模块--add-module
- nginx安装nginx-rtmp-module视频流媒体播放服务器模块
- 使用nginx与nginx-rtmp-module搭建 rtmp 流媒体服务器
- 基于nginx和nginx-rtmp-module搭建rtmp流媒体服务器
- 安装Nginx相关模块+nginx-rtmp-module
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- 使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- 使用nginx与nginx-rtmp-module搭建流媒体服务器
- memcached 介绍及启动
- 这里是一个蒟蒻(距离noip只有32天还在浪)
- grep常用用法
- Oracle笔记八:复杂查询及总结
- Activiti 个人任务(三种指派方式)
- nginx安装nginx-rtmp-module视频流媒体播放服务器模块
- 9月30日云栖精选夜读:阿里巴巴摘得LSVC桂冠 打造领先AI视频技术
- android.os.DeadSystemException
- Codeforces Round #305 (Div. 1) B. Mike and Feet(单调栈)
- IDEA构建UDF函数&注册到Hive源码&编译&验证及使用
- c++ 引用
- 深入理解Feign之源码解析
- 在Reactjs中使用Redux
- SVN的安装与配置