首页 > 系统服务 > 详细

Mac上搭建rtmp流媒体服务器(结合FFmpeg的使用)

时间:2019-04-22 18:45:38      阅读:356      评论:0      收藏:0      [点我收藏+]

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.查看推流结果

 

技术分享图片

 

Mac上搭建rtmp流媒体服务器(结合FFmpeg的使用)

原文:https://www.cnblogs.com/tryFighting/p/10751917.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!