PREREQUISITES:
This has been developed on MacOS and has not been properly tested on Windows or Linux. There have been reports of this working Windows 11, but I am not aware of the details involved.
Use pip to install the following the libraries: ''' pip install cv2-python pafy youtube-dl '''
An error will pop up pointing to /site-packages/pafy/backend_youtube_dl.py and dislikes.
Edit the file it points you to, look for the line that starts with dislikes... and comment it out (change to #dislikes...). Save the file and everything should load proper.
RUNNING:
$ python3 ./MoDe.py -s http://youtube.com/XYZABCUVW -q 1 -o /Users/UserName/Pictures/
usage: MoDe.py [-h] [-c CODEC] [-q QUAD] [-s SOURCE] [-t THREADING]
[-v VERBOSE] [-C CONTOURAREA] [-D DELTA] [-g GAUSSIANBLUR]
[-o OUTDIR]
To Enable QUADrants, THREADING, VERBOSE set VALUE to 1
optional arguments:
-h, --help show this help message and exit
-c CODEC, --codec CODEC
x264 mpv4 divx
-q QUAD, --quad QUAD Enable Quadrant Splitting
-s SOURCE, --source SOURCE
http YouTube URL or File Path
-t THREADING, --threading THREADING
Enable Threading
-v VERBOSE, --verbose VERBOSE
Enable Verbose
-C CONTOURAREA, --contourarea CONTOURAREA
Define contourArea
-D DELTA, --delta DELTA
Define Sensitivity Delta
-g GAUSSIANBLUR, --gaussianblur GAUSSIANBLUR
Define gaussianBlur value
-o OUTDIR, --outdir OUTDIR
Directory to save clips/captures
Changing detection variables:
Gaussian Blur: g will decrease blur, G will increase blur
Delta : d will decrease delta, D will increase delta
contourArea : c will decrease contourArea, C will increase contourArea
: < will decrease contourArea by 200, > will increase contourArea by 200 (Tutorials started it at 10000 but low numbers helped box small objects)
Hide Display : h will hide and unhide the detection variables
PLAYBACK CONTROLS:
Pause (p)
unpause (anykey)
save image (s)
save video clip (S) Recording begins -30s from when you push S
exit recording (x)