Giter Club home page Giter Club logo

arrtsptool's Introduction

一,概述

​ ArRtspTool是anyRTC开源的一款将rtsp流转为rtc的工具,这样rtsp的流可以不需要外网服务或IP地址,即可实现网页/H5无插件观看,小程序,APP等各种方式查看视频流。

​ 支持常见的Linux、Windows、树莓派、英伟达TX系列等等。

​ 支持Rtsp流,支持USB摄像头,支持窗口推流等等。

适用的场景:

​ 1,内网摄像头穿透到公网:使用网页,App或小程序进行观看,超低1s内延时

​ 2,远程驾驶:超低延时,远程操控,流程不卡顿

​ 3,无人机:超低延时,精准控制,AI识别反馈

​ 4,小区门禁:实时监看,双向对讲,远程操控

新增模式选择:

​ 1xN模式:源只有1个,可以转到1个或多个频道中去

​ NxN模式:源有多个,可以转到1个或多个频道中去

​ **???**为什么需要1xN模式,因为NxN模式是拉一路流转到一个频道;如果需要把1路流转到N个频道,NxN模式需要拉N路相同的流,这很明显是一种资源浪费。

二,编译

​ 下载代码到本地:git clone https://github.com/anyRTC-UseCase/ArRtspTool.git

​ 编译脚本对应的平台(已验证,其他平台或系统版本可联系我司进行确认):

Makefile.linux  - Centos7.0及以上或Unbuntu
Makefile.pi		- 树莓派4
Makefile.tx		- Nvidia TX2

​ 以树莓派为例(以下命令均以root运行,非root可能会报权限错误):

***# cd ArRtspTool
***# chmod +x make.sh
***# ./make.sh (common | r-pi | nv-tx)

​ 启动程序,运行之前记得先配置一下相关参数

***# chmod +x run.sh
***# ./run.sh start ArRtspTool rtsp.conf 

​ 停止程序

***# ./run.sh stop ArRtspTool

Windows平台运行

拷贝rtsp.conf到lib_win目录下
打开Cmd,cd 到xxx/lib_win目录下
执行:ArRtspTool.exe rtsp.conf

三,如何配置

1XN配置:源只有1个,可以转到1个或多个频道中去

chan_id=808080;909090这样配置,然后从下方寻找对应房间的配置

当type=nvcam;该配置为当视频源为USB摄像头或者窗口时配置,然后在配置dev_id

当type=rtsp;内部会读取你的rtsp的url,以及拉取rtsp所需要的协议use_tcp

1个RTSP源转到多个频道的配置
[rtc]
app_id=rtc的AppId,
chan_id=808080;909090
mode=1xN

[1xN]
type=rtsp
url=你的Rtsp流的Url
use_tcp=1
1个RTSP源转到1个频道的配置
[rtc]
app_id=rtc的AppId,
chan_id=808080
mode=1xN

[1xN]
type=rtsp
url=你的Rtsp流的Url
use_tcp=1
1个nvcam源转到1个频道的配置
[rtc]
app_id=rtc的AppId,
chan_id=808080
mode=1xN

[1xN]
type=nvcam
dev_id=设备ID(/dev/video0)
1个nvcam源转到多个频道的配置
[rtc]
app_id=rtc的AppId,
chan_id=808080;909090
mode=1xN

[1xN]
type=nvcam
dev_id=设备ID(/dev/video0)

NXN配置:源有多个,可以转到1个或多个频道中去

下面配置为909090频道转一路流,为808080频道转一路流。

如果想多个源转到一个频道,可以配置为url=rtsp1;rtsp2 ,中间用分号分割

[rtc]
app_id=rtc的AppId,
chan_id=808080;909090
mode=NxN

[NxN]
[909090]
type=nvcam
dev_id=设备ID(/dev/video0)

[808080]
type=rtsp
url=你的Rtsp流的Url1
use_tcp=1

​ AppId的获取可以登录anyRTC官网获取

注意: Rtsp地址和设备ID二者选其一,优先Rtsp地址,若推本地摄像头则无需配置Rtsp地址

四,如何观看

在线体验

前往体验demo

输入 AppID 和 Channel 后点击Join as audience 按钮进行观看。

观看端集成到自己的系统中

五,常见问题

详见常见问题

Buglist: Bug001 : TX2: no element "h264parse" 解决001: sudo apt-get install gstreamer1.0-plugins-bad

Bug002:ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error. Additional debug info: gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: streaming stopped, reason not-negotiated (-4)

解决002:如何获取支持的分辨率,修改为支持的分辨率

sudo apt-get install v4l-utils

v4l2-ctl -d /dev/video0 --list-formats-ext

anyRTC创业扶持计划

  • 30万免费分钟数,助力初创企业快速发展。

anyRTC初创企业扶持计划,只要通过企业审核,联系客服加入anyRTC创业扶持计划,即可享受30万免费分钟数。获得分钟数可降低在实时音视频技术服务所产生的成本费用,零成本快速启动项目。

  • 专属技术指导支持

anyRTC为初创企业提供一对一专属客服,为客户提供专业、认真的服务,及时解答您的疑惑。并为客户提供专属技术指导,更快上手,轻松上线!

六,联系我们

联系电话:021-65650071

QQ咨询群:580477436

ArCall技术交流群:597181019

咨询邮箱:[email protected]

技术问题:开发者论坛

获取更多帮助前往:www.anyrtc.io

arrtsptool's People

Contributors

dync-boyuan avatar dynceric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arrtsptool's Issues

openwrt系统是否支持

你好,可以运行在openwrt系统中吗?方便提供交叉工具链和源码吗?
另外,rtsp转webRTC的实现原理方便告知吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.