WVP-GB28181-Pro Documentation

repository·master·Indexed 27 days ago

https://github.com/648540858/wvp-gb28181-pro

A professional-grade video platform and signaling gateway implementing GB/T 28181-2016, GB/T 28181-2022, and Ministry Standards 808 and 1078. Built upon ZLMediaKit, it supports device management, PTZ control, and cascading for brands like Hikvision, Dahua, and Uniview. It provides multi-protocol streaming (RTSP, RTMP, HTTP-FLV, HLS, Websocket-FLV) and supports x86/ARM architectures with Docker Compose deployment.

Tokens
25.7K
Snippets
39
Records
184
Agent score
92%

What's inside WVP-GB28181-Pro

  1. Overview of WVP-PRO

    master

    WVP-PRO is an out-of-the-box video platform implementing the GB/T 28181-2016 standard. It is built upon the ZLMediaKit open-source streaming service.

    Key capabilities include:

    • Connecting IPC cameras via the 28181 protocol.
    • Distributing video streams using 28181, RTSP, RTMP, or FLV protocols to other platforms.
    • Compatibility with major brands like Hikvision, Dahua, and Uniview (IPC, NVR, and platforms).
    • Cascading GB/T 28181 devices to other national standard platforms.
    • Supporting the push of non-standard device streams to GB/T 28181 platforms.
    • Multi-stream media node load balancing.
    • A complete built-in frontend for immediate deployment without secondary development.
  2. Overview of WVP-PRO 2.0

    master
    WVP-PRO 2.0 is an out-of-the-box video platform implementing the GB/T 28181-2016 standard, with backward compatibility for GB/T 28181-2011. It includes a complete frontend interface for immediate use and is released under the MIT license, allowing for commercial use provided copyright information is preserved.
  3. Overview of WVP-GB28181-Pro

    master

    WVP-GB28181-Pro is an out-of-the-box network video platform implementing the GB28181-2016, Ministry Standard 808, and Ministry Standard 1078 protocols. It manages core signaling and device backends, supporting NAT traversal and integration with major brands like Hikvision, Dahua, and Uniview (IPC/NVR).

    Key capabilities include:

    • Protocol Support: GB28181, 808, 1078, RTSP, RTMP, ONVIF, and Hikvision ISUP.
    • Video Streaming: Supports H264/H265, and outputs various formats including RTSP, RTMP, HTTP-FLV, Websocket-FLV, and HLS.
    • Cascading: Supports GB28181 cascading (upward and multi-platform) and cross-network video preview.
    • Device Management: PTZ control, preset positions, recording playback/download, and alarm handling.
    • Deployment: Supports x86/ARM architectures, standalone or distributed deployment (WVP and ZLMediaKit separated), and various databases (MySQL, PostgreSQL, Kingbase).
  4. Understand Voice Intercom (Broadcast Mode) constraints

    master

    WVP-PRO implements the broadcast mode from GB/T 28181-2016. In this mode, the server sends audio to the device. The device initiates the process by sending an Invite message to WVP-PRO, and the transport method (UDP/TCP Passive/TCP Active) is determined by the device.

    Critical Limitations:

    • Public Network Compatibility: Many devices (e.g., most Hikvision devices) only support UDP for receiving streams. If WVP-PRO is on a public network and the device is behind a NAT/Internal network, WVP-PRO cannot connect to the IP/port provided by the device, causing the intercom to fail.
    • Compatible Devices: Devices that support TCP Active mode (such as Dahua or many law enforcement recorders) are suitable for public network intercom because they can pull the stream from the server.
  5. Understand WVP multi-node load balancing

    master

    WVP supports scaling video concurrency by managing a cluster of ZLM nodes.

    • Storage: WVP records all connected nodes in Redis.
    • Load Tracking: WVP tracks the current load status of each ZLM node.
    • Load Balancing: When a new request arrives, WVP selects the ZLM node with the lowest current load to handle the request, ensuring efficient distribution across the cluster.
  6. Review licensing and commercial usage requirements

    master

    WVP-PRO's own code is licensed under the permissive MIT License, allowing free use in both commercial and non-commercial projects provided that copyright information is retained.

    Important for Commercial Users:

    • This project incorporates various other open-source code snippets. For commercial applications, you should manually replace or remove these third-party components to ensure compliance.
    • When using this project, you must also declare the licenses of the third-party libraries that this project depends on within your own authorization/license documentation.
    • The developers and the project itself are not liable for any commercial disputes or copyright infringements arising from the use of this project; users assume all legal risks.
  7. Compile, Configure, and Deploy WVP-GB28181-Pro

    master

    The project documentation provides comprehensive guides for setting up the platform. You can find specific instructions for:

    • Compilation: Building the project from source.
    • Configuration: Setting up environment variables and system parameters.
    • Deployment: Deploying the platform to production environments.
  8. Development Environment Requirements

    master

    To contribute to the wvp-gb28181-pro project, ensure your development environment meets the following specifications:

    • Backend: Java (JDK 1.8) using the Spring Boot framework.
    • Frontend: Vue.js using Node.js v10.19.0 and npm 6.14.4.
    • IDE: JetBrains IntelliJ IDEA is recommended.

    Important Notes:

    • The project makes extensive use of asynchronous operations.
    • To understand the business logic and code flow, you must reference the GB/T 28181 protocol documentation; the code alone may be difficult to follow without protocol context.
    • Proficiency with packet capture (tcpdump) is essential for debugging and development.
  9. Integrate live streaming devices with WVP

    master

    WVP supports three image input methods: Live streaming, Pull stream proxy, and GB/T 28181. For live streaming device integration, the workflow is:

    1. The live device initiates a push stream to ZLMediaKit.
    2. ZLMediaKit sends a hook notification to WVP with the stream information.
    3. An upper-level GB/T 28181 platform requests to play this video stream.
    4. WVP notifies ZLMediaKit to push the stream to the upper-level GB/T 28181 platform.

    Key Configuration Tasks:

    • Sharing streams: By default, streams appear in the list upon receipt. To share stream information with other GB/T 28181 platforms, you must edit the GB/T 28181 Channel Configuration and configure the GB/T encoding.
    • Bulk importing channels: To push large amounts of channels to an upper-level platform before streaming, use the "Download Template" button, modify the template, and then use the "Channel Import" button to upload the data.
  10. Configure HTTPS for web-based voice intercom

    master

    Web browsers require HTTPS to access microphone/audio capture capabilities. To implement web-based voice intercom, you must configure SSL certificates for both WVP-PRO and ZLMediaKit (ZLM).

    Public Network Usage

    Use certificates provided by a Certificate Authority (CA) or cloud service provider.

    Local Area Network (LAN) Usage

    For LAN environments, you must generate self-signed certificates. It is recommended to use mkcert for Linux:

    1. Install mkcert:
      ./mkcert-v1.4.4-linux-amd64 -install
    2. Generate PEM certificates:
      ./mkcert-v1.4.4-linux-amd64 <LAN_IP_1> <LAN_IP_2> <LAN_IP_3>
      This produces *.pem and *-key.pem files. Use these to configure WVP-PRO.
    3. Generate ZLM certificate: Combine the files into a single .pem file for ZLM:
      cat *.pem *-key.pem > ./zlm.pem

    Applying ZLM Certificates

    Use one of the following methods to apply the certificate to ZLMediaKit:

    • Method 1: Replace the existing default.pem in the ZLM directory by deleting it and renaming your zlm.pem to default.pem.
    • Method 2: Add the -s zlm.pem flag when starting ZLM.