Skip to content

Instantly share code, notes, and snippets.

@rossant
Last active March 20, 2026 22:08
Show Gist options
  • Select an option

  • Save rossant/e977ffd4bf7d3ff9e0197d8817d9b6f6 to your computer and use it in GitHub Desktop.

Select an option

Save rossant/e977ffd4bf7d3ff9e0197d8817d9b6f6 to your computer and use it in GitHub Desktop.
Local Continuous Recording “Black Box” System

Local Continuous Recording “Black Box” System

1. Problem Statement

There is currently no simple, affordable, and reliable system that allows continuous, long-term indoor video recording (6–12 months) with the following properties:

  • Full 24/7 recording without gaps
  • Local-only operation (no cloud, no external connectivity)
  • User-controlled storage
  • Simple deployment (plug-and-play)
  • Low cost
  • Basic integrity guarantees (for medico-legal use)

Existing solutions typically fail on one or more of these requirements:

  • Cloud dependence (privacy issues)
  • Limited storage (SD cards, short retention)
  • Closed ecosystems (camera lock-in)
  • Lack of data integrity guarantees
  • Poor long-term reliability or configurability

The core challenge is not capturing video, but storing continuous streams reliably and affordably over long durations, while maintaining privacy and trustworthiness.


2. Key Constraints

The system must satisfy:

Functional

  • Continuous video recording (no motion-triggered gaps)
  • Audio support
  • Segmentation into fixed-duration files (e.g. 1h or 4h)
  • Multi-camera support (2–3 cameras max)

Non-functional

  • No cloud or external network dependency
  • Long retention (months)
  • Silent operation (indoor use)
  • Low cost (<100€ for the device, excluding camera and storage)
  • Minimal configuration

Reliability

  • Resilience to power loss
  • Disk write robustness
  • System restart recovery
  • Logging of all events

Medico-legal (lightweight)

  • Timestamped recordings
  • Hash per segment
  • Hash chaining across segments
  • Append-only logs

3. Why Existing Products Are Not Suitable

Consumer NVR Systems

Examples: Reolink, Hikvision, Dahua

  • Pros:

    • Continuous recording
    • Local storage
    • Relatively low cost
  • Limitations:

    • Often tied to specific camera ecosystems
    • Limited configurability (bitrate, FPS, pipeline control)
    • No cryptographic integrity guarantees
    • Poor export and verification workflows

Ecosystem-based Systems

Example: Ubiquiti UniFi Protect

  • Pros:

    • High reliability
    • Good UX
    • Local-first
  • Limitations:

    • Closed ecosystem (camera lock-in)
    • Hardware lock-in (NVR required)
    • No BYOD flexibility
    • No integrity model

Open-source Solutions

Examples: Frigate, Shinobi, ZoneMinder

  • Pros:

    • Flexible
    • Camera-agnostic
    • Local storage
  • Limitations:

    • Not plug-and-play
    • Complex setup
    • No integrated hardware solution
    • Weak or absent integrity model

Summary

No existing solution combines:

  • Simplicity (plug-and-play)
  • Openness (camera/storage flexibility)
  • Privacy (no cloud)
  • Long retention
  • Integrity guarantees

4. Proposed Solution

Core Idea

A local recording appliance (“black box”) that:

  • Records continuously from one or more cameras
  • Stores data locally for months
  • Does not depend on external services
  • Provides minimal integrity guarantees

5. BYOD Principle (Bring Your Own Device)

To reduce cost and maximize flexibility:

