MiBeeNvr

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT

README ΒΆ

MiBee NVR

GitHub Release CI Go Svelte SQLite Docker Raspberry Pi

Turn any Raspberry Pi into a professional NVR in 60 seconds.
Single binary, zero dependencies, no cloud required. Runs on Raspberry Pi 3B with 512MB memory budget.

δΈ­ζ–‡ β€” English

Quick Start

curl -fsSL https://raw.githubusercontent.com/Mi-Bee-Studio/MiBeeNvr/main/install.sh | sudo bash

Downloads the binary, creates a system user (nvr), generates a config, installs a systemd service, and starts it. Data directory: /var/lib/mibee-nvr.

Option 1: Pre-built Binary

Download the latest binary from GitHub Releases:

# AMD64 (most PCs/servers)
wget https://github.com/Mi-Bee-Studio/MiBeeNvr/releases/latest/download/mibee-nvr-amd64
chmod +x mibee-nvr-amd64

# ARM64 (Raspberry Pi 4/5, etc.)
wget https://github.com/Mi-Bee-Studio/MiBeeNvr/releases/latest/download/mibee-nvr-arm64
chmod +x mibee-nvr-arm64

# ARMv7 (Raspberry Pi 2/3, etc.)
wget https://github.com/Mi-Bee-Studio/MiBeeNvr/releases/latest/download/mibee-nvr-armv7
chmod +x mibee-nvr-armv7

Initialize config and start:

./mibee-nvr-amd64 init --password yourpassword
./mibee-nvr-amd64 -config mibee-nvr.yaml

Open http://localhost:9090 to access the Web UI.

Option 2: Docker
docker compose up -d

Open http://localhost:9090 to access the Web UI.

To store recordings on an external drive, edit the volume mount in docker-compose.yml:

    volumes:
      - /mnt/external/nvr:/data    # ← change to your host path
    environment:
      - NVR_DATA_DIR=/data          # must match the volume mount
Option 3: Build from Source
git clone https://github.com/Mi-Bee-Studio/MiBeeNvr.git
cd MiBeeNvr
make build
./mibee-nvr init --password yourpassword
./mibee-nvr -config mibee-nvr.yaml

For detailed setup, see Getting Started.

Why MiBee NVR?

  • Single Binary: Zero dependencies, embedded Svelte 5 SPA, CGO_ENABLED=0
  • Raspberry Pi 3B Ready: Runs on 1GB RAM with 512MB memory budget
  • Multi-Protocol Streaming: HLS, WebRTC, HTTP-FLV, RTMP, SRT, WebSocket
  • No Cloud Required: Self-hosted, no subscriptions, no vendor lock-in
  • Modern Web UI: Dark/light themes, i18n support, responsive design
  • ONVIF Support: Auto-discovery, PTZ control, stream URI management
  • Smart Integrations: MQTT triggers, WebDAV, FTP, FFmpeg transcoding

Screenshots

Login
Login page with dark/light theme toggle and authentication

Dashboard
Dashboard with live camera feeds, recording status, and system metrics

Settings
Settings panel for camera configuration and system management

Features

πŸ“· Camera Support
  • RTSP (H.264/H.265/MJPEG) streaming
  • HTTP JPEG snapshot streaming
  • ONVIF discovery & management with PTZ control
  • Xiaomi CS2 P2P protocol support
πŸ“Ί Streaming & Live View
  • HLS on-demand streaming with LL-HLS support
  • WebRTC WHEP for sub-second latency viewing
  • HTTP-FLV for browser-friendly streaming
  • RTMP ingest server for push/pull workflows
  • SRT low-latency transport receiver
  • WebSocket real-time binary frame streaming
πŸ’Ύ Recording & Storage
  • Automatic MP4 segment generation
  • Multi-camera concurrent recording
  • Per-camera retention policies
  • Audio capture (AAC + G.711)
  • Segment merging with configurable policies
  • Periodic timelapse recording
πŸ”§ Management
  • Modern Svelte 5 web UI with dark/light themes
  • REST API for automation
  • BasicAuth with bcrypt password hashing
  • Prometheus metrics integration
  • Atomic configuration with validation
πŸ€– Smart Features
  • AI detection with ONNX Runtime inference
  • Multi-layer camera health monitoring
  • Auto-remediation for connection issues
  • SSE-based real-time event system
  • Quality scoring and alerting
πŸ”Œ Integrations
  • MQTT trigger-based recording
  • WebDAV server for file access
  • FTP server for remote uploads
  • FFmpeg hardware transcoding
  • Event-driven architecture

Supported Protocols

