Abstract
The increasing occurrence of violent incidents in crowded public spaces and high-security environments has intensified the need for intelligent surveillance systems capable of identifying potential threats in real time. Conventional video surveillance systems rely heavily on continuous human monitoring, which is often inefficient, error-prone, and unable to respond promptly in critical situations. To address these challenges, this work presents a real-time threat detection and prevention framework that integrates low-latency video streaming with deep learning-based visual analysis. The proposed system leverages WebRTC technology to enable secure and minimal-delay transmission of live video streams from surveillance cameras to the processing unit, ensuring timely analysis and rapid response. For intelligent visual interpretation, the system employs the YOLOv5 deep learning model to analyze incoming video frames and identify objects that may pose security risks. Detection results are filtered using confidence thresholds and contextual analysis to minimize false alerts. Upon identifying a potential threat, the system generates real-time notifications and visual indicators to assist security personnel in taking appropriate preventive action. A human-in-the-loop mechanism is incorporated to ensure ethical deployment and reliable decision-making, preventing overreliance on fully automated responses. The proposed framework is designed to be scalable, robust, and adaptable to varying environmental conditions such as changes in lighting, background complexity, and camera viewpoints. Experimental evaluation demonstrates that the system achieves high detection accuracy while maintaining low latency and efficient resource utilization, making it suitable for continuous monitoring applications. By combining real-time communication technologies with deep learning-based computer vision, this work enhances situational awareness and supports proactive security management in crowded and high-risk environments.