sudo apt-get install motion
sudo motion
Open
sudo nano /etc/default/motion
{
yes
}
sudo nano /etc/motion/motion.conf
{
framerate 1500
stream_localhost off
webcontrol_localhost off
quiality 100
width 640
heigh 840
post_capture 5
}
sudo service motion restart
sudo motion