How hashdashx/nvr-viewer-built-with-qt5-ffmpeg-vaapi-optimized-for-debian-12 works
NVR GUI VAAPI is a Qt5 viewer that loads camera definitions and presents up to four live feeds in a fullscreen grid. Its main workflow branches by source: HTTP(S) snapshots are fetched periodically, while other URLs are decoded through FFmpeg, with VAAPI hardware support, before frames reach the UI. Shell scripts and systemd units provide headless launch and host/service automation. The sampled C++ excerpt is incomplete, so decoder setup details and exact service-to-service wiring are not expanded.
Main entry points: main.cpp Qt Application · start-nvr-test.sh Headless Launcher · xorg.service Xorg Service · config.json Camera Config
Components 19
Viewer
- Camera Config
nvr-gui-vaapi/build/config.json - Qt Application
nvr-gui-vaapi/src/main.cpp - Fullscreen Grid
nvr-gui-vaapi/src/main.cpp - HTTP Snapshots
nvr-gui-vaapi/src/main.cpp - RTSP Workers
nvr-gui-vaapi/src/main.cpp - FFmpeg Decode
Headless Runtime
- Headless Launcher
start-nvr-test.sh - Process Stopper
kill.sh
Host Automation
- Xorg Service
NVR Systemd Automation Stack/xorg.service - GUI Service
NVR Systemd Automation Stack/nvr-gui.service - Media Mount
NVR Systemd Automation Stack/mount-agentmedia.service - NAS Monitor
NVR Systemd Automation Stack/nas-monitor.service - Monitor Setup
NVR Systemd Automation Stack/10-monitors.conf - NVR Mode Script
NVR Systemd Automation Stack/nvr-only.sh - NVR Stop Script
NVR Systemd Automation Stack/kill-nvr.sh
Other components
- Operator
- Camera Sources
- VAAPI Device
- Local Display
Connections 16
- Operator → Headless Launcher: starts
- Headless Launcher → Qt Application: launches
- Qt Application → Camera Config: reads
- Camera Sources → HTTP Snapshots: serves snapshots
- Camera Sources → RTSP Workers: streams video
- Qt Application → HTTP Snapshots: creates for HTTP
- Qt Application → RTSP Workers: starts workers
- HTTP Snapshots → Fullscreen Grid: sets images
- RTSP Workers → FFmpeg Decode: decodes frames
- RTSP Workers → VAAPI Device: uses hardware
- RTSP Workers → Fullscreen Grid: pushes frames
- Qt Application → Fullscreen Grid: builds and shows
- Fullscreen Grid → Local Display: renders
- Operator → Process Stopper: stops processes
- Operator → NVR Mode Script: selects NVR mode
- Xorg Service → Monitor Setup: uses configuration