Camera and recording fields
NovaVMS stores camera metadata in two tables: cameras (one row per camera) and camera_streams (one row per stream profile). This page lists every field.
cameras table
| Field | Type | Default | Description |
|---|---|---|---|
id | uuid | gen_random_uuid() | Primary key. |
org_id | uuid | - | Owning organisation. Composite key with id. |
site_id | uuid | - | Site the camera belongs to. |
gateway_id | uuid | - | Gateway the camera connects through. NULL for direct-mode cameras. |
connection_mode | enum | - | One of direct, gateway. |
name | text | - | Operator-chosen display name. |
type | enum | - | One of onvif, rtsp. |
status | enum | pending | One of pending, online, offline, error, disabled. |
enabled | boolean | true | When false, streaming and recording are suspended. |
host | text | - | IP or hostname for ONVIF cameras. |
port | integer | 80 | ONVIF HTTP port. |
rtsp_main_uri | text | - | RTSP URI for the main profile. |
rtsp_sub_uri | text | - | RTSP URI for the sub profile. |
rtsp_url | text | - | Full RTSP URL for direct-mode cameras. |
codec | enum | - | One of h264, h265. |
resolution_width | integer | - | Pixels. |
resolution_height | integer | - | Pixels. |
fps | integer | - | Frames per second reported by the camera. |
has_audio | boolean | - | True if the camera advertises an audio track. |
has_ptz | boolean | - | True if the camera advertises PTZ controls (ContinuousMove + Stop only in v1 — no presets). |
supports_backchannel | boolean | false | True if the camera supports ONVIF talkdown (audio backchannel). Detected via 3-layer probe: Media1 GetAudioOutputs, vendor allowlist, RTSP DESCRIBE per Profile T §A.4. Migration 000056. |
recording_duration_sec | integer | 15 | Clip length. Range 5 - 120. |
pre_event_buffer_sec | integer | 5 | Seconds recorded before the trigger. Range 0 - 10. |
post_event_buffer_sec | integer | 3 | Seconds recorded after the trigger. Range 0 - 10. |
ai_analysis_mode | enum | snapshot_only | One of snapshot_only, multi_frame, full_video, disabled. |
ai_pass_mode | enum | one_pass | One of one_pass, two_pass. |
prompt_pack_id | uuid | - | Per-camera prompt pack override. |
ai_provider_override | text | - | Overrides org default provider for this camera. |
ai_model_override | text | - | Overrides org default model for this camera. |
motion_sensitivity | enum | medium | One of low, medium, high. Persisted but not active (D12-REV — software motion detection unimplemented). |
motion_zones_json | jsonb | - | Polygon zones for motion detection. Persisted + validated but not active in v1 (D12-REV). |
detection_stream | enum | sub | Which profile the AI samples. One of sub, main. See D21. Persisted but not yet wired at runtime — AI pipeline pulls from main regardless. |
recording_stream | enum | main | Which profile is recorded. One of main, sub. See D21. |
stream_transport | text | - | RTSP transport override (e.g., tcp or udp). |
stream_mode | text | single | single or dual — controls whether the gateway registers both main + sub with go2rtc or just main with sub as a fallback URL. |
analysis_focus | text | "" | Free-form natural-language focus directive consumed by the prompt pack at AI analysis time. Max 1000 chars. |
ignore_guidance | text | "" | Free-form natural-language guidance describing things to ignore. Max 1000 chars. |
monitoring_schedule | jsonb | [] | Time-window JSON array describing when analysis is active. |
analysis_focus_version | integer | 0 | Auto-incrementing version; updated on every analysis_focus / ignore_guidance / monitoring_schedule PATCH. |
nbd_override | jsonb | - | Per-camera “No Big Deal” suppression knobs that override the per-rule defaults. Migration 000080. Subset of {enabled, window_seconds, similarity_threshold, novelty_threshold, evidence_confidence_floor, allow_suppress_importance_4}. |
thumbnail_path | text | - | Object storage key for the latest thumbnail. |
model | text | - | Free-text hardware model string. |
last_event_at | timestamptz | - | Most recent event recorded on this camera. |
last_error | text | - | Most recent error string, if any. |
deleted_at | timestamptz | - | Soft-delete timestamp. NULL for live cameras. |
created_at | timestamptz | now() | Row creation time. |
updated_at | timestamptz | now() | Last update time. |
Retention in days is set at the site level, not per camera. See Retention policy.
camera_streams table (internal)
The camera_streams table is an internal bookkeeping table populated by ONVIF discovery. It is not part of the public API surface.
The admin-facing fields that matter — detection_stream and recording_stream on the cameras table — name which row of this table the AI pipeline and the recorder read from. See Detection vs recording stream for the model.
| Field | Type | Default | Description |
|---|---|---|---|
id | uuid | gen_random_uuid() | Primary key. |
org_id | uuid | - | Owning organisation. |
camera_id | uuid | - | Parent camera. |
stream_type | enum | - | One of main, sub. One row of each per camera. |
uri | text | - | RTSP URI for this profile. |
codec | text | - | Codec reported by ONVIF probe (h264, h265). |
width | integer | - | Pixels. |
height | integer | - | Pixels. |
fps | integer | - | Frames per second. |
bitrate_kbps | integer | - | Reported bitrate. |
created_at | timestamptz | now() | Row creation time. |
updated_at | timestamptz | now() | Last update time. |
Related
- Retention policy — site-level retention days
- Cameras API — REST endpoints that read and write these fields
- Recording pipeline — how detection and recording streams interact