Skip to main content

Camera Configuration

What This Page Covers

This page explains how IP cameras are modeled within the Zipato platform, how their connection details and stream URLs are configured, and how cameras are registered — both via device discovery and static IP. It also covers the channel creation process that links a camera to the Cloud NVR for recording and playback.


Camera Endpoint Model

A camera exists in the platform as an endpoint with the device class com.zipato.network.ip.IP. All configuration — credentials, stream URLs, snapshot paths — is stored in the endpoint's data map. This means any IP camera that speaks RTSP, RTMP, HTTP or MJPEG can be registered regardless of manufacturer.

IP Device
└── Camera Endpoint (class: com.zipato.network.ip.IP)
├── Connection: username, password, IP, port
├── Stream URLs: high, mid, low, MJPEG
├── Snapshot URL
├── Recording URL
├── Admin URL
└── Configuration checksum

Configuration Fields

The camera endpoint stores its configuration in a flat key-value data map. URL fields support template variables that are resolved at request time.

Connection Fields

FieldTypePurpose
usernameStringCamera authentication username
passwordStringCamera authentication password
staticIpStringManually configured IP address
discoveredIpStringIP address found through auto-discovery
portIntegerCamera connection port
adminUrlStringCamera's web administration interface URL

Stream URL Fields

FieldPurpose
hiQualityStreamHigh quality stream URL template
midQualityStreamMedium quality stream URL template
lowQualityStreamLow quality stream URL template
mjpegUrlMotion JPEG stream URL template
snapshotSnapshot capture URL template
recordingRecording stream URL template

Metadata Fields

FieldTypePurpose
cameraConfigJSONFull configuration object from the camera
configChecksumStringSHA-1 hash of the current configuration
videoThumbDelayIntegerFrame offset in seconds for thumbnail extraction
discoveredStringDiscovery marker (value: "camera")

URL Templates

Stream and snapshot URLs use template variables that the platform resolves at request time using the camera's stored connection details:

VariableResolved To
${cameraIp}The camera's IP address (static or discovered)
${cameraPort}The camera's connection port
${username}The camera's authentication username
${password}The camera's authentication password

Example template:

rtsp://${username}:${password}@${cameraIp}:${cameraPort}/cam/realmonitor?channel=1&subtype=0

Resolved URL:

rtsp://admin:pass123@192.168.1.50:554/cam/realmonitor?channel=1&subtype=0

This indirection allows stream URLs to remain valid when credentials or network addresses change — only the connection fields need to be updated.


Supported Stream Protocols

ProtocolTypical Use
RTSPPrimary protocol for live and recorded streams
RTMPReal-time streaming to cloud workers and YouTube Live
HTTP/HTTPSWeb-accessible streams and snapshot capture
MJPEGBrowser-compatible motion JPEG for low-latency preview

The protocol is determined by the URL scheme in the stream template. A single camera can expose different protocols across its quality levels.


Adding a Camera

There are two methods for adding a camera to the platform:

On a Discovered Device

When a hub discovers an IP device on the local network, a camera endpoint can be created on that device:

  1. The hub discovers an IP device and reports it to the platform.
  2. The user selects the device and requests camera creation.
  3. The platform creates a camera endpoint on the device, using the device's discovered IP and port.
  4. The user provides a camera configuration (credentials, stream URLs).
  5. The configuration is applied to the endpoint's data map.

Static IP Camera

For cameras that are not auto-discovered (e.g. cameras on a different subnet or behind a router), a static camera can be created by specifying the IP address directly:

  1. The user provides an IP address, port and camera configuration.
  2. The platform creates a standalone camera endpoint with the staticIp field set.
  3. Stream URLs are resolved using the provided static IP.

Applying Configuration

A camera configuration is a JSON object that maps directly to the endpoint's data fields. When a configuration is applied:

  1. The new configuration fields are written to the endpoint's data map.
  2. A SHA-1 checksum of the configuration is computed and stored in configChecksum.
  3. If the checksum differs from the previous value, the platform knows the camera's settings have changed.

The configure action can be triggered to push configuration to the physical camera device (for cameras that support remote provisioning).


Channel Creation

A channel links a camera to a Cloud NVR instance, enabling cloud recording, clip creation and snapshot storage. Without a channel, the camera can only be accessed for live viewing via its direct stream URLs.

Channel Providers

The platform supports multiple channel providers — the backend service that manages cloud video storage:

ProviderDescription
VMSZipato's own Cloud VMS with NVR workers and S3 storage

The default provider is configured at the platform level. A camera's provider can be switched after channel creation.

Channel Creation Flow

  1. The user requests channel creation for a camera, optionally specifying a provider.
  2. The platform calls the provider's API to create a channel.
  3. The provider returns a channel ID and access credentials.
  4. The channel is associated with the camera endpoint.
  5. The camera can now be streamed to the Cloud NVR for recording.

Once a channel exists, the camera can obtain streaming tokens and playback tokens for cloud operations.


Stream Tokens

After channel creation, the camera uses token-based authorization for cloud streaming and playback:

TokenPurpose
Streaming tokenAuthorizes pushing a live stream to the NVR Worker
Playback tokenAuthorizes retrieving recordings and clips from cloud storage

A streaming token encodes the NVR URL and a stream authorization session. It is passed to the Local Agent to initiate the stream push. A playback token authorizes the client to access stored media for that channel.


PTZ Configuration

For cameras with Pan-Tilt-Zoom capability, PTZ commands are dispatched as control events through the device model:

ActionParametersDescription
uppan, tiltTilt camera upward
downpan, tiltTilt camera downward
leftpan, tiltPan camera left
rightpan, tiltPan camera right
zoomzoomOptical zoom in/out
homeReturn to home position
stopStop current movement
preset/{n}Move to saved preset position
patrol/{n}Start a PTZ patrol route

PTZ does not require additional configuration on the camera endpoint — it uses the platform's device control event system. The camera hardware must support ONVIF PTZ or the manufacturer's proprietary PTZ protocol.


IP Resolution

When resolving a camera's IP address for stream URL construction, the platform follows this precedence:

  1. Static IP — if staticIp is set, it is always used.
  2. Discovered IP — if discoveredIp is available from device discovery.
  3. Device IP — falls back to the parent device's known IP address.

This allows cameras to be accessed reliably whether they were manually configured or auto-discovered.


Where to Continue

GoalPage
See the streaming and recording flows in detailStreaming Flows
Learn about recording, clip and snapshot storageMedia Storage
Understand the full video management modelOverview
Learn how physical devices are normalizedDevice Normalization