How dhanush7git/rstp works
KAVACH’s RTSP simulator turns configured video files into LAN-accessible camera streams. The main workflow loads and validates configuration, starts MediaMTX, launches one looping FFmpeg publisher per enabled camera, and exposes each stream for KAVACH clients. Separate commands validate local assets and probe server and stream reachability; synthetic CCTV footage is also available for demonstrations. The graph reflects the sampled runtime modules and README-described capabilities; video generation and binary setup are shown as separate supporting branches.
Main entry points: main.py Command interface · stream_publisher.py Process manager · mediamtx MediaMTX server · health_check.py Connectivity checks
Components 17
Runtime orchestration
- Command interface
src/main.py - Config and validation
src/config.py - Simulator settings
config.yaml - Process manager
src/stream_publisher.py
RTSP streaming
- Generated server config
src/stream_publisher.py - MediaMTX server
mediamtx - FFmpeg publishers
src/stream_publisher.py - FFmpeg
- Camera video files
videos - RTSP camera streams
Setup and checks
- Connectivity checks
src/health_check.py - MediaMTX setup
src/setup_binaries.py
Demo media
- Synthetic video generator
src/generate_test_videos.py - Generated CCTV videos
videos
Other components
- Operator
- KAVACH client
- MediaMTX release
Connections 21
- Operator → Command interface: runs commands
- Command interface → Config and validation: loads settings
- Simulator settings → Config and validation: defines cameras
- Command interface → Process manager: starts processes
- Process manager → Generated server config: writes config
- Process manager → MediaMTX server: starts server
- Process manager → FFmpeg publishers: starts publishers
- FFmpeg publishers → FFmpeg: launches
- FFmpeg → Camera video files: reads clips
- FFmpeg → RTSP camera streams: publishes streams
- MediaMTX server → Generated server config: reads config
- MediaMTX server → RTSP camera streams: serves streams
- KAVACH client → RTSP camera streams: connects to
- Operator → Connectivity checks: runs probes
- Command interface → Connectivity checks: runs checks
- Connectivity checks → RTSP camera streams: probes streams
- Operator → MediaMTX setup: requests setup
- MediaMTX setup → MediaMTX release: downloads binary
- Operator → Synthetic video generator: generates footage
- Synthetic video generator → Generated CCTV videos: writes videos
- Generated CCTV videos → Camera video files: provides clips