Camera setup for the web interface
Note
You will encounter some issues even after following the instructions to the tee. We have included references that we used to fix the problem at the end of this chapter.
In this section, we will set up the camera to stream to a browser. The first step is installing the motion
package:
sudo apt-get install motion
Once the package is installed, the following configuration changes need to be applied:
- Edit the following parameters in
/etc/motion/motion.conf
:
daemon on threshold 99999 framerate 90 stream_maxrate 100 stream_localhost off
- Include the following parameter in
/etc/default/motion
:
start_motion_daemon=yes
- Edit
/etc/init.d/motion
as follows:
start) if check_daemon_enabled ; then if ! [ -d /var/run/motion ]; then mkdir /var/run/motion fi chown motion:motion /var/run/motion sudo modprobe bcm2835-v4l2 chmod 777 /var/run/motion sleep 30 log_daemon_msg ...