Skip to content

StipecMV/watchforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WatchForge Logo

WatchForge

WatchForge is a self-hosted video processing for NVR (Network Video Recorder) system to enhance pixel precision motion detection.

Project Structure

watchforge/
├── WatchForge.slnx              # Main .NET solution file
├── testapps/                    # Test applications
│   └── nvr-client/              # DVRIP file downloader for Xiongmai/Sofia NVR
│       └── src/
│           ├── WatchForge.NVR.Client.TestApp/
│           └── WatchForge.NVR.Client.TestApp.Tests/
├── client/                      # Frontend client application
├── db/
│   └── queries/                 # Database schema and queries
└── server/                      # Dotnet-based server components
    └── MotionSentinel/          # Linux Worker Service — OpenCV motion detection
        ├── WatchForge.MotionSentinel.Server.Core/
        ├── WatchForge.MotionSentinel.Server.Core.Tests/
        ├── WatchForge.MotionSentinel.Server.Service/
        └── WatchForge.MotionSentinel.Server.Service.Tests/

✨ Features

MotionSentinel (.NET · Linux)

  • 🎯 Farneback Dense Optical Flow — per-frame motion region detection using OpenCV
  • 📁 Local filesystem — watches NVR recordings folder, writes JSON detection results
  • ⚡ FileSystemWatcher + backfill — picks up files written while the service was down
  • 🔌 Headless Worker Service — runs as a systemd unit, no UI required
  • 🧪 test coverage via TUnit + Moq

See server/MotionSentinel/README.md for full docs.

NVR Client (.NET · Linux)

  • 📡 DVRIP protocol — native Xiongmai/Sofia TCP protocol (port 34567)
  • 🔐 Sofia MD5 login, file listing, best-effort H.264 file download
  • 🖥️ .NET 10, Linux (x64, arm64)
  • 🧪 test coverage via TUnit + Moq See testapps/nvr-client/README.md for full docs.

🛠️ Tech Stack

.NET Components

  • Framework: .NET 10
  • NVR protocol: DVRIP (raw TCP, Xiongmai/Sofia firmware)
  • Motion detection: OpenCV (Farneback optical flow) via OpenCvSharp4
  • Platform: Linux (x64);
  • Testing: TUnit + Moq with code coverage

👨‍💻 Getting Started

Prerequisites

For .NET Components

  • .NET 10 SDK
  • Any .NET 10 runtime platform (Linux x64)

Clone the Repository

git clone https://github.com/StipecMV/watchforge
cd watchforge

�📝 License

WatchForge is an open-source project. See the LICENSE file for details.

About

WatchForge is a self-hosted video processing for NVR system to enhance pixel precision motion detection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages