悄摸直播 —— javaCV实现本机摄像头画面远程直播

搭建rtmp服务器

一、素材

rtmp服务器:smart_rtmpd
ffmpeg工具:ffmpeg.exe

二、搭建

1.下载smart_rtmpd软件包,解压rtmpd.rar,进一步解压smart_rtmpd_win.rar得到smart_rtmpd.exe文件

悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)

2.运行smart_rtmpd.exe文件,直接启动。(如果对rtmp服务器有特殊配置需求,可以在smart_rtmpd.exe同级目录下的config.xml文件中修改)

启动成功示例:
悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)
smart_rtmpd会在启动时获取本机所有网络的ip地址,自动生成rtmp服务器地址。
具体样式:rtmp://192.168.1.48/live/stream
192.168.1.48就是本机的网络IP地址

如果想更改rtmp服务器的地址,可以在config.xml文件中修改:
悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)

三、推流&播流测试

1.安装ffmpeg工具

安装包请看“素材”

2.推流测试

cmd打开小黑窗,输入命令:

ffmpeg.exe -re -stream_loop -1 -i F:\55427366\48\55427366_48_0.flv -c copy -f flv rtmp://192.168.1.48/live/stream

悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)
推流成功:
悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)

3.播流测试

找到一个播放器,打开rtmp服务器地址:
悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)
播流成功:
悄摸直播(三)—— 搭建rtmp服务器(smart_rtmpd - rtmp服务器搭建)

参考教程:http://www.qiyicc.com/bbs001/forum.php?mod=viewthread&tid=984&extra=page%3D1

相关文章:

  • 2021-06-06
  • 2022-02-17
  • 2022-01-12
  • 2021-10-06
  • 2021-12-18
  • 2021-04-17
  • 2022-02-16
  • 2022-02-05
猜你喜欢
  • 2022-01-12
  • 2022-01-25
  • 2021-10-16
  • 2021-11-17
  • 2021-11-28
  • 2021-05-23
相关资源
相似解决方案