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. Spring Boot 和 Docker 实现微服务部署

    Spring boot 开发轻巧的微服务提供了便利,Docker 的发展又极大的方便了微服务的部署.这篇文章介绍一下如果借助 maven 来快速的生成微服务的镜像以及快速启动服务. 其实将 Sprin ...

  2. Netty中的Channel之数据冲刷与线程安全(writeAndFlush)

    本文首发于本博客,如需转载,请申明出处. GitHub项目地址 InChat 一个轻量级.高效率的支持多端(应用与硬件Iot)的异步网络应用通讯框架 前言 本文预设读者已经了解了一定的Netty基础知 ...

  3. 折腾Java设计模式之单例模式

    博文原址:折腾Java设计模式之单例模式 单例模式 Ensure a class has only one instance, and provide a global point of access ...

  4. Bootstrap实现注册界面

    样式一 例图 代码 <head> <meta charset="UTF-8"> <title>用户注册</title> <li ...

  5. Vue slot插槽

    插槽用于内容分发,存在于子组件之中. 插槽作用域 父级组件作用域为父级,子级组件作用域为子级,在哪定义的作用域就在哪. 子组件之间的内容是在父级作用域的,无法直接访问子组件里面的数据. 插槽元素 &l ...

  6. SuperMap iServer 在Linux 部署中问题总结

    SuperMap iServer 作为超图公司的云GIS服务器产品,一般是部署在Linux服务器上.下面把日常部署和使用过程中遇到的相关问题做以汇总. 1.部署iServer的第一步是要检查Linux ...

  7. window模拟linux环境-cygwin安装

    cygwin是一个在windows平台上运行的unix模拟环境,它对于学习unix/linux操作环境,或者从unix到windows的应用程序移植,非常有用.通过它,你就可以在不安装linux的情况 ...

  8. 神经网络MPLClassifier分类

    代码: # -*- coding: utf-8 -*- """ Created on Fri Aug 24 14:38:56 2018 @author: zhen &qu ...

  9. python学习——读取染色体长度(一、简化问题)

    # 读取fasta # 解析每条序列的长度 chr1_len = 10 chr2_len = 20 chr3_len = 30 chr4_len = 40 chr5_len = 50 # 求和 tot ...

  10. 在vultr安装和使用golang

    1.vultr可以用微信或支付宝充值,方便.好像推荐别人用还能挣美分,懒得弄了,参加了一个充10刀送50刀的活动,感觉实惠(实际用时感觉有点小贵). 2.注册登录后,控制面板上billing可查看余额 ...