Motion Software

You can further customize the parameters for the motion software by editing the file called motion-mmalcam.conf. One field that is important to point out is the threshold input; if you have pets, you can set a threshold of the minimum number of pixels that need to change from frame to frame in order to initiate a new motion event. In order to improve framerate and effiency, the version of motion included in this tutorial uses low resolution images (320x180 pixels by default) to detect motion, and then upscales the final images by a factor of mmalcam_secondary_buffer_upscale. There are a total of 57600 pixels in the low-resolution motion capture; thus, an object of 560 pixels would occupy less than 1% of the entire screen, which nicely filters out my own cats' motion.

That being said, please note that the motion software here is customized to increase the FPS of the video, as the default version of motion only offers a maximum of 2 FPS. In particular, the option ffmpeg_output_movies must be set to 'off' in order to preserve FPS. To accomodate to this limitation, the series of motion images that are captured are manually converted to a video file after the motion event has ended, which takes a little more time than in the original motion software. Really, you should be careful modifying most commands in this file as they are specific to this modified motion software. For more information on this modded motion software, please see this forum .

Note that changes are not actually made until the software is restarted with
sudo python reboot.py