Skip to main content

What is GB28181? A practical guide to China's video surveillance standard

GB28181 is the Chinese national standard that lets cameras, NVRs and management platforms from different vendors talk to each other. If you work with Chinese hardware, bid on projects that specify “国标” (guóbiāo), or need a vendor-neutral way to bring distributed cameras into one platform, you will meet it.

This guide explains the moving parts in plain English, then shows a practical cloud deployment with CCNVR: cameras and NVRs register over SIP, media arrives over RTP, and operators use one browser-based platform for live view, recording, playback and integration.

CCNVR multi-view console

CCNVR keeps live channels, recording and playback in one browser console — a useful front end for a GB28181 deployment.

What is GB28181?​

GB28181 — formally GB/T 28181 — is a Chinese standard for video surveillance networks. It defines how devices register with a platform, how the platform discovers channels, how live and recorded video is requested, and how PTZ control, alarms and other commands are exchanged.

It is not a camera brand, a codec, or a replacement for RTSP. It is a signaling and interoperability layer built around two familiar protocols:

  • SIP for registration, session setup, control and event messages
  • RTP for the actual audio and video media

The standard has evolved through GB28181-2011, GB28181-2016 and GB28181-2022. Newer revisions add capabilities and tighten interoperability, but the core model remains the same: devices register with a SIP server, expose a catalog of channels, and send media when the platform asks for it.

Why GB28181 matters outside China​

Many cameras and NVRs sold internationally are built on Chinese hardware platforms and support GB28181, even when ONVIF is also available. That matters in several situations:

  • A building already has GB28181 cameras or recorders and you need a modern management layer.
  • A project requires centralized monitoring across multiple sites, but the devices sit behind NAT.
  • You want to avoid replacing working cameras just to get a browser-based viewing and recording platform.
  • An integration needs a standards-based way to discover channels, control PTZ and receive alarms.

GB28181 is especially common in projects that combine cameras from different vendors under one platform. Instead of integrating each vendor's SDK, the platform speaks one protocol to all of them.

How a GB28181 session works​

A simplified flow looks like this:

  1. Registration. The camera or NVR sends a SIP REGISTER to the platform. The platform authenticates the device and records its SIP ID and reachable address.
  2. Catalog. The platform asks the device for its channel list. Each channel has an ID, name, manufacturer, model and status.
  3. Live view. The platform sends an INVITE for a channel. The device responds with the media parameters, then sends RTP audio/video to the platform's receive address.
  4. Playback and control. The platform can request recorded streams, PTZ commands, presets and alarm subscriptions using additional SIP messages.
  5. Keepalive. Devices send periodic messages so the platform knows they are still online.

The hard part is usually not SIP. It is NAT and media routing: the platform must advertise an address the device can reach, and the RTP ports must be open in the right direction. That is why cloud deployments need a public IP or a SIP domain, a predictable port range, and careful firewall rules.

Cloud deployment blueprint​

The diagram below shows the model used by CCNVR: devices connect securely over the internet to a CCNVR instance on a cloud VPS, and users reach the same instance through HTTPS.

GB28181 cloud deployment with CCNVR

A Linux VPS with a public IP, GB28181 signaling on port 15060, RTP media on 31100–31200, and persistent storage for recordings.

What the cloud host needs​

  • A public IP or a SIP domain that resolves to the VPS.
  • TCP and UDP 15060 for GB28181 SIP signaling (the CCNVR default; the port is configurable).
  • TCP and UDP 31100–31200 for RTP media, unless you have configured a different range.
  • TCP 16188 for the HTTPS web console and API.
  • A persistent disk mounted at /data for configuration, database, recordings and license data.
  • A TLS certificate or reverse proxy in front of the web console.

For GB28181, Linux host networking is the simplest choice. It keeps SIP and RTP behavior predictable and avoids the extra NAT layer introduced by Docker bridge networking. CCNVR's Linux Docker package uses host networking for this reason.

Deploy CCNVR on the VPS​

The high-level sequence is:

  1. Create a Linux VPS with a public IPv4 address and attach a data disk.
  2. Install Docker Engine and the Compose plugin, or use the native Linux package.
  3. Deploy CCNVR and mount the data disk at /data.
  4. Open the required ports in the host firewall and the cloud provider's security group.
  5. Sign in, change the default administrator password and configure the GB28181 SIP settings.
  6. Add each device by its SIP ID and credentials.
  7. Verify live view, playback and PTZ from the browser.
  8. Put the web console behind HTTPS and restrict administrative access.

If you use Docker, the quick start guide has copy-ready online and offline paths for Linux. The important part is host networking and keeping /data on persistent storage.

Storage and retention​

Cloud recording changes the economics of a deployment. A 1080p camera can produce roughly 1 GB per day at a typical bitrate, so a 16-camera site with 30-day retention can need around 480 GB — before overhead. Plan storage from the actual bitrate and retention policy, not from the camera count alone.

CCNVR supports continuous, scheduled and event-triggered recording, with configurable retention. On a VPS, use a separate data disk and monitor free space so a full disk does not interrupt recording.

Where CCNVR fits​

CCNVR is a self-hosted NVR and video platform, not a mandatory SaaS. In a GB28181 deployment it provides:

  • GB28181 device onboarding and channel management
  • Live view, multi-view walls, recording and timeline playback
  • PTZ control, snapshots and alarm handling
  • Browser access over WebRTC, HTTP-FLV or HLS
  • Multi-user access and permissions
  • A documented HTTP API for portals, automation and third-party integrations

You keep the cameras and the recordings under your control. The cloud VPS is simply where the platform and storage live.

CCNVR device cards

Devices and channels are managed from the same console; recordings stay on the storage you choose.

GB28181 versus ONVIF​

They solve different problems and often coexist:

GB28181ONVIF
OriginChinese national standardOpen industry forum
SignalingSIPSOAP-based device services, WS-Discovery
MediaRTPRTSP
Typical strengthCentralized platforms, Chinese devices, NAT-aware deploymentsBroad camera interoperability, local discovery, PTZ and events
Common pairingCameras/NVRs registering to a platformCameras discovered on a LAN and streamed over RTSP

Many devices support both. A platform that can ingest both gives you more freedom: use GB28181 where it fits, and ONVIF/RTSP where it does not. See What is ONVIF? for the other side of the picture.

Frequently asked questions​

Is GB28181 the same as RTSP?​

No. RTSP is a media transport protocol. GB28181 is a broader surveillance standard that uses SIP for signaling and RTP for media. In practice, a GB28181 platform may also use RTSP for other cameras.

Do I need a public IP for GB28181 in the cloud?​

Yes, or a reachable SIP domain. Devices must be able to register with the platform and send media to it. If the platform is behind NAT, configure port forwarding or a VPN that preserves the necessary signaling and media paths.

Can I run GB28181 on Docker?​

Yes, but use host networking on Linux for the most predictable SIP and RTP behavior. Avoid Docker Desktop bridge networking on Windows for GB28181 production deployments.

Does CCNVR replace my existing NVR?​

CCNVR can act as the recording and management layer, or sit alongside existing devices. It works with GB28181 devices and standard ONVIF/RTSP cameras, so you can bring existing hardware into a browser-based workflow without a full replacement.

Next steps​

GB28181 is not as complicated as its specification looks. Once registration and media routing are working, the rest is a familiar video platform problem: channels, recordings, playback, access and integrations.