GB28181-2022 NVR | ONVIF/RTMP/RTSP | ZLMediaKit | 本地 YOLO 检测 | 私有部署 | Frigate 中文平台
GB28181-2022 NVR | ONVIF/RTMP/RTSP | ZLMediaKit | 本地 YOLO 检测 | 私有部署 | Frigate 中文平台
English | 中文
GoWVP is an open-source GB28181 solution implemented in Go, a network video platform based on the GB28181-2022 standard that also supports 2016/2011 versions, with ONVIF/RTMP/RTSP protocol support.
Thanks to @panjjo for the open-source library panjjo/gosip. GoWVP's SIP signaling is based on this library. Due to underlying encapsulation requirements, it's not a direct dependency but rather included in the pkg package.
Two streaming media servers are supported:
@夏楚 ZLMediaKit
lalmax-pro - For Go streaming media needs, contact email [email protected]
Project framework based on @ixugo's goddd
For commercial licensing, please contact WeChat: golangxx. Unauthorized modifications must open-source both frontend and backend source code under the GPL license.
Where are the frontend resources? How to load the web interface?
Click to download www.zip package
Download (packaged) frontend resources and place them in the project root directory, named www to load properly.
Any learning materials about the code?
GB/T28181 Open Source Diary[1]: Complete Practice from 0 to Implementing GB28181 Protocol
GB/T28181 Open Source Diary[2]: Setting Up Server, Solving CORS, API Integration
GB/T28181 Open Source Diary[3]: Building Monitoring Dashboard with React Components
GB/T28181 Open Source Diary[4]: Using ESLint for Development
GB/T28181 Open Source Diary[5]: Completing Forms with react-hook-form
GB/T28181 Open Source Diary[6]: Quick Integration of jessibuca.js Player in React
GB/T28181 Open Source Diary[7]: Implementing RTMP Authentication and Playback
GB/T28181 Open Source Diary[8]: Quick Guide to GB28181 Development
Any usage documentation?
RTMP
How to Use OBS RTMP Push Stream to GB/T28181 Platform
Hikvision Camera RTMP Push Stream to Open Source GB/T28181 Platform
Dahua Camera RTMP Push Stream to Open Source GB/T28181 Platform
GB/T28181
7 Ways to Register GB28181 Devices
Black screen when playing
Check "Quick Desktop" - "ZLM settings button (top right)" - "GB28181 stream receiving default address" Ensure this address is accessible by the surveillance device.
Check "Quick Desktop" - "ZLM settings button (top right)" - "Hook IP" Can ZLM access GoWVP? For Docker combined version, use 127.0.0.1. For separate deployment, use explicit IP address.
Channel list shows fewer channels than actual count
By design. More than 4 channels should be viewed in the management page, or click "View More" on the right.
Using nginx reverse proxy, returned playback addresses don't work or snapshots don't load
Configure the following parameters in reverse proxy (replace domain with your actual one):
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix "https://gowvp.com";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
How to use other databases?
In the configs/config.toml configuration file, modify database.dsn
[Recommended] SQLite should be a local disk path, default is configs/data.db
[Recommended] PostgreSQL format: postgres://postgres:[email protected]:5432/gb28181?sslmode=disable
MySQL format: mysql://root:[email protected]:5432/gb28181?sslmode=disable
PostgreSQL and MySQL format pattern:
://:@:/?sslmode=disable
How to disable AI?
AI detection is enabled by default, detecting 5 frames per second.
You can disable AI detection by setting disabledAI = true in configs/config.toml
GoWVP supports forwarding authentication requests to a third-party service, ideal for environments with an existing unified authentication system (SSO, OAuth2, corporate account systems, etc.).
Sequence Diagram
Use Cases
Configuration
Set AuthURL to your third-party authentication service address in configs/config.toml:
[Server.HTTP]
AuthURL = "https://your-auth-server.com/api/verify"How It Works
Once AuthURL is configured, all requests are verified through the third-party authentication service. GoWVP forwards the original request headers and body as a POST to the specified URL. A 200 response means authentication passes; any other status code means failure, and the response body is returned directly to the client.
Note: The third-party auth service must respond within 10 seconds, otherwise the request is considered timed out.
GoWVP Online API Documentation
ZLM Documentation github.com/ZLMediaKit/ZLMediaKit
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You've made it this far!
Give us a ⭐ star!
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
How to Build or Run the Project
How to Deploy with Docker Compose
GoWVP & ZLMediaKit Combined Image (Recommended)
docker-compose.yml
…If you're a Go developer familiar with Docker, you can download the source code and run locally.
Prerequisites
Steps
WebHookIP in configs/config.toml to your LAN IPmake build/linux && docker compose up -dzlm.conf folder is auto-created. Get the API secret from config.ini and fill it in configs/config.toml under Secretdocker compose restarthttp://localhost:15123 in your browserOWL PRO
GoWVP can act as an ONVIF Network Video Transmitter so integrators (e.g. Home Assistant) can add it like a camera and pull RTSP URLs for platform channels.
| Purpose | Protocol | Port | Open in firewall? |
|---|---|---|---|
| Web UI + ONVIF SOAP | TCP | Server.HTTP.Port (default 15123) |
Only if HA/NVR is on another subnet; same LAN usually needs no extra rule |
RTSP playback after GetStreamUri |
TCP | ZLM RTSP (default 554, see docker-compose mapping) |
Same as above when the client pulls stream from ZLM |
| ONVIF WS-Discovery (server advertisement) | UDP | 3702 (multicast 239.255.255.250) |
Map 3702:3702/udp in Docker; LAN usually needs no extra rule |
ONVIF SOAP endpoints (same HTTP port as the web UI):
POST http://:15123/onvif/device_servicePOST http://:15123/onvif/media_serviceAuthentication uses Server.Username / Server.Password in configs/config.toml (WS-Security PasswordDigest or PasswordText), same defaults as web login (admin / admin).
Home Assistant (manual add):
http://:15123/onvif/device_serviceconfig.toml Server.Username / Server.PasswordAuto-discovery: After startup, GoWVP answers WS-Discovery Probe on UDP 3702. Set Media.IP (or Sip.Host) in configs/config.toml to your LAN IP so XAddrs is reachable from Home Assistant.
Not the same as GET /onvif/discover: that API lets GoWVP scan the LAN for external ONVIF cameras (client role).
GoWVP supports pushing alert events to external systems via HTTP Webhook, and receiving pushes from other GoWVP instances for master-slave cascading deployments.
| Method | Path | Description |
|---|---|---|
POST |
/webhook/events |
Unified event receiver, compatible with both Python AI and gowvp-to-gowvp forwarding |
configs/config.toml)[Server.Webhook]
# Target URL array; embed the secret as a query parameter
Targets = [
"http://192.168.1.100:15123/webhook/events?secret=your-recv-secret",
]
# Max retries, 0 = built-in default of 3
MaxRetry = 3
# Channel buffer size per target, 0 = built-in default of 64
BufferSize = 64
# Secret for validating incoming webhook requests (auto-generated on first launch)
RecvSecret = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"/webhook/events accepts two authentication methods (either one suffices):
| Source | Method | Notes |
|---|---|---|
| Python AI | Authorization: Basic h |
暂无开放 Issues,或尚未同步最近议题。