zl程序教程

您现在的位置是:首页 >  硬件

当前栏目

如何多台OAK设备同时RTSP推流?

设备 如何 同时 RTSP 推流 多台 OAK
2023-09-14 09:01:43 时间

编辑:OAK中国
首发:oakchina.cn
喜欢的话,请多多👍⭐️✍
内容可能会不定期更新,官网内容都是最新的,请查看首发地址链接。

▌前言

Hello,大家好,这里是OAK中国,我是助手君。

rtsp推流呢,我们那个depthai-experiments仓库里有现成的示例。最近有两个朋友都想用两台OAK PoE同时推流,然后问我咋做?我给了一些参考内容,但是吧有的朋友太心急了,不想看文档。所以吧,我就安排了我们这边工程师编写了教程。

我真的是有求必应了!给个三连不过分吧!

▌步骤

RTSP 服务器下载链接:https://github.com/aler9/rtsp-simple-server/releases
1、安装

下载相应平台文件:
在这里插入图片描述

2、启动服务器

./rtsp-simple-server[.exe]

3、启动

python main_multi.py 

下载main_multi.py

usage: main_multi.py [-h] [-rip RTSP_HOST] [-rp RTSP_PORT] [-wt WIDTH] [-ht HEIGHT] [-qa QUALITY] [-sm SCALE_MODE]

options:
  -h, --help            show this help message and exit
  -rip RTSP_HOST, --rtsp_host RTSP_HOST
                        Host of the RTSP Server (default: 0.0.0.0)
  -rp RTSP_PORT, --rtsp_port RTSP_PORT
                        Port of the RTSP Server (default: 8554)
  -wt WIDTH, --width WIDTH
                        Width of the video/preview size. In multiple of 32 (default: 1920)
  -ht HEIGHT, --height HEIGHT
                        Height of the video/preview size. In multiple of 8 (default: 1080)
  -qa QUALITY, --quality QUALITY
                        Video quality, from 1 to 100 (default: 100)
  -sm SCALE_MODE, --scale_mode SCALE_MODE
                        Scale or crop the video output. Default is scale. Set to false to switch to crop mode (default: True)

▌参考资料

https://docs.oakchina.cn/en/latest/
https://www.oakchina.cn/selection-guide/
https://gitee.com/oakchina/depthai-experiments/tree/master/gen2-rtsp-streaming


OAK中国
| OpenCV AI Kit在中国区的官方代理商和技术服务商
| 追踪AI技术和产品新动态

戳「+关注」获取最新资讯↗↗