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 搭建推流服务器的更多相关文章

  1. centos7+nginx+rtmp+ffmpeg搭建流媒体服务器(保存流目录与http目录不要随意配置,否则有权限问题)

    搭建nginx-http-flv-module升级代替rtmp模块,详情:https://github.com/winshining/nginx-http-flv-module/blob/master ...

  2. (转)Nginx+rtmp+ffmpeg搭建流媒体服务器

    (1)下载第三方扩展模块nginx-rtmp-module # mkdir module && cd module //创建一个存放模块的目录 # wget https://githu ...

  3. centos7+nginx+rtmp+ffmpeg搭建流媒体服务器

    1.安装前需要的工具 #net-tool 查本地IP #wget 下载安装包 #unzip 解压zip包 #gcc gcc-c++ perl 编译软件包用 yum install -y net-too ...

  4. Linux-Nginx+rtmp+ffmpeg搭建流媒体服务器

    Nginx+rtmp+ffmpeg搭建流媒体服务器 说明: nginx搭建流媒体服务需要用到 nginx-rtmp-module 模块 具体操作步骤: 安装nginx (1)下载第三方扩展模块ngin ...

  5. 使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器

    参考: 1,使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器笔记(一)http://blog.csdn.net/xdwyyan/article/details/4319 ...

  6. nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器

    参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...

  7. 流媒体技术学习笔记之(一)nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器

    参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...

  8. Centos7 搭建Nginx+rtmp+hls直播推流服务器

    1 准备工具 使用yum安装git [root~]# yum -y install git 下载nginx-rtmp-module,官方github地址 // 通过git clone 的方式下载到服务 ...

  9. nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器[转]

    转 :http://redstarofsleep.iteye.com/blog/2123752 Nginx本身是一个非常出色的HTTP服务器,FFMPEG是非常好的音视频解决方案.这两个东西通过一个n ...

随机推荐

  1. go并发调度原理学习

    aaarticlea/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QB0RXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAA

  2. C# 切换中英文输入法

    在界面输入时,有时需要限定输入法. 在不自定义正则表达式或者其它输入处理的情况下,切换中英文时与当前语言栏匹配,有以下的几种系统方案: InputLanguage方案 使用System.Windows ...

  3. Django学习之七:Django 中间件

    目录 Django 中间件 自定义中间件 - - - 大体两种方式 将中间件移除 实例 中间件加载源码阅读 总结 Django 中间件 Tips: 更新日志: 2019.01.31 更新django中 ...

  4. js实现复制文本内容到剪切板

    function copyUrl() { var Url2=document.getElementById("url").innerText; var oInput = docum ...

  5. Django 加载 app 中的urls

    在 blog app 下创建 urls.py, 定义该 app 下自有的 url : new/story from blog import views from django.conf import ...

  6. Django 提交 form 表单

    创建 Django 的过程可以参考上一篇文章 https://www.cnblogs.com/klvchen/p/10601536.html 在 templates 文件夹下创建一个 index.ht ...

  7. Dotnetcore 开发速记

    1.System.InvalidOperationException:"Internal connection fatal error." 全球固定模式,坑爹 https://gi ...

  8. Android studio怎么使用自定义的framework而避免冲突报错和点不进去报红。

    文件:xx\project_abc\video\build.gradle保证可以运行到自定义的framework而不报错,可能因为project和module名字相同所以导致下面的路径是绝对路径,其他 ...

  9. 随笔:关于去年的WordPress建站的回忆

    2018-02-26    建站 2018-02-28    选择主题Clearision 2018-03-01    学习插入视频.修改主题 <iframe src="//playe ...

  10. Python进阶教程001内置数据类型

    关于Python的基础知识已经告一段落了,我们接下来深入的研究Python的使用方法,以及以后将要使用到的类库. 格式化字符串 Python是支持字符串的格式化输出的,在之前的学习中我们也遇到过和使用 ...