How ivelytechnologies/se_analog_dvr_edge works
SE Analog DVR Edge is a local service for discovering per-channel RTSP streams from an analog DVR and publishing them into MediaMTX for backend and dashboard playback. The main workflow is setup and configuration, channel probing, then one recoverable FFmpeg publisher per working channel; the service also supports DVR recording searches and cloud-assisted customer/site/camera selection. The graph reflects documented flows and sampled imports/calls. Some recovery and MediaMTX behavior is described only in the README; unsampled implementation details are not inferred.
Main entry points: server.py HTTP service · runtime.py Runtime orchestration · worker.py Channel workers · dvr_rtsp.py RTSP discovery
Components 19
Local interface
- Setup browser
- HTTP service
agent/server.py - Setup page
agent/setup_page.py
Agent orchestration
- Config validation
agent/config.py - Runtime orchestration
agent/runtime.py - Diagnostics
agent/diagnostics.py - Logging
agent/logging_config.py - Version metadata
agent/version.py
Stream pipeline
- RTSP discovery
agent/dvr_rtsp.py - Channel workers
agent/worker.py - FFmpeg command
agent/publisher.py - MediaMTX config
agent/mediamtx_paths.py - Archive search
agent/dvr_archive.py
External systems
- DVR channels
- FFmpeg / ffprobe
- MediaMTX
- Cloud provisioning API
- Backend and dashboard
Other components
- Site operator
Connections 25
- Site operator → Setup browser: configures
README.md - Setup browser → HTTP service: calls local API
README.md - HTTP service → Setup page: serves page
agent/server.py - HTTP service → Runtime orchestration: controls runtime
agent/server.py - HTTP service → Config validation: loads config
agent/server.py - HTTP service → Diagnostics: requests diagnostics
agent/server.py - HTTP service → Archive search: searches recordings
agent/server.py - HTTP service → Cloud provisioning API: requests provisioning
agent/server.py - HTTP service → Version metadata: serves version
agent/server.py - Setup browser → Cloud provisioning API: selects site data
- Runtime orchestration → Config validation: loads and validates
agent/runtime.py - Runtime orchestration → RTSP discovery: probes channels
agent/runtime.py - RTSP discovery → DVR channels: tests RTSP URLs
agent/dvr_rtsp.py - RTSP discovery → FFmpeg / ffprobe: runs ffprobe
agent/dvr_rtsp.py - Runtime orchestration → Channel workers: starts workers
agent/runtime.py - Channel workers → FFmpeg command: builds command
agent/worker.py - Channel workers → FFmpeg / ffprobe: runs and restarts
agent/worker.py - FFmpeg / ffprobe → MediaMTX: publishes streams
README.md - Runtime orchestration → MediaMTX config: registers paths
agent/runtime.py - MediaMTX config → MediaMTX: updates configuration
agent/mediamtx_paths.py - MediaMTX → Backend and dashboard: serves streams
README.md - Archive search → DVR channels: searches recordings
agent/dvr_archive.py - HTTP service → Logging: logs requests
agent/server.py - Channel workers → Logging: logs worker status
agent/worker.py - Runtime orchestration → Logging: logs runtime events
agent/runtime.py