A versatile Python tool for capturing images from RTSP streams with customizable intervals. Ideal for surveillance cameras, time-lapse photography and 3D printer cameras
- Captures images from an RTSP feed at specified intervals.
- Customizable capture interval (default: 5 seconds).
- Configurable filename format for captured images.
- Handles decoding errors by restarting the capture.
- Logs capture activities to a file (
capture_log.txt).
- Python 3.x
- OpenCV (
cv2library)
-
Clone the repository:
git clone https://github.com/your-username/RTSP-Image-Capture.git
-
Install the required dependencies:
pip install opencv-python
-
Run the script with the desired RTSP URL:
python capture_images.py [interval]
Example:
python capture_images.py rtsp://user:pass@your-camera-url/stream 10
[interval]: Optional argument for the capture interval in seconds (default: 5).
-
Stop the capture using
Ctrl+C.
- Adjust the default capture interval and filename format by modifying the script's arguments and parameters.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python and OpenCV.