Nginx+rtmp+ffmpeg 搭建推流服务器
1. 安装nginx服务器
1.1 clone
$ brew tap denji/homebrew-nginx
1.2 安装
$ brew install nginx-full --with-rtmp-module
安装过程过程中可能会报错
➜ ~ brew install nginx-full --with-rtmp-module
==> Installing nginx-full from denji/nginx
Error: Xcode alone is not sufficient on High Sierra.
Install the Command Line Tools:
xcode-select --install
$ xcode-select --install

另一个报错信息,重新执行命令 brew install nginx-full --with-rtmp-module吧
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "rtmp-nginx-module--patch"
Download failed: https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/compare/v1.1.7.10...504b9ee.diff
1.3 启动/停止
$ sudo nginx
$ sudo nginx -s stop
1.4 查看配置信息
$ brew info nginx-full
Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. - Tips -
Run port 80:
$ sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
$ sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
$ nginx -s reload
Reopen Logfile:
$ nginx -s reopen
Stop process:
$ nginx -s stop
Waiting on exit process
$ nginx -s quit To have launchd start denji/nginx/nginx-full now and restart at login:
brew services start denji/nginx/nginx-full
Or, if you don't want/need a background service you can just run:
nginx
2. rtsp
2.1 对nginx添加对rtmp的支持 编辑文档
$ sudo vim /usr/local/etc/nginx/nginx.conf
在文旦最后面加入对rtsp的支持
# 在http节点后面加上rtmp配置:
rtmp {
server {
listen 1557;
application gllive {
live on;
record off;
}
}
}
保存之后重启服务
$ sudo nginx -s reload
2.2 使用ffmpeg进行推流
$ ffmpeg -re -i 560.mp4 -vcodec libx264 -acodec aac -strict -2 -f flv rtmp://localhost:1557/gllive/room
Nginx+rtmp+ffmpeg 搭建推流服务器的更多相关文章
- centos7+nginx+rtmp+ffmpeg搭建流媒体服务器(保存流目录与http目录不要随意配置,否则有权限问题)
搭建nginx-http-flv-module升级代替rtmp模块,详情:https://github.com/winshining/nginx-http-flv-module/blob/master ...
- (转)Nginx+rtmp+ffmpeg搭建流媒体服务器
(1)下载第三方扩展模块nginx-rtmp-module # mkdir module && cd module //创建一个存放模块的目录 # wget https://githu ...
- centos7+nginx+rtmp+ffmpeg搭建流媒体服务器
1.安装前需要的工具 #net-tool 查本地IP #wget 下载安装包 #unzip 解压zip包 #gcc gcc-c++ perl 编译软件包用 yum install -y net-too ...
- Linux-Nginx+rtmp+ffmpeg搭建流媒体服务器
Nginx+rtmp+ffmpeg搭建流媒体服务器 说明: nginx搭建流媒体服务需要用到 nginx-rtmp-module 模块 具体操作步骤: 安装nginx (1)下载第三方扩展模块ngin ...
- 使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参考: 1,使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器笔记(一)http://blog.csdn.net/xdwyyan/article/details/4319 ...
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...
- 流媒体技术学习笔记之(一)nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...
- Centos7 搭建Nginx+rtmp+hls直播推流服务器
1 准备工具 使用yum安装git [root~]# yum -y install git 下载nginx-rtmp-module,官方github地址 // 通过git clone 的方式下载到服务 ...
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器[转]
转 :http://redstarofsleep.iteye.com/blog/2123752 Nginx本身是一个非常出色的HTTP服务器,FFMPEG是非常好的音视频解决方案.这两个东西通过一个n ...
随机推荐
- 【问题】VS问题集合,不用也要收藏防止以后使用找不到
在日常的使用或者工作当中我们的vs会时不时的给我一些小“惊喜”.让我们有时候无可奈何.这不今天我又遇到了所以我决定记录下这些,方便以后再次出现好解决. 无法启动iis express web 服务器 ...
- Spring入门(一):创建Spring项目
本篇博客作为Spring入门系列的第一篇博客,不会讲解什么是Spring以及Spring的发展史这些太理论的东西,主要讲解下如何使用IntelliJ IDEA创建第一个Spring项目以及通过一个示例 ...
- Lucene配置步骤详解
Lucene配置步骤说明: 1.搭建环境: 2.创建索引库: 3搜索索引库. Lucene配置步骤: 第一部分:搭建环境(创建环境导入jar包) 前提:已经创建好了数据库(直接导入book.sql文件 ...
- 微信小程序 canvas 文字自动换行
Page({ drawCanvas: function(ctx) {// 地址 ctx.setFontSize() ctx.setFillStyle('#9E7240') ctx.textAlign= ...
- Android防止按钮快速重复点击
在用户使用 Android 应用的时候,经常会出现过快且多次点击同一按钮的情况,一方面这是因为应用或手机当前有些卡顿,另一方面也可能是由于很多应用并没有设置按钮点击时的 selector 或者其它按钮 ...
- DVWA 黑客攻防演练(十)反射型 XSS 攻击 Reflected Cross Site Scripting
XSS (Cross-site scripting) 攻击,为和 CSS 有所区分,所以叫 XSS.又是一种防不胜防的攻击,应该算是一种 "HTML注入攻击",原本开发者想的是显示 ...
- 前端开发之基础知识-HTML(二)
1.6 html链接 html链接 <a>标签可以在网页上定义一个链接地址,通过src属性定义跳转的地址,通过title属性定义鼠标悬停时弹出的提示文字框. <a href=&quo ...
- Linux(Manjaro) -Docker 安装及基本配置
Linux(Manjaro) -Docker 安装及基本配置 基本安装 # Pacman 安装 Docker sudo pacman -S docker # 启动docker服务 sudo syste ...
- mysql8.0绿色版安装及mysqldump备份
1.下载mysql绿色版压缩包https://dev.mysql.com/downloads/mysql/ 2.解压到安装目录后,在根目录创建data文件夹 3.把mysql下的bin目录添加到环境变 ...
- nginx学习路线
nginx:熟透,配置.rewrite.黑白名单.脚本.代理.优化等