1本地摄像头麦克风rtmp推流到网络:
需要先安装engine X;nginx;
Mac端安装: brew install nginx-full --with-rtmp-module
Mac端启动nginx:在终端输入nginx
查看nginx是否启动:ps aux|grep nginx
显示:501 2844 1 0 4:33下午 ?? 0:00.00 nginx: master process nginx
ffmpeg推流命令:
ffmpeg -video_size 1280x720 -framerate 30 -f avfoundation -pixel_format uyvy422 -i "0:0" -ar 44100 -f flv rtmp://127.0.0.1:1035/live
注意修改:
/opt/homebrew/etc/nginx/nginx.conf 和nginx.conf.default
测试的时候,先在终端启动nginx,然后在浏览器输出rtmp网址就是推流接收的地址;
如:rtmp://127.0.0.1:1355/live控制台输入如下命令推摄像头和麦克风:标签:127.0,FFmpeg,0.1,ramp,nginx,live,rtmp,推流 From: https://www.cnblogs.com/8335IT/p/16810974.html
ffmpeg -video_size 1280x720 -framerate 30 -f avfoundation -pixel_format uyvy422 -i "0:0" -ar 44100 -f flv rtmp://127.0.0.1:1035/live