What is Motion?
Motion is a program that monitors the video signal from one or more cameras and is able to detect if a significant part of the picture has changed. Or in other words, it can detect motion.
The program is written in C and is made for the Linux operating system.
Motion is a command line based tool. It has absolutely no graphical user interface. Everything is setup via a set of configuration files (simple text files that can be edited by any plain text editor).
Motion can output either image files of the picture frames containing motion or movie files showing the entire event. Motion can also invoke other programs when motion is detected.
How do I get Motion and what does it cost?
Motion is an open source type of project. It does not cost anything. Motion is published under the GNU GENERAL PUBLIC LICENSE
(GPL) version 2 or later. It may be a bit difficult to understand all the details of the license text (especially if your first language is not English). It means that you can get the program, install it and use it freely. You do not have to pay anything and you do not have to register anywhere or ask the author or publisher for permission. The GPL gives you both rights and some very reasonable duties when it comes to copying, distribution and modification of the program. So in very general terms you do not have to worry about licensing as a normal hobby user. If you want to use Motion in a commercial product, if you want to distribute either modified or original versions of Motion - for free or for a fee, you should read the license carefully. For more information about free software and the GPL, you are encouraged to study the very interesting documents about the subject available the of the Free Software Foundation pages about the Philosophy of the GNU Project
Maintenance and Support
Both Motion and the Motion Guide are written by people that do all this as a hobby and without asking for any payments or donations. We have a life other than developing Motion and its documentation. This means that bug-fixes and updates to this guide are done as our time and families allow it. You are however encouraged to participate and contribute in a very active mailing list
. It is a list with a very "positive attitude" and with many contributors that propose features, post patches, discuss problems and patiently answer newbie questions with a very positive spirit
To get motion you have different options. To get the latest and greatest version you can direct your browser to the Motion project on Github
and download the latest sources.
For many major Linux distributions you will also be able to find Motion in the software repositories.
On the Download Files
page you will find a links to the latest stable version both as sources and binaries for some of the most popular Linux distributions
Motion was originally written by Jeroen Vreeken. He was succeded by Folkert van Heusden, and from version 3.1.12, Motion was managed by Kenneth Lavrsen. The actual programming was done by a large group of contributors. From 2016 Kenneth Lavrsen handed over the program ownership and maintenance to Mr. Dave.
For support we encourage you to join the mailing list instead of writing to the project developers. We are all very active on the mailing list and by using the mailing list much more users will have benefit of the answers. Newbies and stupid questions are welcome on the list. Contributions in the form of patches are also very welcome on the mailing list. If you are on Github you are also welcome to submit pull requests.
Which version to download and use?
As of August 2016 the recommended version of Motion version is the latest develop code from Motion project on Github
. There is currently a pre-release of version 3.4.1 available on Github release 3.4.1
and soon a release 4.0.0 will be released to mark that the project has fresh resources and a new Github repository.
Soon the versions of Motion will hit the repositories of various distributions.
What features does Motion have?
The list is long but the main features are
- Taking inputs from multiple video devices at the same time incl network cameras
- Saving pictures when the video signal from a camera contains motion
- Create movie files containing the event in which the motion occurred
- Execute external program when detecting movement
- Execute external program at the beginning of an event of several motion detections.
- Execute external program at the end of an event of several motion detections.
- Execute external program when a picture is saved.
- Execute external program when a movie file is created (opened)
- Execite external program when a movie file is ending (closed)
- Motion tracking
- Live streaming webcam (using multipart/x-mixed-replace)
- Take automated snapshots on regular intervals
- Take automated snapshots at irregular intervals using cron
- Feed events to an MySQL, PostgreSQL or SQLite3 database.
- Feed video back to a video4linux loopback for real time viewing
- Web interface using Motion Related Projects such as motion.cgi, Kenneths Webcam Package, Kevins Webpage, X-Motion and many more.
- User configurable and user defined on screen display.
- Control via simple web interface.
- Automatic noise and threshold control
- Highly configurable display of text on images.
- High configurable definition of path and file names of the stored images and films.
Other operating systems than Linux
Motion can be compiled on other operating systems than Linux but not all features will be supported. Motion has been compiled on FreeBSD and MacOS. These platforms however have had only limited testing.
You have the following sources of information:
Input devices: Here we are thinking about the cameras.
Motion supports video input from two kinds of sources.
Standard video4linux devices (e.g. /dev/video0) and network cameras. Motion has no drivers for cameras. Installing or configuring the camera itself is outside the scope of this document. Generally, if the device works with other common video player software, it will work with Motion (and vice versa). As a result, it is often convenient to first get the device working with other software and then use those connection options with Motion.