Skip to content

Latest commit

 

History

History

camera

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Set up Raspberry Pi as an IP-camera monitoring or recording (DVR / NVR) server

Check out @jantman blog post

Tips

Ffprobe camera streams to check if camera is available (example for Dahua IPC rtsp address):

USERNAME=admin
PASSWORD=*****
ffprobe -v quiet -print_format json -show_format "rtsp://${USERNAME}:${PASSWORD}@192.168.1.201:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"
ffprobe -v quiet -print_format json -show_streams "rtsp://${USERNAME}:${PASSWORD}@192.168.1.201:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"

Option 1: Get MotionEyeOS image

Option 2: Set up motion and motionEye manually

sudo apt install -y ssh curl motion ffmpeg v4l-utils

cd /tmp
sudo apt install -y python2
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py

sudo apt install -y libffi-dev libzbar-dev libzbar0
sudo apt install -y python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev
sudo apt install -y python-pil

sudo pip2 install motioneye
sudo mkdir -p /etc/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf

sudo mkdir -p /var/lib/motioneye

sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
sudo systemctl daemon-reload
sudo systemctl enable motioneye
sudo systemctl start motioneye

Browse to http://hostname_or_ip:8765/ (Username admin with blank password)

Add camera streams, for example rtsp://192.168.1.200:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif (for Dahua)

Option 1: Get Raspbian Lite image

Tip: Increase GPU mem to improve performance

Option 2: Install on Ubuntu aarch64

sudo add-apt-repository ppa:iconnor/zoneminder-1.34
sudo apt update

sudo apt install -y tasksel
sudo tasksel install lamp-server

sudo apt install zoneminder

sudo chmod 740 /etc/zm/zm.conf
sudo chown root:www-data /etc/zm/zm.conf
sudo chown -R www-data:www-data /usr/share/zoneminder/

a2enmod cgi expires headers rewrite
a2enconf zoneminder

sudo systemctl enable zoneminder
sudo systemctl start zoneminder

sudo systemctl reload apache2

Browse to http://hostname_or_ip/zm

Check out @stephen-mw blog post

Ubuntu guide quick recap:

  1. Install Node.js — modern version is required

sudo apt install -y ffmpeg git
sudo apt install -y mariadb-server

sudo mysql_secure_installation

# optional:
# sudo npm i -g npm
sudo npm i -g pm2

git clone https://gitlab.com/Shinobi-Systems/Shinobi.git
cd Shinobi
chmod +x INSTALL/ubuntu.sh
sudo INSTALL/ubuntu.sh
  1. Browse to http://ip.ip.ip.ip:8080/super ([email protected] / admin) to add first user

  2. Browse to http://ip.ip.ip.ip:8080/ and log in with added user credentials