MCPcopy Index your code
hub / github.com/cnotch/ipchub

github.com/cnotch/ipchub @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
1,833 symbols 5,010 edges 138 files 537 documented · 29%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ipchub

一个即拷即用、支持摄像头集中管理、多级路由及h5播放的流媒体服务器。

项目背景

偶尔和前同事聊天,说到一些小的监控项目需要把IP摄像头集中管理,并提供html播放能力。闲来无事就试着开发一个打发时间,也作为学习 go 语言的一个实践。

在此之前没有流媒体经验,没有go语言项目开发经验。看了一些文档,参考了一些开源项目,主要包括: + emitter 学习多协议共享端口等网络编程技能 + EasyDarwin 为加深对rtsp协议的理解 + seal rtmp/flv hls 服务的理解

主要特性

  • 基于纯 Golang 开发
  • 支持 Windows、Linux、macOS 平台
  • 支持 RTSP 推流(主动推送)
  • 支持 RTSP 拉流(拉取摄像头或其他流媒体服务器资源)
  • 支持 RTSP TCP、UDP、Multicast 播放
  • 支持 H264+AAC H5播放,包括:
    • HTTP-FLV
    • Websocket-FLV
    • HTTP-HLS
    • Websocket-RTSP(实验): 实时性更好
  • 支持 H265+AAC H5播放(实验,需自行寻找播放软件),包括:
    • HTTP-FLV
    • Websocket-FLV
  • 支持流媒体用户推拉权限管理
  • 业务系统集成 RestfulAPI

文档

Extension points exported contracts — how you extend this code

Consumer (Interface)
Consumer 消费者接口 [10 implementers]
media/consumption.go
TagData (Interface)
TagData tag data [5 implementers]
av/format/flv/tag.go
PathMatcher (Interface)
PathMatcher 路径匹配接口 [4 implementers]
provider/auth/path_matcher.go
Provider (Interface)
Provider 路由提供者 [4 implementers]
provider/route/route.go
Provider (Interface)
Provider 提供者接口 [4 implementers]
config/provider.go
Multicastable (Interface)
Multicastable 支持组播模式的源 [2 implementers]
media/options.go
Flow (Interface)
Flow 流统计接口 [2 implementers]
stats/flow.go
PullStreamFactory (Interface)
PullStreamFactory 拉流工程流 [1 implementers]
media/global.go

Core symbols most depended-on inside this repo

apply
called by 206
network/socket/buffered/conn.go
ReadBit
called by 146
utils/bits/reader.go
on
called by 119
demos/rtsp/rtsp.dev.js
box
called by 106
demos/rtsp/rtsp.dev.js
Error
called by 104
av/format/rtsp/header.go
toString
called by 97
demos/rtsp/rtsp.dev.js
set
called by 92
av/format/rtsp/header.go
_interopRequireDefault
called by 74
demos/flv/flv.js

Shape

Method 940
Function 613
Struct 147
Class 80
Interface 31
TypeAlias 17
FuncType 5

Languages

Go60%
TypeScript40%

Modules by API surface

demos/rtsp/rtsp.dev.js446 symbols
demos/flv265/h265.min.js175 symbols
demos/flv/flv.js118 symbols
network/socket/listener/listener.go37 symbols
network/websocket/websocket.go31 symbols
service/apis.go28 symbols
utils/bits/reader.go27 symbols
service/rtsp/session_roles.go26 symbols
media/stream_test.go25 symbols
av/format/rtsp/header.go23 symbols
media/stream.go22 symbols
service/rtsp/session.go21 symbols

For agents

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

⬇ download graph artifact