Representative Architecture

SmartCam

Edge pipeline overview

Architecture Diagram

IoT

SmartCam

Edge-computing surveillance system with MediaMTX streaming, WebRTC live view, local recording pipeline, and mobile monitoring application.

IoTComputer VisionWebRTCEdge Computing

Overview

SmartCam is a comprehensive edge-computing camera system that processes video locally, streams via WebRTC, records to local storage, and provides mobile monitoring — eliminating cloud dependency and subscription costs.

Problem

Cloud-based surveillance systems create privacy risks, introduce latency, and incur ongoing subscription costs. Organizations and homeowners need local-first alternatives with professional capabilities.

Hardware

Raspberry Pi 4 (4GB) with official camera module. PoE HAT for single-cable deployment. Optional IR module for low-light environments. Weatherproof enclosure for outdoor deployment.

MediaMTX

MediaMTX serves as the streaming backbone — ingesting RTSP from camera modules, transcoding to H.264, and distributing via WebRTC and HLS. Handles multiple concurrent viewers with minimal CPU overhead.

WebRTC

WebRTC provides sub-500ms live view in the web dashboard and mobile app. STUN/TURN configuration for NAT traversal. Adaptive bitrate for varying network conditions.

Storage Pipeline

Segmented MP4 recording with configurable retention (7/14/30 days). Motion-triggered event clips stored separately. Automatic cleanup based on storage thresholds. RAID-1 NAS for recording redundancy.

Recording Architecture

Continuous recording to local NAS via NFS mount. Motion events trigger clip extraction and notification. Thumbnail generation for event browser. Export functionality for incident review.

Mobile App

React Native application for iOS and Android. Live view via WebRTC. Push notifications for motion events. Event timeline with thumbnail preview. Remote arm/disarm functionality.

Monitoring

Prometheus metrics for stream health, storage usage, and CPU temperature. Grafana dashboard for multi-camera overview. Alertmanager integration for offline camera detection.

Future Roadmap

ONVIF camera support for third-party IP cameras. AI object classification (person, vehicle, animal). Face recognition for access control integration. Multi-site federation for distributed deployments.

Architecture Visuals

Representative architecture diagrams. Actual facility photographs and confidential diagrams are not published.

Representative Architecture

SmartCam Architecture

Edge pipeline overview

Architecture Diagram

Representative Architecture

Live View Dashboard

WebRTC multi-camera view

Dashboard

Representative Architecture

Mobile App

iOS/Android monitoring

Mobile App

Representative Architecture

Streaming Pipeline

MediaMTX data flow

Network Topology

Lessons Learned

  • MediaMTX provides production-grade streaming without the complexity of custom RTSP servers
  • WebRTC is essential for low-latency live view but requires careful NAT traversal planning
  • Local storage retention policies must be designed before deployment, not after

Tech Stack

Raspberry PiMediaMTXWebRTCPythonOpenCVMQTTDocker