Skip to content
OPQAI.
Sourced intermediate / πŸͺ SME Operations Free tools

Set Up a Private AI Network Video Recorder with OpenNVR

Job to be done: Set up a local, private AI-powered network video recorder for IP cameras

πŸ‡³πŸ‡¬ Ways to use this in Nigeria

Ideas to get you started, adapt to your situation.

  • Small business

    Set up a local camera system to monitor your shop's inventory room, asking 'Did anyone enter the stock room after closing?' without cloud storage fees.

  • Entrepreneur

    Monitor foot traffic patterns in your pop-up shop or exhibition booth, asking 'How many people stopped at my display between 1 PM and 3 PM?' to optimize layout, keeping all data private.

  • 9-5 employee

    Deploy a private surveillance system for your office server room, asking 'Was there any unauthorized movement near the server racks after hours?' to enhance security without cloud dependency.

What you’ll get

You will set up your own private Network Video Recorder (NVR) that uses AI to analyze your camera feeds. This means you can ask questions about what your cameras see, like β€œIs anyone in the kitchen?”, and get answers without sending your data to the cloud. This approach is great for privacy and control over your surveillance footage.

Tools you need

  • OpenNVR (free): The main software that records video and integrates AI features.
  • Docker (freemium): A tool to run applications in isolated environments, making installation easier.
  • Ollama (free): Software that lets you run AI language models locally on your computer.
  • qwen2.5:1.5b (free): A specific, small AI language model that runs with Ollama.
  • YOLOv8 (free): An AI model used for detecting objects in images and video.
  • Whisper (free): An AI model for converting spoken audio into text.
  • Piper (free): An AI model for converting text into spoken audio.

Steps

  1. Clone the OpenNVR repository: This downloads the necessary files for OpenNVR to your computer. Open your terminal or command prompt and run:

    git clone https://github.com/open-nvr/open-nvr.git

    You should see messages indicating that the files are being downloaded.

  2. Navigate into the OpenNVR directory: This moves you into the folder where the files were downloaded. Run:

    cd open-nvr

    Your command prompt should now show that you are inside the open-nvr folder.

  3. Start OpenNVR: This command begins the installation and setup process. It will download Docker images, which can take 8 to 15 minutes. You can press Enter to accept default settings during the setup wizard that appears. Run:

    # For macOS or Linux
    ./start.sh
    # For Windows (PowerShell)
    .\start.ps1

    After the initial download and setup, OpenNVR will start much faster on subsequent runs.

  4. Access OpenNVR and set up your camera: Once OpenNVR is running, it will provide a URL. Open this URL in your web browser. You will be guided through setting a password, adding your IP camera (or using your webcam/phone as a camera), and within about 30 seconds, you should see detection boxes on your live video feed.

  5. Ask questions about your cameras: To use the AI chat feature, you can either type your questions or use voice commands. The example below shows how to start the chat interface. You will need to open the provided URL in your browser. Run the following command in your terminal (this command is for the camera agent, which handles AI interactions):

    # This command starts the camera agent with chat enabled
    # The exact path to this script might vary, check the OpenNVR documentation for the precise location if this doesn't work.
    # A common location is within the examples/camera-agent directory.
    # For example:
    # cd examples/camera-agent
    # ./quickstart.sh --chat

    Then, open http://localhost:9100/demo in your web browser. You can then type your questions or use voice commands if your microphone is set up.

Original source

This workflow is based on the work of surajrb, shared on their blog. They developed OpenNVR, an open-source project designed to give users full control over their network video recordings and AI analysis, keeping everything local for privacy and security.

Notes & variations

  • Free tier alternative: All the core tools mentioned (OpenNVR, Docker, Ollama, YOLOv8, Whisper, Piper) are free to use. The main cost is your internet data for the initial download of large AI models and Docker images.
  • Common mistake: If the initial setup takes longer than expected (over 15 minutes), it’s likely still downloading the necessary Docker images. Be patient and ensure your internet connection is stable. Do not interrupt the process.
  • Tip for better results: For more advanced AI analysis, you can explore swapping out the default AI models (like qwen2.5:1.5b for chat or YOLOv8 for detection) with other compatible models that might offer better accuracy or specific features, as OpenNVR separates models from the core rules.

Keep going

More SME Operations workflows