A multi-threaded video surveillance system for capturing and processing video frames from multiple cameras.
This project is a multi-threaded video surveillance system that captures video frames from multiple cameras, processes the frames, and stores the frame information and images in a database. The system allows you to perform batch processing of video frames and retrieve video clips for specific time intervals.
- Multi-threaded frame capture from multiple cameras.
- Real-time processing and storage of video frames.
- Batch processing of video frames with user-defined duration.
- Retrieval of video clips for specific time intervals.
Before you begin, ensure you have met the following requirements:
- Python 3.x installed.
- OpenCV (
cv2
) library installed. - SQLite database installed (for database functionality).
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/melbinjp/MultiCamSurveillance.git cd MultiCamSurveillance
-
Install the required Python libraries:
pip install -r requirements.txt
-
Configure the system by editing the
config.ini
file. -
Create the necessary folders:
(actually created automatiaclly in the code but works the same when created manuallly also)
mkdir logs images output
-
Run the video surveillance system:
python video_surveillance_backend.py
-
open another terminal for the same directory then run the camera_feeds_retrieval_program:
python camera_feeds_retrieval_program.py
- When you run the system, it will capture frames from the configured cameras, process them, and store them in the
images
folder. - You can specify a duration to create video clips from the captured frames. The clips will be saved in the
output
folder. - The system logs frame information to the
logs
folder.
You can configure the system by editing the config.ini
file. Here are some of the key configurations:
batch_duration
: The duration of each batch in seconds.log_file
: The file where log information is saved.log_level
: The log level (e.g., INFO, DEBUG, ERROR).error_log
: error log for the camera_feeds code file.output_fps
: Frames per second for the output video clips.
This project is licensed under the MIT License - see the LICENSE file for details.