motion
Record video from cameras on motion detection
SYNOPSIS
motion [OPTIONS]
PARAMETERS
-c <file>, --config <file>
Specify an alternative configuration file to use instead of the default motion.conf.
-b, --daemon
Run motion in the background as a daemon process.
-n, --no-daemon
Prevent motion from running as a daemon, keeping it in the foreground (opposite of -b).
-p <pidfile>, --pidfile <pidfile>
Specify an alternative PID file to store the process ID of the daemon.
-l <logfile>, --log-file <logfile>
Specify an alternative log file for motion's output messages.
-k <level>, --log-level <level>
Set the log level (0-9). Higher numbers produce more verbose logging output.
-h, --help
Display a help message with command-line options and exit.
-v, --version
Display motion's version information and exit.
DESCRIPTION
Motion is a highly configurable program that monitors video input from one or more cameras, such as webcams or network cameras (IP cameras). Its primary function is to detect motion and react to it.
Upon detection, Motion can capture images, record video clips, or execute user-defined commands. It also features a built-in web server for live streaming and remote control, making it ideal for home surveillance, security monitoring, and general camera-based automation tasks. Motion runs as a daemon, allowing continuous background operation, and its extensive configuration options are primarily managed through a plain text configuration file.
CAVEATS
Motion can be resource-intensive, especially with multiple high-resolution cameras or complex processing. Proper configuration is crucial for performance and desired behavior.
The web control interface might require careful security setup (e.g., authentication, firewall rules) to prevent unauthorized access. Many advanced features are configured within its motion.conf file rather than via command-line arguments, which can be a learning curve for new users.
CONFIGURATION FILE
Motion relies heavily on its configuration file, typically /etc/motion/motion.conf or a user-specific file. This file controls almost all aspects of Motion's behavior, including camera settings, motion detection parameters, recording options, web streaming, and event-triggered actions. Understanding and customizing this file is key to fully utilizing Motion's capabilities.
WEB CONTROL INTERFACE
Motion includes a basic web control interface, which can be configured within motion.conf. This interface allows for viewing live streams, accessing captured events, and even remotely changing some Motion parameters without restarting the daemon. It's a powerful tool for remote management but requires proper network and authentication setup for security.
HISTORY
The Motion project began around 2002, initially developed by Kenneth Lavrsen. It quickly gained popularity as a flexible and open-source solution for motion detection and surveillance on Linux systems. Over the years, it has seen contributions from numerous developers, expanding its feature set to support various camera types, advanced motion detection algorithms, and integration with web interfaces. Its focus has remained on providing a robust, daemon-based surveillance solution primarily driven by a powerful configuration file.


