{"id":27648158,"url":"https://github.com/opensensor/lightnvr","last_synced_at":"2026-04-14T06:09:55.715Z","repository":{"id":281180676,"uuid":"944391405","full_name":"opensensor/lightNVR","owner":"opensensor","description":"lightweight Linux based NVR system","archived":false,"fork":false,"pushed_at":"2025-04-19T23:41:28.000Z","size":55501,"stargazers_count":16,"open_issues_count":10,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T00:29:46.927Z","etag":null,"topics":["hls","ipcamera","network-video-recorder","nvr","object-detection","rtsp","sod","tflite","webrtc"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["matteius"]}},"created_at":"2025-03-07T09:12:18.000Z","updated_at":"2025-04-19T23:41:31.000Z","dependencies_parsed_at":"2025-03-07T12:38:40.721Z","dependency_job_id":"09750f5a-ef0f-4e6b-b292-0e6ad8832404","html_url":"https://github.com/opensensor/lightNVR","commit_stats":null,"previous_names":["opensensor/lightnvr"],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2FlightNVR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2FlightNVR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2FlightNVR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensensor%2FlightNVR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensensor","download_url":"https://codeload.github.com/opensensor/lightNVR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250548071,"owners_count":21448601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hls","ipcamera","network-video-recorder","nvr","object-detection","rtsp","sod","tflite","webrtc"],"created_at":"2025-04-24T02:33:21.640Z","updated_at":"2026-04-14T06:09:55.708Z","avatar_url":"https://github.com/opensensor.png","language":"C","funding_links":["https://github.com/sponsors/matteius"],"categories":[],"sub_categories":[],"readme":"# LightNVR - Lightweight Network Video Recorder\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Docker Pulls](https://img.shields.io/docker/pulls/matteius/lightnvr)](https://hub.docker.com/r/matteius/lightnvr)\n[![Integration Tests](https://github.com/opensensor/lightNVR/actions/workflows/integration-test.yml/badge.svg)](https://github.com/opensensor/lightNVR/actions/workflows/integration-test.yml)\n[![Static Analysis](https://github.com/opensensor/lightNVR/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/opensensor/lightNVR/actions/workflows/static-analysis.yml)\n[![Sanitizer Build](https://github.com/opensensor/lightNVR/actions/workflows/sanitizer.yml/badge.svg)](https://github.com/opensensor/lightNVR/actions/workflows/sanitizer.yml)\n[![CodeQL](https://github.com/opensensor/lightNVR/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/opensensor/lightNVR/actions/workflows/codeql-analysis.yml)\n[![Container Scan](https://github.com/opensensor/lightNVR/actions/workflows/container-scan.yml/badge.svg)](https://github.com/opensensor/lightNVR/actions/workflows/container-scan.yml)\n\nLightNVR is a tiny, memory-optimized Network Video Recorder software written in C. While originally designed for resource-constrained devices like the Ingenic A1 SoC with only 256MB of RAM, it can run on any Linux system.\n\n## Overview\n\nLightNVR provides a lightweight yet powerful solution for recording and managing IP camera streams. It's designed to run efficiently on low-power, memory-constrained devices while still providing essential NVR functionality with a modern, responsive web interface.\n\n![Live Streams Interface](docs/images/live-streams.png)\n\n\u003e **✨ New Features:** Detection zones with visual polygon editor, customizable themes, enhanced light-object-detect integration, and ultra-low-latency WebRTC streaming!\n\n### Key Features\n\n#### 🎯 Smart Detection \u0026 Recording\n- **Detection Zones**: Visual polygon-based zone editor for targeted object detection - define multiple zones per camera with custom class filters and confidence thresholds\n- **light-object-detect Integration**: Seamless integration with [light-object-detect](https://github.com/opensensor/light-object-detect) API for ONNX/TFLite-based object detection with zone filtering\n- **ONVIF Motion Recording**: Automated recording triggered by ONVIF motion detection events\n- **Object Detection**: Optional SOD integration for motion and object detection (supports both RealNet and CNN models)\n\n#### 📺 Streaming \u0026 Playback\n- **WebRTC Streaming**: Ultra-low latency live viewing with automatic NAT/firewall traversal via STUN/ICE\n- **HLS Streaming**: Adaptive bitrate streaming for broad device compatibility\n- **Dual Streaming Modes**: Toggle between WebRTC (low latency) and HLS (compatibility) on-the-fly\n- **Detection Overlays**: Real-time bounding boxes and labels on live streams\n\n#### 🎨 Modern User Interface\n- **Customizable Themes**: 7 beautiful color themes (Ocean Blue, Forest Green, Royal Purple, Sunset Rose, Golden Amber, Cool Slate, Default)\n- **Dark/Light Mode**: Automatic system preference detection with manual override\n- **Color Intensity Control**: Fine-tune theme brightness and contrast to your preference\n- **Responsive Design**: Built with Tailwind CSS and Preact for smooth, modern UX\n\n#### 🔧 Core Capabilities\n- **Cross-Platform**: Runs on any Linux system, from embedded devices to full servers\n- **Memory Efficient**: Optimized to run on devices with low memory (SBCs and certain SoCs)\n- **Stream Support**: Handle multiple video streams (with memory-optimized buffering)\n- **Protocol Support**: RTSP and ONVIF (basic profile)\n- **Codec Support**: H.264 (primary), H.265 (if resources permit)\n- **Resolution Support**: Configurable resolution per stream\n- **Frame Rate Control**: Configurable from 1-15 FPS per stream to reduce resource usage\n- **Standard Formats**: Records in standard MP4/MKV containers with proper indexing\n- **Storage Management**: Automatic retention policies and disk space management\n- **Reliability**: Automatic recovery after power loss or system failure\n- **Resource Optimization**: Stream prioritization to manage limited RAM\n\n## 🧱 Architecture Overview\n\nLightNVR is built as a small, C-based core service with a modern Preact/Tailwind web UI and go2rtc as the streaming backbone. Object detection is handled by an external detection API (typically `light-object-detect`).\n\n| ![Overall Architecture](docs/images/arch-overall.svg) |\n|:------------------------------------------------------:|\n| High-level architecture: web UI, API, core, go2rtc, and detection service |\n\nAt a high level:\n\n- **Web UI \u0026 API layer** – Preact single-page UI served by the embedded HTTP server, plus JSON REST endpoints for streams, recordings, detection, and settings.\n- **Core service** – Stream manager, recorder, retention logic, configuration store, and event system implemented in C for low memory use.\n- **Streaming layer (go2rtc)** – Handles RTSP ingest and provides WebRTC/HLS endpoints. LightNVR configures go2rtc and talks to it directly for `/api/webrtc` and snapshot (`/api/frame.jpeg`) calls.\n- **Detection service** – External HTTP API (e.g. `light-object-detect`) that receives frames from go2rtc and returns object detections which LightNVR stores and overlays.\n- **Storage \u0026 system resources** – MP4/HLS writers, file system, DB, and lightweight threading model tuned for small devices.\n\nFor more detail, the repository also includes:\n\n- `docs/images/arch-state.svg` – high-level state machine for streams/recordings\n- `docs/images/arch-thread.svg` – thread and worker layout for the core service\n\n## 🆕 Recent Highlights\n\n### libuv HTTP Backend (v0.20.0)\nMigrated from Mongoose to libuv + llhttp for the HTTP server, improving performance and reliability.\n\n### TOTP Two-Factor Authentication (v0.20.0)\nOptional TOTP-based MFA for securing the web interface with authenticator apps.\n\n### MQTT Event Streaming (v0.19.0)\nPublish detection events to an MQTT broker for integration with Home Assistant and other automation platforms.\n\n### Demo Mode (v0.21.0)\nBuilt-in demo mode with virtual test streams for development and evaluation without real cameras.\n\n### Auto-Generated Credentials (v0.21.7)\nAdmin password is now auto-generated on first run for improved out-of-box security.\n\n## 💡 Use Cases\n\nLightNVR is perfect for:\n\n- **🏠 Home Security**: Monitor your property with smart detection zones - get alerts only for activity in specific areas\n- **🏢 Small Business**: Cost-effective surveillance with professional features like zone-based detection and retention policies\n- **🔬 IoT \u0026 Edge Computing**: Run on resource-constrained devices (Raspberry Pi, SBCs) with minimal memory footprint\n- **🎓 Education \u0026 Research**: Learn about video processing, object detection, and real-time streaming with clean, well-documented code\n- **🛠️ DIY Projects**: Build custom surveillance solutions with flexible API integration and modern web interface\n- **📦 Warehouse \u0026 Logistics**: Monitor specific zones (loading docks, storage areas) with class-specific detection (person, forklift, etc.)\n\n## 🆚 Why LightNVR?\n\n| Feature | LightNVR | Traditional NVR | Cloud Solutions |\n|---------|----------|-----------------|-----------------|\n| **Memory Footprint** | 256MB minimum | 2GB+ typical | N/A (cloud-based) |\n| **Detection Zones** | ✅ Visual polygon editor | ❌ Usually grid-based or none | ✅ Varies by provider |\n| **Custom Themes** | ✅ 7 themes + intensity control | ❌ Fixed UI | ⚠️ Limited options |\n| **WebRTC Streaming** | ✅ Sub-second latency | ⚠️ Often RTSP only | ✅ Usually supported |\n| **Object Detection** | ✅ ONNX/TFLite/SOD support | ⚠️ Proprietary or limited | ✅ Usually included |\n| **Privacy** | ✅ 100% local, no cloud | ✅ Local | ❌ Data sent to cloud |\n| **Cost** | ✅ Free \u0026 open-source | 💰 $200-2000+ | 💰 $10-50/month per camera |\n| **Customization** | ✅ Full source code access | ❌ Closed source | ❌ Limited to API |\n| **Resource Usage** | ✅ Optimized for SBCs | ⚠️ Requires dedicated hardware | N/A |\n| **API Integration** | ✅ RESTful API + WebSocket | ⚠️ Varies | ✅ Usually available |\n\n## System Requirements\n\n- **Processor**: Any Linux-compatible processor (ARM, x86, MIPS, etc.)\n- **Memory**: 256MB RAM minimum (more recommended for multiple streams)\n- **Storage**: Any storage device accessible by the OS\n- **Network**: Ethernet or WiFi connection\n- **OS**: Linux with kernel 4.4 or newer\n\n## 🌟 Feature Highlights\n\n### Detection Zones - Precision Object Detection\n\nDefine custom detection zones with a visual polygon editor. Perfect for monitoring specific areas like doorways, parking spots, or restricted zones while ignoring irrelevant motion.\n\n| ![Detection Zone Editor](docs/images/zone-editor-demo.png) |\n|:----------------------------------------------------------:|\n| Interactive zone editor with driveway detection zone drawn |\n\n| ![Detection Zones Configuration](docs/images/stream-config-zones.png) |\n|:---------------------------------------------------------------------:|\n| Detection Zones section in stream configuration                       |\n\n**Key capabilities:**\n- Draw unlimited polygons per camera stream\n- Per-zone class filtering (e.g., only detect \"person\" in Zone A, \"car\" in Zone B)\n- Adjustable confidence thresholds per zone\n- Color-coded zones for easy identification\n- Enable/disable zones without deleting configuration\n\n### Theme Customization - Your Style, Your Way\n\nChoose from 7 professionally designed color themes and fine-tune the intensity to match your environment and preferences.\n\n| ![Theme Selector (Light)](docs/images/theme-selector.png) | ![Theme Selector (Dark)](docs/images/theme-selector-dark.png) |\n|:--------------------------------------------------------:|:-----------------------------------------------------------:|\n| Theme selector in light mode                             | Theme selector in dark mode                                 |\n\n| ![Ocean Blue Theme](docs/images/theme-blue.png) | ![Emerald Theme](docs/images/theme-emerald.png) | ![Royal Purple Theme](docs/images/theme-purple.png) | ![Sunset Rose Theme](docs/images/theme-rose.png) |\n|:-----------------------------------------------:|:------------------------------------------------:|:-------------------------------------------------:|:------------------------------------------------:|\n| Ocean Blue                                      | Forest/Emerald Green                            | Royal Purple                                     | Sunset Rose                                      |\n\n**Available themes:**\n- 🎨 Default (Neutral Gray)\n- 🌊 Ocean Blue\n- 🌲 Forest Green\n- 👑 Royal Purple\n- 🌹 Sunset Rose\n- ⚡ Golden Amber\n- 🗿 Cool Slate\n\nEach theme supports both light and dark modes with adjustable color intensity (0-100%).\n\n### WebRTC Live Streaming - Ultra-Low Latency\n\nExperience real-time camera feeds with sub-second latency using WebRTC technology. Automatic NAT traversal ensures it works even behind firewalls.\n\n| ![WebRTC Live Streams](docs/images/live-streams.png) | ![HLS Live Streams](docs/images/live-streams-hls.png) |\n|:---------------------------------------------------:|:----------------------------------------------------:|\n| WebRTC live view with ultra-low latency             | HLS-based live view for compatibility                |\n\n| ![Detection Overlay](docs/images/detection-overlay.png) |\n|:-------------------------------------------------------:|\n| Real-time detection overlays with bounding boxes        |\n\n**Features:**\n- Sub-second latency for real-time monitoring\n- Automatic STUN/ICE configuration for NAT traversal\n- Seamless fallback to HLS for compatibility\n- Real-time detection overlay with bounding boxes\n- Grid layout supporting multiple simultaneous streams\n\n### light-object-detect Integration\n\nPowerful object detection using modern ONNX and TFLite models with zone-aware filtering.\n\n**Integration features:**\n- Per-stream API endpoint configuration\n- Configurable detection backends (ONNX, TFLite, OpenCV)\n- Zone-based filtering to reduce false positives\n- Track ID and zone ID support for advanced analytics\n- Direct go2rtc frame extraction (no FFmpeg overhead)\n\n## Screenshots\n\n| ![Stream Management](docs/images/stream-management.png) | ![Recording Management](docs/images/recording-management.png) |\n|:-------------------------------------------------------:|:------------------------------------------------------------:|\n| Stream Management                                       | Recording Management                                          |\n\n| ![Recording Playback](docs/images/recording-playback.png) |\n|:---------------------------------------------------------:|\n| Recording Playback with video player modal                |\n\n| ![Settings Management](docs/images/settings-management.png) | ![System Information](docs/images/system-info.png) |\n|:----------------------------------------------------------:|:--------------------------------------------:|\n| Settings Management                                         | System Information                            |\n\n## Quick Start\n\n### Installation\n\n1. **Build from source**:\n   ```bash\n   # Clone the repository\n   git clone https://github.com/opensensor/lightnvr.git\n   cd lightnvr\n\n   # Initialize submodules (required for go2rtc)\n   git submodule update --init --recursive\n\n   # Build web assets (requires Node.js/npm)\n   cd web\n   npm install\n   npm run build\n   cd ..\n\n   # Build the software\n   ./scripts/build.sh --release\n\n   # Install (requires root)\n   sudo ./scripts/install.sh\n   ```\n\n2. **Configure**:\n   ```bash\n   # Edit the configuration file\n   sudo nano /etc/lightnvr/lightnvr.ini\n   ```\n\n3. **Start the service**:\n   ```bash\n   sudo systemctl start lightnvr\n   sudo systemctl enable lightnvr\n   ```\n\n4. **Access the web interface**:\n   Open a web browser and navigate to `http://your-device-ip:8080`\n\n   Default username: `admin` (password is auto-generated on first run — check the service logs with `journalctl -u lightnvr`)\n\n5. **(Optional) Set up object detection**:\n\n   For advanced object detection with zone filtering, integrate with [light-object-detect](https://github.com/opensensor/light-object-detect):\n\n   ```bash\n   # Install light-object-detect (requires Python 3.8+)\n   pip install light-object-detect\n\n   # Start the detection API server (default port 9001)\n   light-object-detect --host 0.0.0.0 --port 9001\n   ```\n\n   Then configure detection in LightNVR:\n   - Navigate to **Streams** → Select a stream → **Configure**\n   - Enable **Detection Based Recording**\n   - Set **API Detection URL** to `http://localhost:9001/api/v1/detect`\n   - Choose detection backend: `onnx` (recommended), `tflite`, or `opencv`\n   - Configure **Detection Zones** to define areas of interest\n\n   See [Zone Configuration Guide](docs/ZONE_CONFIGURATION.md) for detailed zone setup instructions.\n\n## Troubleshooting\n\n### Blank Web Page\n\nIf you see a blank page after installation:\n\n**For Docker users:**\n```bash\n# Check if you mounted /var/lib/lightnvr directly (this overwrites web assets)\ndocker inspect lightnvr | grep -A 5 Mounts\n\n# Fix: Update docker-compose.yml to mount /var/lib/lightnvr/data instead\n# Then recreate the container:\ndocker compose down\ndocker compose up -d\n```\n\n**For native installation:**\n```bash\n# Install/reinstall web assets (requires source directory)\nsudo ./scripts/install_web_assets.sh\n\n# Restart service\nsudo systemctl restart lightnvr\n```\n\nSee [Web Interface Troubleshooting Guide](docs/TROUBLESHOOTING_WEB_INTERFACE.md) for detailed instructions.\n\n### WebRTC Streams Not Connecting\n\nIf live streams fail with ICE connection errors, set your machine's local IP as `external_ip` in `lightnvr.ini`:\n\n```ini\n[go2rtc]\nexternal_ip = 192.168.1.100  ; Replace with your machine's local IP\n```\n\nTo find your local IP:\n```bash\n# Linux\nhostname -I | awk '{print $1}'\n\n# macOS\nipconfig getifaddr en0    # or en1 for Wi-Fi\n```\n\nThen restart LightNVR (or `docker compose restart` for Docker). See the [Docker Deployment Guide](docs/DOCKER.md#webrtc-not-working) for more WebRTC troubleshooting.\n\n### General Troubleshooting\n\nFor other issues, see the [General Troubleshooting Guide](docs/TROUBLESHOOTING.md).\n\n### Docker Installation\n\n#### Quick Start with Docker Compose (Recommended)\n\n```bash\n# Clone the repository\ngit clone https://github.com/opensensor/lightNVR.git\ncd lightNVR\n\n# Initialize submodules (required for go2rtc build)\ngit submodule update --init --recursive\n\n# Start the container (first run will build the image)\ndocker compose up -d\n\n# View logs\ndocker compose logs -f\n```\n\nThe container will automatically:\n- Create default configuration files in `./config`\n- Initialize the database in `./data/database`\n- Set up web assets with working defaults\n- Configure go2rtc with WebRTC/STUN support\n\nAccess the web UI at `http://localhost:8080` (default username: `admin`, password is auto-generated on first run — check logs)\n\n#### Using Docker Run\n\nImages are published to both Docker Hub and GHCR on every tagged release:\n\n```bash\n# Docker Hub (recommended)\ndocker pull matteius/lightnvr:latest\n\n# GitHub Container Registry\ndocker pull ghcr.io/opensensor/lightnvr:latest\n```\n\n```bash\ndocker run -d \\\n  --name lightnvr \\\n  --restart unless-stopped \\\n  -p 8080:8080 \\\n  -p 8554:8554 \\\n  -p 8555:8555 \\\n  -p 8555:8555/udp \\\n  -p 1984:1984 \\\n  -v ./config:/etc/lightnvr \\\n  -v ./data:/var/lib/lightnvr/data \\\n  -e TZ=America/New_York \\\n  matteius/lightnvr:latest\n```\n\n#### Volume Mounts Explained\n\nThe container uses two volume mounts for persistence:\n\n- **`/etc/lightnvr`** - Configuration files\n  - `lightnvr.ini` - Main configuration\n  - `go2rtc/go2rtc.yaml` - go2rtc WebRTC/RTSP configuration\n\n- **`/var/lib/lightnvr/data`** - Persistent data\n  - `database/` - SQLite database\n  - `recordings/` - Video recordings (HLS and MP4)\n  - `models/` - Object detection models\n\n**⚠️ Important:** Do NOT mount `/var/lib/lightnvr` directly as it will overwrite web assets!\n\n#### Exposed Ports\n\n- **8080** - Web UI (HTTP)\n- **8554** - RTSP streaming\n- **8555** - WebRTC (TCP/UDP)\n- **1984** - go2rtc API\n\n#### Environment Variables\n\n- `TZ` - Timezone (default: UTC)\n- `GO2RTC_CONFIG_PERSIST` - Persist go2rtc config across restarts (default: true)\n- `LIGHTNVR_AUTO_INIT` - Auto-initialize config files (default: true)\n\n#### First Run\n\nOn first run, the container will:\n1. Create default configuration files in `/etc/lightnvr`\n2. Copy web assets to `/var/lib/lightnvr/web`\n3. Initialize the database in `/var/lib/lightnvr/data/database`\n4. Set up go2rtc with WebRTC/STUN configuration\n\nThe go2rtc configuration includes STUN servers for WebRTC NAT traversal, so WebRTC streaming should work out-of-the-box in most network environments.\n\n#### Customizing Configuration\n\nAfter first run, you can customize the configuration:\n\n```bash\n# Edit main configuration\nnano ./config/lightnvr.ini\n\n# Edit go2rtc configuration (WebRTC, RTSP settings)\nnano ./config/go2rtc/go2rtc.yaml\n\n# Restart to apply changes\ndocker compose restart\n```\n\nThe configuration files will persist across container restarts and updates.\n\n## Documentation\n\n### Getting Started\n- [Installation Guide](docs/INSTALLATION.md)\n- [Build Instructions](docs/BUILD.md)\n- [Configuration Guide](docs/CONFIGURATION.md)\n- [Docker Deployment](docs/DOCKER.md)\n- [Troubleshooting Guide](docs/TROUBLESHOOTING.md)\n\n### Features \u0026 Integration\n- **[Zone Configuration](docs/ZONE_CONFIGURATION.md)** - Visual polygon-based detection zones\n- [API Documentation](docs/API.md)\n- [go2rtc Integration](docs/GO2RTC_INTEGRATION.md)\n- [MQTT Integration](docs/MQTT_INTEGRATION.md)\n- [ONVIF Detection](docs/ONVIF_DETECTION.md)\n- [ONVIF Motion Recording](docs/ONVIF_MOTION_RECORDING.md)\n- [Motion Buffer System](docs/MOTION_BUFFER.md)\n- [SOD Integration](docs/SOD_INTEGRATION.md)\n\n### Architecture \u0026 Development\n- [Architecture Overview](docs/ARCHITECTURE.md)\n- [Frontend Architecture](docs/FRONTEND.md)\n- [State Management](docs/STATE_MANAGEMENT.md)\n- [Release Process](docs/RELEASE_PROCESS.md)\n\n## Project Structure\n\n- `src/` - C source code\n  - `core/` - Core system components\n  - `video/` - Video processing and stream handling\n  - `storage/` - Storage management\n  - `web/` - HTTP server and API handlers\n  - `database/` - Database operations and migrations\n  - `utils/` - Utility functions\n- `include/` - Header files\n- `web/` - Web frontend (Vite + Preact + Tailwind CSS)\n  - `js/` - Preact components and pages\n  - `css/` - Tailwind CSS stylesheets\n  - `*.html` - HTML entry points\n- `db/migrations/` - SQLite schema migrations\n- `scripts/` - Build, install, and utility scripts\n- `config/` - Configuration templates\n- `docs/` - Documentation\n- `tests/` - Integration and Playwright tests\n\n## Memory Optimization\n\nLightNVR is specifically designed for memory-constrained environments:\n\n- **Efficient Buffering**: Minimizes memory usage while maintaining reliable recording\n- **Stream Prioritization**: Allocates resources based on stream importance\n- **Staggered Initialization**: Prevents memory spikes during startup\n- **Swap Support**: Optional swap file configuration for additional virtual memory\n- **Resource Governors**: Prevents system crashes due to memory exhaustion\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n**Note:** By contributing to this project, you agree to sign our [Contributor License Agreement (CLA)](CLA.md). The CLA bot will guide you through the process on your first pull request.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n### Commercial Licensing\n\nFor organizations that need to integrate lightNVR into proprietary products or cannot comply with GPL requirements, **commercial licenses** are available from OpenSensor Engineering. See [Commercial Licensing \u0026 Professional Support](docs/COMMERCIAL.md) for details.\n\n## Star History\n\n## Star History\n[![Star History Chart](https://api.star-history.com/image?repos=opensensor/lightNVR\u0026type=date\u0026legend=top-left)](https://www.star-history.com/?repos=opensensor%2FlightNVR\u0026type=date\u0026legend=top-left)\n\n## Acknowledgments\n\nLightNVR is built on the shoulders of giants. Special thanks to:\n\n### Core Technologies\n- **[FFmpeg](https://ffmpeg.org/)** - Video processing and codec support\n- **[go2rtc](https://github.com/AlexxIT/go2rtc)** - WebRTC and RTSP streaming engine\n- **[SQLite](https://www.sqlite.org/)** - Efficient embedded database\n- **[libuv](https://github.com/libuv/libuv)** - Cross-platform async I/O library\n- **[llhttp](https://github.com/nodejs/llhttp)** - HTTP parser\n- **[cJSON](https://github.com/DaveGamble/cJSON)** - Lightweight JSON parser\n\n### Frontend Stack\n- **[Tailwind CSS](https://tailwindcss.com/)** - Modern utility-first CSS framework\n- **[Preact](https://preactjs.com/)** - Fast 3kB alternative to React\n- **[HLS.js](https://github.com/video-dev/hls.js/)** - JavaScript HLS client\n\n### Detection \u0026 AI\n- **[light-object-detect](https://github.com/opensensor/light-object-detect)** - ONNX/TFLite object detection API\n- **[SOD](https://github.com/symisc/sod)** - Embedded computer vision library\n\n### Community\n- All contributors who have helped improve LightNVR\n- The open-source community for inspiration and support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Flightnvr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensensor%2Flightnvr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensensor%2Flightnvr/lists"}