Alternative streaming method to motion. This is much better solution if only purpose is streaming live video.
This method works only on Raspberry PI boards (any model) equipped with the standard CSI camera module.
The main differences:
Advantages:
-no delay on stream
-higher frame rate, at a higher resolution
-you can tweak CSI camera parameters directly from the command line
-browser will eat up less CPU at the same frame rate/resolution (it uses a pure MJPEG stream, rather than triggering every refresh from JavaScript)
Disadvantages:
-no more motion detection
-no more motion notifications
-no more pictures or movies
-no more overlaid text
-a higher network bandwidth usage
streamEye install procedure to raspbian stretch lite:
First prequisitions
Then streamEye
Remove motion
Or if you dont want to remove motion. Stop motion and disable service
Probably you have to edit also /etc/motion/motion.conf and /etc/defaults/motion to disable daemon
streamEye starting scripts
raspimjpeg.sh (All options goes here also)
Then save [ctrl+o] and exit [ctrl+x]
make it executable
Script for running it at service
raspimjpeg.service
Then save [ctrl+o] and exit [ctrl+x]
enable service
You can check status
It should be now up and running.
This method works only on Raspberry PI boards (any model) equipped with the standard CSI camera module.
The main differences:
Advantages:
-no delay on stream
-higher frame rate, at a higher resolution
-you can tweak CSI camera parameters directly from the command line
-browser will eat up less CPU at the same frame rate/resolution (it uses a pure MJPEG stream, rather than triggering every refresh from JavaScript)
Disadvantages:
-no more motion detection
-no more motion notifications
-no more pictures or movies
-no more overlaid text
-a higher network bandwidth usage
streamEye install procedure to raspbian stretch lite:
First prequisitions
Code:
sudo apt-get update
sudo apt-get install git make gcc python-picamera python3-picamera
Then streamEye
Code:
cd ~
git clone [URL]https://github.com/ccrisan/streameye.git[/URL] cd streameye
make
sudo make install
Remove motion
Code:
sudo apt-get remove motion
Or if you dont want to remove motion. Stop motion and disable service
Code:
sudo service motion stop
sudo update-rc.d motion remove
Probably you have to edit also /etc/motion/motion.conf and /etc/defaults/motion to disable daemon
streamEye starting scripts
Code:
cd ~/streameye/extras/
nano raspimjpeg.sh
raspimjpeg.sh (All options goes here also)
Code:
#!/bin/bash
# usage: raspimjpeg.py -w WIDTH -h HEIGHT -r FRAMERATE [options]
# help: raspimjpeg.py --help show all available options
/home/pi/streameye/extras/raspimjpeg.py -w 800 -h 600 -r 20 --quality 25 | streameye
Then save [ctrl+o] and exit [ctrl+x]
make it executable
Code:
chmod +x raspimjpeg.sh
Script for running it at service
Code:
sudo nano /lib/systemd/system/raspimjpeg.service
raspimjpeg.service
Code:
[Unit]
Description=streameye script
After=multi-user.target
[Service]
Type=simple
ExecStart=/bin/bash /home/pi/streameye/extras/raspimjpeg.sh
Restart=on-abort
[Install]
WantedBy=multi-user.target
Then save [ctrl+o] and exit [ctrl+x]
enable service
Code:
sudo chmod 644 /lib/systemd/system/raspimjpeg.service
sudo systemctl daemon-reload
sudo systemctl enable raspimjpeg.service
sudo systemctl start raspimjpeg.service
You can check status
Code:
sudo systemctl status raspimjpeg.service
It should be now up and running.
Code:
[URL]http://ip.address:8080[/URL]