MCPcopy Create free account
hub / github.com/BigPig0/RelayLive

github.com/BigPig0/RelayLive @1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.1 ↗ · + Follow
18,618 symbols 54,863 edges 1,603 files 3,394 documented · 18% updated 3y ago★ 176

Browse by type

Functions 14,912 Types & classes 3,706
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RelayLive

地址:

  • https://github.com/BigPig0/RelayLive.git
  • https://gitee.com/ztwlla/RelayLive.git

说明:

  • ipc_server: 进程间通讯和进程保护的工具
    • pm.json 配置文件,需要启动的程序信息。

对接海康SDK

  • hik_server: 使用海康sdk播放视频并转为ws-flv
  • hikctrl_server: 查看平台设备信息、客户端信息
    • hikctrl.lua 数据库脚本
    • config.txt 海康平台登陆配置
    • 配置示例在Build/projects/config_yongjia_hikserver
  • 客户端请求格式为 http(ws)://IP:port/live/flv/0/[code]
  • sdk只有32位的,导致整个项目工具层都增加了32位的编译。只验证海康相机上抛的是标准PS流,大华相机的是其私有码流无法识别。
  • 这个对接的实际意义不是很大,国标对接延时上来后,不太需要这种方法了。

对接视频流

  • relay_server: 将视频流转为ws-flv,流可以为rtsp、rtmp、hls等(理论上可以,只使用过rtsp)
  • relayctrl_server: 查看客户端信息
    • 配置示例在Build/projects/config_kunshan_tecc
  • 客户端请求格式为 http(ws)://IP:port/live?url=[rtsp地址]

对接国标平台

  • sip_server: sip服务器,用来与下级平台交互
  • live_server: 将下级推送的基于PS的rtp流转为ws-flv
  • livectrl_server: 查看设备信息、客户端信息、设备控制
  • 客户端请求格式为 http(ws)://IP:port/live?code=[code]&hw=[960*480]
    • code 相机的国标编码
    • hw 可选参数,用来缩放视频大小
  • 云台控制 http://ip:port/device/control/[code]?ud=[p1]&lr=[p2]&io=[p3]
    • p1: 0-停止 1-向上 2-向下
    • p2: 0-停止 1-向左 2-向右
    • p3: 0-停止 1-焦距减 2-焦距加

编译方法

  • 平台: Windows vs2012
  • 用vs打开build/RelayLive.sln,按顺序编译ThirdParty、Common、Modules、Projects下的项目。
  • 编译前需要在属性管理器中将Microsoft.Cpp.x64.user(或Microsoft.Cpp.Win32.user)中修改以下:(或者在每个项目属性中都修改一次)
    • 常规-输出目录:$(SolutionDir)..\out\$(Platform)_$(Configuration)\
    • 常规-中间目录:$(SolutionDir)..\out\Temp\$(Platform)_$(Configuration)\$(ProjectName)\
    • 链接器-常规-附加库目录:$(OutDir);%(AdditionalLibraryDirectories)
  • 在输出目录部署配置文件pm.json,config.txt和脚本文件 XXX.lua。(文件在/Build/projects下有示例)
  • 从thirdParty拷贝ffmpeg的dll到输出目录。
  • 最好用64位进行编译使用,如需32位,可能需要一些修改
  • 部署数据库,数据库的操作在XXX.lua中。
  • 使用ipc_server启动
  • http-flv和websocket-flv都可以,但最好使用websocket-flv,免的出现跨域问题
  • 只保留了视频,音频丢弃了。

nginx

  • 页面demo静态文件通过nginx来访问
  • 信息查询和设备控制等http请求通过nginx转发到XXXctrl_server
  • 视频播放请求通过nginx进行负载均衡,转发到对应的视频服务

第三方:

  • exosip: http://savannah.nongnu.org/projects/exosip
  • exosip-vs: https://github.com/BigPig0/exOsip-vs.git
  • ffmpeg: http://ffmpeg.org/
  • libwebsockets: https://github.com/warmcat/libwebsockets.git [确实有一些问题,把这个库去掉后稳定多了]
  • libuv: https://github.com/libuv/libuv.git
  • luapp: https://github.com/ToyAuthor/luapp.git
  • libcstl: https://github.com/activesys/libcstl.git
  • flv.js: https://github.com/Bilibili/flv.js.git
  • NodePlayer.js: https://github.com/illuspas/NodePlayer.js.git

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 12,845
Class 3,234
Method 2,067
Enum 472

Languages

C60%
C++30%
TypeScript10%

Modules by API surface

ThirdParty/ocilib/include/ocilib_impl.hpp595 symbols
ThirdParty/pugixml/pugixml.cpp548 symbols
ThirdParty/libcstl/src/cstl_function.c271 symbols
Build/Projects/web/lib/angular.min.js266 symbols
Build/Projects/config_yongjia_hikserver/web/lib/angular.min.js266 symbols
Build/Projects/config_liyang/web/lib/angular.min.js266 symbols
Build/Projects/config_kunshan_tecc/web/lib/angular.min.js266 symbols
ThirdParty/lua/luapp/WrapperProxy.hpp185 symbols
ThirdParty/libWebSockets/core/libwebsockets.c158 symbols
ThirdParty/libcstl/src/cstl_types_builtin.c148 symbols
ThirdParty/lua/luapp/stl/bind.hpp141 symbols
ThirdParty/libWebSockets/libwebsockets.h139 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add RelayLive \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page