Detect motion in a video recorded or live both.
First you have to install OpenCV using pip to run this code.
Here I have used OpenCV with python for detecting motion. I have also supplied a sample video to check but one can always
use webcam or any other camera also by changing a little in the code.