Live Streaming Video Chat App
Python provides various libraries for image and video processing. One of them is OpenCV. OpenCV is a vast library that helps in providing various functions for image and video operations. With OpenCV, we can capture a video from the camera.
To install OpenCV library, write the following command in command prompt - "pip install opencv-python"
Steps to capture a video:
Below is the code for implementation:
import cv2
video = cv2.VideoCapture(0)
while(True):?
?? ret , frame = video.read()
cv2.imshow('frame',frame)
??? if cv2.waitKey(1) & 0xFF == ord('q') :
???? break???
video.release()
cv2.destroyAllWindows()