MotionEye. Installation
Installation
Debian 7,8
Install utils
apt-get install motion ffmpeg v4l-utils
note: Python 2.7 is required. If your system still runs Python 2.6 or older, please upgrade.
apt-get install python-pip python-dev python-setuptools curl libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev
Motioneye installation
pip install motioneye
Config
mkdir -p /etc/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
Prepare the media directory
mkdir -p /var/lib/motioneye
Add an init script, configure it to run at startup and start the motionEye server
Debian 7, sysvinit-based:
cp /usr/local/share/motioneye/extra/motioneye.init-debian /etc/init.d/motioneye
chmod +x /etc/init.d/motioneye
update-rc.d -f motioneye defaults
/etc/init.d/motioneye start
Debian 8 and newer, systemd-based:
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
systemctl daemon-reload
systemctl enable motioneye
systemctl start motioneye
To upgrade to the newest version of motioneye, after it has been released, just issue:
pip install motioneye --upgrade
systemctl restart motioneye
Debian 12
https://github.com/motioneye-project/motioneye/tree/dev
apt update
apt --no-install-recommends install -y ca-certificates curl python3 python3-distutils
apt --no-install-recommends install -y ca-certificates curl python3 python3-dev libcurl4-openssl-dev gcc libssl-dev
apt install -y python3-pip
pip install --break-system-packages 'https://github.com/motioneye-project/motioneye/archive/dev.tar.gz'
motioneye_init
systemctl stop motioneye
systemctl enable --now motioneye
systemctl status motioneye
Raspberry PI
Качаем образ для нашего устройства
https://github.com/ccrisan/motioneyeos/releases
Записываем образ на SD карту
В windows это можно сделать программой Etcher
Загружаемся на rpi с SD карты
Устройство получит IP адрес по DHCP
Проходим по веб
http://192.168.1.100
admin
<ПУСТОЙ_ПАРОЛЬ>
Web
http://192.168.1.100:8765
admin
<ПУСТОЙ_ПАРОЛЬ>
IP Camera connection
Убеждаемся что протокол RTSP на камере включен
Camera Profvideo IP20 as example
Путь для подключения камеры из motioneye
Для определения URI rtsp для подключения камеры используем программу Onvif device manager
Необходимо найти камеру в программе, на вкладке Live video будет строка для подключения, примерно такая:
rtsp://192.168.111.201:554/user=admin_password=SXqs2ws2_channel=1_stream=0.sdp?real_stream
Подключение камеры
Camera Type: Network Camera
Camera device: rtsp://192.168.111.201:554/user=admin_password=SXqs2ws2_channel=1_stream=0.sdp?real_stream
Настройка записи камеры
Movies:
Movie File Name: %Y-%m-%d/%H-%M-%S
Movie format: H264 (.mp4)
Recording Mode: Continious
Maximum Movie Length (seconds): 600
Preserve Movies: Forever
Working Schedule:
Monday - Sunday: ON - 00:00-23:59
Detect Motion: During