9816ba339f
Decided to switch using opencv's builtin pixel diff motion detection via absdiff and thresh. Doing this should increase efficiency instead of using the home brewed pixel loops and threads. Added a web interface of sorts by having html files output along with the video clips. These files are designed to link together with the assumption that the output directory is a web root like /var/www/html that apache2 uses. The interface is crude at best but at least allow playback of recorded footage. Added max_clips config variable that can limit the amount of motion events that can recorded to storage on a single day.
24 lines
529 B
Bash
24 lines
529 B
Bash
#!/bin/sh
|
|
|
|
apt update -y
|
|
apt install -y cmake g++ wget unzip git ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
|
|
add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
|
apt update -y
|
|
apt install -y gcc-10 gcc-10-base gcc-10-doc g++-10
|
|
apt install -y libstdc++-10-dev libstdc++-10-doc
|
|
cd ./src
|
|
if [ -d "./opencv" ]
|
|
then
|
|
cd ./opencv
|
|
git pull origin
|
|
cd ..
|
|
else
|
|
git clone https://github.com/opencv/opencv.git
|
|
fi
|
|
cd ..
|
|
mkdir -p ./.build-opencv
|
|
cd ./.build-opencv
|
|
cmake ../src/opencv
|
|
make -j4
|
|
make install
|