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 ...
随机推荐
- vue.js之组件篇
Vue.js 组件 模块化:是从代码逻辑的角度进行划分的: 组件化:是从UI界面的角度进行划分的. 组件(Component)是 Vue.js 最强大的功能之一,组件可以扩展 HTML 元素,封装可重 ...
- DSAPI 字符串和文件转Md5字符串
方法列表: 字符串转MD5字符串(ByVal 要转换的字符串 As String, Optional 转换格式 As MD5格式 = MD5格式.小写32位) As String 文件转MD5字符串( ...
- c#中如何使用到模糊查询
c#中如何使用到模糊查询,先举个最简单实用的例子,可在vs控制台应用程序中输出: 定义实体类: public class Student { public int ...
- 把list集合的内容写入到Xml中,通过XmlDocument方式写入Xml文件中
List<Person> list = new List<Person> { new Person{Name="张三",Age=20,Email=" ...
- Java开发笔记(八十四)文件与目录的管理
程序除了处理内存中的数据结构,还要操作磁盘上的各类文件,这里的磁盘是个统称,泛指可以持久保留数据的存储介质,包括但不限于:插在软驱中的软盘.固定在机箱中的硬盘.插在光驱中的光盘.插在USB接口上的U盘 ...
- 通用mapper认识和用法
目录 0. 认识 1. 导包 2. mybatis的config文件:mybatis-mapper-config.xml 3. spring与mybatis整合配置文件:mybatis.xml 4. ...
- 如何利用GitHub设计一个炫酷的个人网站(含代码)
1.在开始制作之前我们先预览一下我的网站吧! 1.方式一: 由于是手机版的所以用手机访问下面的链接体验比较好一点: https://tom-shushu.github.io/MyWeb.github. ...
- 自动化测试 Appium之Python运行环境搭建 Part1
Appium之Python运行环境搭建 Part1 by:授客 QQ:1033553122 实践环境 Win7 Python 3.4.0 JAVA JDK 1.8.0_121 node.js8.11. ...
- 基于Android的模拟点击探索
前言 压力测试中,一般会用到自动化测试.准备写一个APP,可以记录屏幕上的点击事件,然后通过shell命令来模拟自动执行.shell指令,比较容易实现.那么,关键的一步是获取点击的坐标.对于Andro ...
- HTTP中GET和POST的区别主要是那些,面试中可以加分的该说那些?
面试回答: GET请求在URL中传送的参数是有长度限制的,而POST没有. GET比POST更不安全,因为参数直接暴露在URL上,所以不能用来传递敏感信息. GET参数通过URL传递,POST放在Re ...