High-performance, resource-optimized multi-camera RTSP snapshot server with Hardware Acceleration (NVIDIA CUDA/NVDEC, Intel/AMD VA-API, Apple VideoToolbox, Intel QuickSync) and Zero-Disk In-Memory Caching for Home Assistant, go2rtc, and Standalone Docker.
- Navigate to Settings โ Add-ons โ Add-on Store โ โฎ โ Repositories in Home Assistant.
- Add the repository:
https://github.com/resonaura/snappie - Find and select Snappie in the store and click Install.
- Configure your cameras and hardware acceleration in the Configuration tab.
- Click Start!
Create a docker-compose.yml:
services:
snappie:
image: ghcr.io/resonaura/snappie:latest
container_name: snappie
restart: always
network_mode: host
volumes:
- ./config.yaml:/config/config.yaml:ro
# For Intel / AMD VA-API GPU acceleration:
# devices:
# - /dev/dri:/dev/dri
# For NVIDIA GPU, uncomment below:
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu, video]Run with:
docker compose up -ddocker run -d \
--name snappie \
--restart always \
--network host \
-v /opt/snappie/config.yaml:/config/config.yaml:ro \
ghcr.io/resonaura/snappie:latestdocker run -d \
--name snappie \
--restart always \
--network host \
--device /dev/dri:/dev/dri \
-v /opt/snappie/config.yaml:/config/config.yaml:ro \
ghcr.io/resonaura/snappie:latestdocker run -d \
--name snappie \
--restart always \
--network host \
--gpus all \
-v /opt/snappie/config.yaml:/config/config.yaml:ro \
ghcr.io/resonaura/snappie:latest- โก Hardware Acceleration (GPU):
- NVIDIA GPU (CUDA / NVDEC): Offloads H.264 / HEVC video decoding directly to NVIDIA graphics cards.
- Intel / AMD (VA-API / QSV): Uses QuickSync and VA-API render devices (
/dev/dri/renderD128). - Apple Silicon (VideoToolbox): Native hardware decoding on macOS.
- Graceful CPU Fallback: If GPU memory or decoder is busy/unsupported, automatically falls back to CPU without failing client requests.
- ๐ Zero-Disk In-Memory Pipe (RAM):
- Snapshots are streamed directly from FFmpeg stdout to Node.js
Bufferin RAM. - No disk wear, no filesystem lag, response latency
< 1ms. - Conditional HTTP caching (
304 Not ModifiedviaETagandLast-Modified).
- Snapshots are streamed directly from FFmpeg stdout to Node.js
- โฑ๏ธ Ultra-Fast RTSP Tuning:
nobuffer,low_delay, and optimizedprobesize/analyzeduration(down from 5s to milliseconds).
- ๐๏ธ Staggered Scheduling & Concurrency Control:
- Distributes camera polling smoothly across the interval to prevent CPU/GPU spikes.
- Built-in semaphore queue limits parallel FFmpeg processes (
max_concurrent).
- ๐จ Beautiful Terminal Logging:
- Real-time ANSI color-coded logs with execution durations (
[120ms]), image sizes, accelerator badges (โก [CUDA],๐ [VAAPI],โ๏ธ [CPU]), and timestamps.
- Real-time ANSI color-coded logs with execution durations (
- ๐ Rich Diagnostics & Health API:
- Real-time monitoring of RAM usage, average latencies, success/failure counts, and system status via
/health.
- Real-time monitoring of RAM usage, average latencies, success/failure counts, and system status via
# Port the HTTP server listens on
port: 1985
# How often (in seconds) to grab a new frame from each camera
interval: 10
# Hardware acceleration engine:
# auto โ auto-detect best available (cuda -> vaapi -> qsv -> videotoolbox -> cpu)
# cuda โ NVIDIA GPU (NVDEC)
# vaapi โ Intel / AMD GPU via VA-API (/dev/dri/renderD128)
# qsv โ Intel Quick Sync Video
# videotoolbox โ Apple Silicon (macOS)
# cpu โ Pure software decoding
hwaccel: auto
# JPEG image quality: 1 (highest) to 31 (lowest). Default: 2 (High)
quality: 2
# Timeout (seconds) before terminating FFmpeg capture
timeout: 15
# Max concurrent FFmpeg processes (smooths CPU / VRAM usage)
max_concurrent: 4
# Save snapshots to disk (snapshots/<slug>.jpg) in addition to memory
save_to_disk: false
# RTSP transport protocol: tcp (recommended) or udp
rtsp_transport: tcp
# List of cameras
cameras:
- slug: front-door
rtsp: rtsp://user:pass@192.168.1.10:554/stream1
- slug: backyard
rtsp: rtsp://user:pass@192.168.1.11:554/stream1
# hwaccel: cuda # (Optional: per-camera override)
- slug: garage
rtsp: rtsp://user:pass@192.168.1.12:554/stream1| Endpoint | Method | Description |
|---|---|---|
/<slug> |
GET |
Instant snapshot served directly from RAM (JPEG) |
/live/<slug> |
GET |
Forces an immediate fresh frame capture on demand |
/health |
GET |
Detailed JSON health, memory usage, accelerator status, latencies, and camera states |
{
"status": "ok",
"uptime": "1420s",
"interval": 10,
"system": {
"defaultHwaccel": "cuda",
"availableHwaccels": ["cuda", "vaapi", "vdpau"],
"configuredHwaccel": "auto",
"memory": {
"rss": "42.5 MB",
"heapUsed": "18.2 MB"
},
"concurrency": {
"active": 0,
"queued": 0,
"max": 4
}
},
"cameras": [
{
"slug": "front-door",
"source": "rtsp://user:****@192.168.1.10:554/stream1",
"ready": true,
"hwaccel": "cuda",
"lastSuccess": "2026-08-17T09:05:00.123Z",
"lastError": null,
"lastDurationMs": 142,
"avgDurationMs": 138,
"sizeBytes": 284120,
"successCount": 142,
"errorCount": 0
}
]
}git clone https://github.com/resonaura/snappie.git
cd snappie
npm install
node index.js