Motion

From Mark Furneaux's Wiki
Jump to: navigation, search

Motion is a software package for Linux which allows any webcam or network camera to be used for surveillance or security.

Config

We are to assume that we are setting up a single USB camera to capture frames periodically and save them as both images and as a timelapse video.

If motion is to startup as a daemon and run in the background, enable the daemon functionality by editing the single line in /etc/default/motion.

All config changes are made in /etc/motion/motion.conf. The following lines should be modified for a basic install:

daemon on

width 1280
height 720

threshold 1000000

ffmpeg_timelapse 15

snapshot_interval 15

target_dir /home/mark/motion

webcam_localhost off

If you want to run the webserver on a port < 1024, you will need to run:
# setcap cap_net_bind_service+ep /usr/bin/motion
to allow motion to bind to the port. The setcap command is provided in the libcap2-bin package.