Protocol Direction Status Notes
RTSP Camera β†’ NVR βœ… Done H.264/H.265/MJPEG support
HTTP JPEG Camera β†’ NVR βœ… Done Snapshot streaming
HLS NVR β†’ Browser βœ… Done On-demand streaming
WebRTC NVR β†’ Browser βœ… Done WHEP sub-second latency
HTTP-FLV NVR β†’ Browser βœ… Done Browser-friendly streaming
RTMP Camera β†’ NVR βœ… Done Push/pull support
SRT Camera β†’ NVR βœ… Done Low-latency transport
ONVIF Camera ↔ NVR βœ… Done Discovery, PTZ, stream URI
Xiaomi CS2 Camera β†’ NVR βœ… Done P2P protocol, cloud auth

Use Cases

🏠 Home Security

Monitor your property with multiple cameras. Motion-triggered recording, smartphone alerts, and easy remote viewing from anywhere.

πŸͺ Small Business

Affordable security system for shops, offices, and warehouses. Multi-camera support with individual retention policies.

πŸ”§ DIY/Tinkering

Perfect for homelab enthusiasts. Self-hosted, no subscriptions, works with any RTSP camera and integrates with smart home systems.

Documentation

Document Description
Getting Started Installation, first camera setup
Configuration Full config reference
API Reference REST API documentation
MediaMTX Guide MediaMTX integration for CSI cameras
Deployment systemd, reverse proxy, cross-compile
Xiaomi Setup Xiaomi cloud camera integration
ONVIF Guide ONVIF camera setup, PTZ control, troubleshooting
Camera Guide Camera setup, protocols, troubleshooting
FTP Integration FTP file access setup
MQTT Integration MQTT smart home integration
WebDAV Integration WebDAV file access setup
Troubleshooting Common issues and solutions
Transcoding FFmpeg transcoding setup

Build & Deploy

# Build for current architecture
make build

# Cross-compile for ARM64 (Raspberry Pi)
make cross

# Run tests
make test

# Build Docker images
make docker-build       # Multi-stage build
make docker-build-arm64 # Cross-compile + scratch
make docker-build-all   # All architectures

Docker deployment:

docker compose up -d

Images published to ghcr.io/mi-bee-studio/mibeenvr with tags: latest, v1.2.3, sha-abc1234

Project Structure

cmd/mibee-nvr/       # CLI entry point + app lifecycle
internal/            # Core packages (29 Go modules)
web/                # Svelte 5 SPA frontend
deploy/             # systemd services, Caddyfile
docs/               # Bilingual documentation (EN/ZH)
tests/              # Integration tests
e2e-tests/         # Playwright E2E tests

For full project details, see AGENTS.md.

Contributing

  1. Run make lint before submitting
  2. Add tests for new features
  3. Write clear commit messages

License

MIT License Β© Mi&Bee Studio

Directories ΒΆ

Path Synopsis
cmd
mibee-nvr command
internal
ai
Package ai defines the interface for AI-powered object detection.
Package ai defines the interface for AI-powered object detection.
ai/downloader
Package downloader manages ONNX Runtime binary downloads from GitHub releases.
Package downloader manages ONNX Runtime binary downloads from GitHub releases.
ai/engine
Package engine implements a local ONNX Runtime AI provider that communicates with an external subprocess over stdin/stdout JSON.
Package engine implements a local ONNX Runtime AI provider that communicates with an external subprocess over stdin/stdout JSON.
api
flv
ftp
health
Package health implements the camera health monitoring system.
Package health implements the camera health monitoring system.
hls
middleware/remotelog
Package remotelog implements an slog.Handler that batches and ships logs to VictoriaLogs (or any JSON-lines ingestion endpoint).
Package remotelog implements an slog.Handler that batches and ships logs to VictoriaLogs (or any JSON-lines ingestion endpoint).
model/nalutil
Package nalutil provides shared NALU (Network Abstraction Layer Unit) detection utilities for H.264 and H.265 video streams.
Package nalutil provides shared NALU (Network Abstraction Layer Unit) detection utilities for H.264 and H.265 video streams.
srt
timelapse
Package timelapse provides rolling merge functionality for timelapse recordings.
Package timelapse provides rolling merge functionality for timelapse recordings.
transcoding
Package transcoding provides hardware-aware video transcoding for stored recordings.
Package transcoding provides hardware-aware video transcoding for stored recordings.
ui
xiaomi
Package xiaomi implements Xiaomi camera support for MiBee NVR, including CS2 P2P transport, MISS protocol, cloud authentication, and HLS live streaming via model.HLSProvider.
Package xiaomi implements Xiaomi camera support for MiBee NVR, including CS2 P2P transport, MISS protocol, cloud authentication, and HLS live streaming via model.HLSProvider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL