Advanced Detection Surveillance System that uses A.I. and ML to utilize facial recognition, customizable to also perform automated response/actions based on human behaviors. Both threat detection, as well as loss prevention.
- RTSP Stream Viewing: Connect to and display RTSP camera streams
- Configurable: Support for both environment variables and YAML configuration
- Recording: Optional video recording capabilities
- Error Handling: Robust error handling with automatic reconnection
- Logging: Comprehensive logging for debugging and monitoring
- Security: No hardcoded credentials - uses configuration files
- Python 3.8 or higher
- OpenCV compatible system (for camera/video processing)
pip install -r requirements.txtHeimdall supports multiple configuration methods:
Copy the example file and edit:
cp .env.example .env
# Edit .env with your camera credentialsCopy the example file and edit:
cp config.yaml.example config.yaml
# Edit config.yaml with your settingsProvide credentials directly via command line:
python rtsp_ip/rtsp_stream.py --ip 192.168.1.100 --username admin --password secretWith configuration in .env or config.yaml:
python rtsp_ip/rtsp_stream.py# Specify connection details
python rtsp_ip/rtsp_stream.py --ip 192.168.1.100 --username admin --password pass123 --channel 401
# Use custom config file
python rtsp_ip/rtsp_stream.py --config my_config.yaml
# Set log level
python rtsp_ip/rtsp_stream.py --log-level DEBUGWhile viewing the stream:
- Press
qto quit - Press
rto toggle recording on/off
Heimdall/
├── rtsp_ip/ # RTSP streaming module
│ ├── rtsp_stream.py # Main RTSP viewer application
│ └── README.md # RTSP-specific documentation
├── .env.example # Example environment configuration
├── config.yaml.example # Example YAML configuration
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
└── README.md # This file
- Never commit credentials:
.envandconfig.yamlare gitignored - Use strong passwords: Always use strong, unique passwords for camera access
- Network security: Ensure RTSP streams are on a secure network
- Update regularly: Keep dependencies updated for security patches
Install development dependencies:
pip install pytest pytest-cov black flake8 pylint mypyflake8 rtsp_ip/
pylint rtsp_ip/black rtsp_ip/mypy rtsp_ip/- Verify camera IP address is correct
- Check that RTSP port (default 554) is accessible
- Verify username and password
- Check network connectivity
- Review logs for detailed error messages
- Ensure OpenCV is properly installed:
pip install opencv-python - Check that your system has a display available
- Try reducing display resolution in config
- Check camera stream format compatibility
- Ensure recording path exists and is writable
- Check available disk space
- Verify codec is supported (try 'mp4v' or 'XVID')
- Review logs for error messages
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
Ky1e Parisher (cywf)
- OpenCV for video processing capabilities
- The open-source community for various tools and libraries