User provides:

  • Camera (IP camera with RTSP)
  • Storage (2.5" SATA HDD/SSD)

Device provides:

  • Recording engine
  • Storage management
  • Integrity layer
  • Local access interface

Why BYOD matters

  • Avoids bundling expensive components
  • Allows user choice (camera quality, disk size)
  • Simplifies product design
  • Keeps cost <100€

6. System Architecture

Data Flow


IP Camera (RTSP)
↓
Stream ingestion (no re-encoding)
↓
Segmentation (1h / 4h files)
↓
Disk write (continuous)
↓
Hash + chain + log


Key Design Choices

No Re-encoding

  • Use camera’s native H.264/H.265 stream
  • Reduces CPU usage
  • Improves reliability

Low Bitrate Strategy

  • Configure camera:
    • 5–10 FPS
    • H.265
    • ~0.5–1 Mbit/s
  • Enables 6–12 months storage

7. Hardware Overview

Target Device (Bill of Materials <100€)

Core Compute

  • Raspberry Pi 4 (4GB) or CM4 equivalent

Storage

  • Internal 2.5" SATA bay
  • SATA via:
    • USB bridge (prototype)
    • PCIe (production)

Networking

  • Gigabit Ethernet (mandatory)
  • Wi-Fi optional or disabled

Additional Components

  • RTC (battery-backed clock)
  • Power management (12V input → 5V regulation)
  • Optional supercapacitor (graceful shutdown)
  • Watchdog
  • 2–3 status LEDs

Physical Design

  • Small, fanless enclosure (~12×12×4 cm)
  • Silent operation
  • Internal disk bay
  • Minimal external interface:
    • Ethernet
    • Power
    • Optional service USB

8. Software Architecture

Core Components

Stream Ingestion

  • RTSP client (e.g. FFmpeg / GStreamer)
  • Handles video + audio

Segmenter

  • Fixed duration files (e.g. 1 hour)
  • Continuous rolling write

Storage Manager

  • Disk space tracking
  • Circular buffer (overwrite oldest data)

Integrity Layer

For each segment:

  • SHA-256 hash
  • Chain with previous segment

Example:

{
  "file": "video_2026-03-20_10.mp4",
  "hash": "...",
  "prev_hash": "...",
  "start": "...",
  "end": "..."
}

Logging System

Append-only log:

  • system boot
  • camera connection
  • segment creation
  • disk errors
  • shutdown

9. Reliability Strategy

Power Loss Handling

  • Short segments (≤1h)
  • Regular disk flush
  • Optional supercap for clean shutdown

Disk Safety

  • ext4 filesystem
  • SMART monitoring
  • write error detection

System Recovery

  • auto-restart on boot
  • resume recording automatically

10. Privacy Model

  • No cloud services
  • No external API calls
  • No telemetry
  • No automatic updates

Network Modes

  1. Isolated mode (recommended)

    • No gateway
    • Local-only network
  2. Home network mode

    • LAN access only
    • outbound blocked via firewall

11. Expected Capabilities

With proper configuration:

Cameras Duration Disk size
1 12 months ~4–8 TB
2 6–12 months ~8–16 TB

12. Limitations

  • Not certified for legal use (but structurally robust)
  • Limited to few cameras (2–3 typical)
  • No redundancy (single disk)
  • Requires compatible RTSP cameras
  • No advanced analytics (AI, detection)

13. Conclusion

This system fills a clear gap between:

  • consumer surveillance products (closed, cloud-based)
  • professional systems (expensive, complex)

By combining:

  • local-only operation
  • BYOD flexibility
  • continuous recording
  • basic integrity guarantees

it enables a simple, affordable, and privacy-preserving long-term recording solution suitable for sensitive environments.

Local-First Home Recorder — Marketing & Positioning Document

1. Overview

This product is a local-first home recording system that continuously captures and stores video inside the home, without relying on cloud services, subscriptions, or external infrastructure.

It introduces a new category:

A private, continuous memory system for your home — with optional local intelligence.

The system combines:

  • Continuous recording (not event-based clips)
  • Long-term local storage (months)
  • Full user control over data
  • Optional AI analysis running locally
  • No subscription, no cloud dependency

2. The Problem

2.1 Fragmented and Incomplete Home Video Today

Current solutions fall into three categories:

1. Cloud Cameras (Ring, Nest, etc.)

  • Record short clips only
  • Require subscriptions
  • Store data externally
  • Limited retention unless paid
  • Privacy concerns

2. Traditional NVR Systems

  • Continuous recording
  • Complex setup
  • Poor user experience
  • No intelligent indexing
  • Not designed for consumers

3. Smart Cameras with AI

  • Focus on alerts, not history
  • Cloud-dependent
  • Limited transparency
  • Black-box processing

2.2 Key Gaps

Users today lack:

  • A complete, continuous record of what happens at home
  • A simple way to revisit any moment
  • A private alternative to cloud surveillance
  • A way to search and understand their own video history

3. The Insight

People don’t want more surveillance — they want clarity, memory, and control.

Key insights:

  • Important moments are often unexpected
  • Event-based recording misses context
  • Privacy concerns are growing rapidly
  • Users want ownership of their data
  • AI is useful — but only if it is local and optional

4. The Solution

Core Product

A local recording device (“Recorder”) that:

  • Records continuously from one or more cameras
  • Stores everything locally for months
  • Works entirely offline by default
  • Requires no subscription
  • Is simple to install and use

Optional Intelligence Layer

Users can optionally add:

  • A local AI module (software or hardware)
  • Running on:
    • their own computer
    • a dedicated AI device

This layer provides:

  • Highlights
  • Search
  • Summaries
  • Event detection

All processed locally, without sending video outside the home.


5. Product Principles

1. Local-First

  • No cloud required
  • No external dependency
  • Works fully offline

2. Continuous by Default

  • Records everything, not just events
  • Enables full context and rewind

3. User-Owned Data

  • Data stays in the home
  • No vendor lock-in
  • No hidden access

4. Open & Transparent

  • Open architecture
  • Inspectable behavior
  • Clear data flows

5. No Subscription

  • One-time purchase
  • No recurring fees
  • Long-term ownership

6. Key Value Propositions

6.1 “Never Miss a Moment”

  • Continuous recording ensures nothing is lost
  • Users can rewind to any point in time

6.2 “Your Home, Fully Private”

  • No cloud storage
  • No external access
  • No data monetization

6.3 “Understand What Happened”

  • Replay any situation with full context
  • Optional AI highlights key events

6.4 “Find What Matters”

  • Search and navigate large video histories
  • AI-assisted indexing (optional)

6.5 “Own Your System”

  • No subscriptions
  • No lock-in
  • No forced updates or services

7. Differentiation

Feature Cloud Cameras NVR This Product
Continuous recording
Local-only operation
Simple UX
Long-term storage
AI indexing ✔ (cloud) ✔ (local optional)
Privacy-first ⚠️
Subscription-free
Open architecture

8. Target Market

8.1 Primary: Tech Early Adopters

Profile

  • Privacy-conscious
  • Familiar with self-hosting / local systems
  • Skeptical of cloud platforms
  • Comfortable with hardware/software setup

Motivation

  • Control over data
  • Avoid subscriptions
  • Experiment with new tech
  • Build personal infrastructure

8.2 Secondary: Privacy-Focused Consumers

  • Concerned about surveillance capitalism
  • Want simple alternatives to cloud cameras
  • Value ownership and transparency

8.3 Additional Segments

Pet Owners

  • Understand pet behavior
  • Capture unexpected moments

Home Automation Users

  • Integrate with local systems (e.g. Home Assistant)

Creators / Makers

  • Continuous capture for later use

9. Market Entry Strategy

Phase 1 — Early Adopters

  • Tech communities (HN, Reddit, forums)
  • Privacy / self-hosting communities
  • Maker / DIY audiences

Message:

Local, private, continuous recording — no cloud, no subscription


Phase 2 — Broader Consumers

  • Simplicity
  • Peace of mind
  • Memory and replay

Phase 3 — Expanded Use Cases

  • Multi-room setups
  • Small businesses
  • Shared environments

10. Product Line

Recorder (Core Product)

  • One-time purchase
  • No subscription
  • Works out of the box

AI Companion (Software)

  • Runs on user’s computer
  • Adds search, highlights, summaries
  • Fully local

AI Station (Optional Hardware)

  • Dedicated local AI processing
  • For advanced users
  • Scalable and more powerful

11. Pricing Strategy

Core Principles

  • No subscription
  • Transparent pricing
  • Long-term ownership

Example

  • Recorder: €99–149
  • AI Station: €150–300 (optional)
  • Software: free or one-time upgrade

12. Messaging

Core Message

A private home recorder that captures everything, stores it locally for months, and helps you find what matters — without ever sending your video to the cloud.


Supporting Messages

  • “Capture everything. Keep what matters.”
  • “Your home, fully private.”
  • “Rewind your day.”
  • “No cloud. No subscription. No compromise.”

13. Competitive Advantage

The product sits at the intersection of:

  • Continuous recording (NVR)
  • Consumer usability (smart cameras)
  • Privacy-first infrastructure
  • Local AI

No existing product combines all four.


14. Long-Term Vision

This system can evolve into:

A local operating system for home video memory

Future directions:

  • Multi-device ecosystem
  • Advanced local AI
  • Search across months/years of life data
  • Integration with home automation
  • Open plugin ecosystem

15. Conclusion

This product addresses a clear gap:

  • People want complete visibility
  • Without sacrificing privacy
  • Without paying subscriptions
  • And without relying on cloud infrastructure

By combining:

  • continuous recording
  • local storage
  • optional local AI
  • and full user control

it defines a new category:

Private, continuous, intelligent home recording — owned entirely by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment