OpenNVR
Open-source · AGPLv3 · Offline-first

Own Your Security.
Bring Your Own AI.

Most IP cameras are insecure by default and phone home to a vendor's cloud. OpenNVR puts them on a network they can't escape, keeps every frame and every inference on hardware you own, and turns any AI model into a first-class detector. Then you can just ask it what it sees.

Built on a peer-reviewed offline-first security architecture. Read the paper →

infer_adapter.sh
# Ask an adapter about a live camera frame — on your hardware
curl -X POST http://opennvr.local/infer \
-H "Content-Type: application/json" \
-d '{
"task": "image-to-text",
"input_data": {
"model_name": "Salesforce/blip-image-captioning-base",
"inputs": { "image": "opennvr://camera_0/latest.jpg" }
}
'
Response:
{ "label": "A person walking near the secure gate." }
The killer feature

Just ask your cameras.

Say it out loud — "is there a person at the front door?" — and a local LLM answers, grounded in a live frame from that camera, spoken back to you. No cloud. No API keys. No subscription. Running on the same box that records your footage.

You · spoken
"What's at the back gate right now?"
Grabbing a live frame · running BLIP + YOLOv8 locally
OpenNVR · spoken reply
"A delivery van is parked at the back gate and one person is standing beside it. No one has approached the door."
"anyone in the kitchen?"
"did a car pass in the last 10 min?"
"is the loading bay clear?"

How it works — entirely on your hardware

  1. 1

    You speak. Silero voice-activity detection catches the turn; Whisper transcribes it locally.

  2. 2

    A local LLM reasons. An Ollama-hosted model with tool-calling decides which adapter to call — BLIP for a scene caption, YOLOv8 for detection, InsightFace for a face, or the recent-events feed.

  3. 3

    It answers, grounded in a live frame — then Piper speaks the reply. The whole loop runs offline, on the box that records your cameras.

This is the first OpenNVR example where the cameras have agency — not just data.

See it in the docs

Secure by design,
open at the core.

We didn't just build an NVR. We built the secure substrate underneath it — network isolation, encrypted transport, and a full audit trail — with the video as the easy part.

Network Isolation by Design

Cameras live on isolated, non-routable networks with no path to the internet. A hardened middleware gateway is the only edge operators and analytics ever touch — the camera vendor's flaws stop at the camera.

Offline-First Edge AI

Run YOLOv8 detection, InsightFace recognition, ByteTrack tracking, and more entirely on your own hardware. No cloud round-trip, no per-camera fees, no model that disappears when a vendor sunsets it.

End-to-End Audit Trail

Every inference carries a correlation ID joining the alert that fired to the model that ran. Model weights are fingerprinted with sha256 and polled for drift, and it all lands in an append-only log you can hand to a regulator.

TLS on Every Viewer Transport

Streams are served over RTSPS, HLS-over-TLS, and WebRTC through MediaMTX, with plaintext refused on operator-facing transports. JWT-gated, with automatic token rotation.

Granular RBAC + MFA

Role-based access control down to the per-camera level, with multi-factor authentication, audit logging, and automated JWT rotation. No default credentials ship in the image.

Decoupled AI Architecture

The video server and the AI engine run in separate, isolated processes. If an experimental model fails, your cameras keep recording — the analytics layer can never take the NVR down with it.

Any model.
One open contract.

The AI Adapter Contract is what makes OpenNVR a platform, not a product. Any model behind a REST or WebSocket endpoint becomes a first-class detector — object detection, license-plate OCR, face recognition, scene captioning, tracking, speech, and more. The SDK to wrap your own is Apache-2.0 and runs around thirty lines of Python.

Everything runs on your hardware by default. Cloud providers like Hugging Face are an explicit opt-in — under the default local_only sovereignty policy, any adapter that tries to reach the network is refused registration. You decide what, if anything, leaves the building.

  • Bring your own model via ONNX, PyTorch, or any runtime
  • Ship adapters under any licence — including proprietary or classified
  • Audit chain, fingerprint drift detection, and fair-queuing for free
Write an adapter
adapters/fire-detector/main.py
SDK
# pip install opennvr-adapter-sdk
from opennvr_adapter_sdk import (
AdapterApp, AdapterService, BodyShape,
BODY_BYTES_KEY, InferResponse,
)
class FireDetector(AdapterService):
# load(), model_info(), fingerprint() … omitted
def infer(self, payload):
frame = payload[BODY_BYTES_KEY]
out = self.model.predict(frame)
return InferResponse(
model_name="fire-detector",
model_version="1.0.0",
inference_ms=12, result=out,
)
app = AdapterApp(
service=FireDetector(),
name="fire-detector", version="1.0.0",
vendor="me", license="MIT",
tasks_advertised=["fire_detection"],
body_shape=BodyShape.IMAGE,
).fastapi_app
Conforms to OpenNVR Adapter Contract v1

Don't start from scratch.
Start from an example.

Seven working apps ship in the box. Each is a copy-as-template starting point: replace the predicate — the zone check, the dwell timer, the watchlist — with your own logic, and you have a domain-specific NVR.

beginner

Intrusion detection

People or vehicles in a restricted zone during restricted hours. Zone + schedule predicate over detection events.

intermediate

Loitering detection

Someone lingering longer than they should. A dwell-time state machine riding the live inference stream.

intermediate

License-plate recognition

YOLOv8 finds the plate, fast-plate-ocr reads it, an allow/deny watchlist decides what to do next.

intermediate

Smart doorbell

Family vs. stranger at the door with InsightFace recognition and REST-based face enrollment.

intermediate

Package delivery

Per-track state machine for arrival, linger, and pickup — turn it inside out and it's porch-pirate detection.

advanced

Camera agent

Talk to your cameras. The voice loop over Whisper, an Ollama LLM with tool-calling, and Piper.

intermediate

Home Assistant relay

Bridge OpenNVR alerts into Home Assistant via MQTT discovery — no custom integration to maintain.

…or build your own

Every example is ~50 lines of Python on top of a shipped adapter. Fork the closest one and ship.

Browse the examples

Frequently asked questions

Everything people ask before they try OpenNVR.

Is OpenNVR free and open source?

Yes. OpenNVR is fully open source under the AGPLv3 licence, and the AI adapter SDK is Apache-2.0. There are no per-camera fees, no per-seat licences, and no cloud subscription — you run it on your own hardware.

What is an open-source NVR?

An NVR (network video recorder) ingests, records, and serves video from IP cameras. An open-source NVR is one whose code you can read, audit, self-host, and modify — so your footage and analytics stay on hardware you control instead of a vendor's cloud. OpenNVR is an offline-first open-source NVR with an open AI platform on top.

How is OpenNVR different from Frigate, ZoneMinder, or Verkada?

OpenNVR adds a published open AI adapter contract (any model becomes a detector under any licence), an end-to-end audit chain with model-fingerprint drift detection, two default-deny sovereignty gates, a peer-reviewed architecture paper, and a voice agent you can talk to. See the full side-by-side on the alternatives page.

Can OpenNVR run completely offline?

Yes — offline-first is the default. Cameras sit on an isolated network with no route to the internet, recording and AI run locally, and cloud connectivity is off unless you explicitly enable it (and that opt-in is audit-logged).

Can I run my own AI models on my cameras?

Yes. Bring Your Own Model (BYOM): wrap any model — ONNX, PyTorch, a fine-tuned model, or a cloud endpoint — in about thirty lines of Python with the Apache-2.0 SDK, and OpenNVR treats it as a first-class detector. Seven adapters ship out of the box.

Can I really talk to my cameras?

Yes. The camera-agent example lets you ask a question out loud — "is there a person at the front door?" — and a local LLM answers, grounded in a live frame, spoken back to you. Whisper, an Ollama LLM with tool-calling, and Piper, all running on your hardware. No cloud, no API keys.

What cameras does OpenNVR work with?

Any camera that speaks ONVIF or RTSP — which covers virtually all modern IP cameras (Hikvision, Dahua, Axis, Reolink, and generic ONVIF/RTSP). No proprietary hardware to buy; reuse the cameras you already own.

Run it in five minutes. Build on it for good.

Pull the pre-built images, point it at a camera, and watch detections appear. Then write an adapter, fork an example, and make it solve your problem — the contract is the front door, and it's open.

Deploying for a government, critical-infrastructure, or regulated environment? Talk to us about a pilot or security assessment →