博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mac上搭建rtmp流媒体服务器(结合FFmpeg的使用)
阅读量:4326 次
发布时间:2019-06-06

本文共 655 字,大约阅读时间需要 2 分钟。

1.确保安装homebrew ---安装则跳到第二步

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.brew tap nginx

brew install nginx-full --with-rtmp-module(安装rtmp模块的nginx)

3.输入nginx 启动服务器

http://localhost:8080

Welcome to nginx!

出现上面的字符,说明nginx启动成功

4.配置rtmp: 利用vim命令

vim /usr/local/etc/nginx/nginx.conf

#配置rtmp server

rtmp {
server{
#指定服务端口
listen 1935;
chunk_size 4000;
#指定流应用
application live
{
live on;
record off;
allow play all;
}
}
}

5.nginx -s reload 重新启动nginx

6.利用ffmpeg推流

ffmpeg -re -i abc.flv -c copy -f flv rtmp://localhost:1935/live/room

7.利用VLC软件查看推流结果

 

双击查看

8.查看推流结果

 

 

转载于:https://www.cnblogs.com/tryFighting/p/10751917.html

你可能感兴趣的文章
jquery validate使用方法
查看>>
DataNode 工作机制
查看>>
windows系统下安装MySQL
查看>>
错误提示总结
查看>>
实验二+070+胡阳洋
查看>>
Linux IPC实践(3) --具名FIFO
查看>>
Qt之模拟时钟
查看>>
第一次接触安卓--记于2015.8.21
查看>>
(转)在分层架构下寻找java web漏洞
查看>>
mac下多线程实现处理
查看>>
C++ ifstream ofstream
查看>>
跟初学者学习IbatisNet第四篇
查看>>
seL4环境配置
查看>>
Git报错:insufficient permission for adding an object to repository database .git/objects
查看>>
ajax跨域,携带cookie
查看>>
BZOJ 1600: [Usaco2008 Oct]建造栅栏( dp )
查看>>
洛谷 CF937A Olympiad
查看>>
Codeforces Round #445 C. Petya and Catacombs【思维/题意】
查看>>
用MATLAB同时作多幅图
查看>>
python中map的排序以及取出map中取最大最小值
查看>>