From 2aed0a44ae8e6cb14dfc1945c16c85eb67f0fdf8 Mon Sep 17 00:00:00 2001 From: Mr Dave Date: Sat, 12 Sep 2015 19:13:27 -0600 Subject: [PATCH] Revised motion guide --- CHANGELOG | 1 + motion_guide.html | 7644 +++++++++++++++++++++++++-------------------- 2 files changed, 4211 insertions(+), 3434 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a4d6a447..0a99226f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ Summary of Changes + * Draft revised motion_guide.html with new options. * Revise manual to have current options. * Tab/Space cleanup and validation security issue addressed. (closes 071831) * Add preview to webcontrol page(closes 172526) diff --git a/motion_guide.html b/motion_guide.html index 0260ed3d..7bc95a41 100644 --- a/motion_guide.html +++ b/motion_guide.html @@ -1,1974 +1,2301 @@ -

Motion Guide - One Large Document.

+

Motion Guide

+

This version of the Guide is made for inclusion in the Motion download package for off line reading. -

-If you read this document from the distribution package of Motion or from some not up to date mirror you should know that the URL for the always up to date version is http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide. If you are already on the new TWiki based Motion site clicking the link just mentioned will lead you to the index page for the Motion Guide documents. -


-This topic consists of the following subtopics: -MotionOverview, KnownProblems, InstallOverview, PrepareInstall, ConfigureScript, MakeInstall, UpgradingFromOlderVersion, RunningMotionConfigFiles, CommandLineOptions, ConfigFileOptions, SignalsKill, ErrorLogging, CaptureDeviceOptions, MotionDetectionSettings, ImageFileOutput, TuningMotion, MpegFilmsFFmpeg, SnapshotsWebCam, TextFeatures, AdvancedFilenames, ConversionSpecifiers, WebcamServer, RemoteControlHttp, ExternalCommands, TrackingControl, UsingDatabases, LoopbackDevice. -
-

-

-
-

-

Motion Guide - Installation

-

-

Motion Overview

-

-

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 either via the command line or via a set of configuration files (simple ASCII files that can be edited by any ASCII editor). -

-The output from motion can be: -

-

-

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, I encourage you 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 bugfixes 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. Expect 1-10 emails per day. -

-To get motion direct your browser to the Motion Homepage. -

-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. You will also find links to development versions. Snapshot releases are special test releases that are normally very stable. Every day a Motion Daily Source Snap is created from the Motion Subversion -

-Motion was originally written by Jeroen Vreeken who still actively participates in the development of Motion and later Folkert van Heusden continued as a lead programmer with Kenneth Lavrsen responsible for Motion Guide, website and releases on Sourceforge. -

-From version 3.1.12 Motion is now project managed entirely by Kenneth Lavrsen, and the project now shift towards being developed by many contributers. -

-For support we encourage you to join the mailing list instead of writing to Jeroen, Folkert or Kenneth directly. 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. -

-

Which version to download and use?

-Versions 3.2.X are the current version. There is at the moment no development branch. The versions 3.1.X ended at 3.1.20 and there will be no more 3.1.X releases. If you use use a version older than 3.2.X you are encouraged to update. -

-Since 3.1.13 quite many options have been renamed to make setting up Motion easier. From 3.1.17-18 some unfinished features have been removed. The Berkeley mpeg feature is now removed because the ffmpeg feature is now mature and much better working. At version 3.1.18 a new network camera feature was introduced replacing the old cURL based netcam code and introducing support of mjpeg streaming cameras. However this new code was quite difficult to get stable. During the development of 3.2.2 the network camera code was totally rewritten again learning from our experience and now finally it seems to be stable. -

-Since 3.2.3 Debian users can find binary packages on the Motion Sourceforge file download page. You can find Debian versions of Motion in different Debian repositories but they are all out of date and hardly ever get updated. -

-

What features does Motion have?

-See more description at the Motion Homepage. -

-You can find more information and links at the Motion Homepage. -

-

FreeBSD

-

-Motion is originally developed for Linux and it is still mainly developed and supported for this platform. From version 3.1.15 an experimental port has been made by Angel Carpintero. Not all features of Motion are supported at this time and it still needs a lot of test time on different hardware. Angel is very interested in feedback. Join the Motion Mailing List and give your feedback there. Patches for bugfixes and for enabling the missing features are very welcome. The rest of this guide is still mainly targeted for Linux users. Follow this topic to Install FreeBSD. -

-

MacOSX

-

-From Motion version 3.2.4 it is now also possible to build and install Motion under MacOSX. Feature set it the same as for FreeBSD. See the MacOSX topic for specific help how to install Motion and its dependencies on MacOSX. Again this port has been contributed by Angel Carpintero. -

-

Documentation

-You have the following sources of information: -

-

-

Supported Hardware

-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). Motion has no drivers for cameras. Installing the camera itself is outside the scope of this document. But here are some nice links.

-Network cameras (which are actually cameras with a built in web server that can be connected directory to your network). -

-

-

Known Problems

-See also the Frequently Asked Questions and Bug Reports for known open bugs. -

-Kernel 2.6 and pwc. Note that for kernel 2.6 there is a new release of the Philips WebCam (pwc) drivers 10.0.X. It is recommended to install this. At the time of this being written the 2.6.12+ kernels have a version of pwc built-in but it is a cripled version which can only support very small picture size. You can however download the latest source code of the pwc driver (at this time 10.0.11) and build it without having to rebuild your kernel. But you will need to have either the kernel sources or a special kernel-header package installed to compile it. See Installation of PWC page which is also hosted in this wiki. -

-If you use use a Logitech Quickcam Orbit or Sphere using the driver pwc/pwcx and kernel 2.6.X you should replace the file in the Motion sources called pwc-ioctl.h with the one that comes with the your pwc version. Motion is shipped with 3 versions of pwc-ioctl.h-VERSION. Rename the one that fits your major pwc version number best to pwc-ioctl.h (after renaming the current to something else). There has been some small adjustments in the API that requires that you have the right header file. -

-Camera picture dimensions must be multiple of 16 -Dimentions of camera image must have both height and width that are a multiple of 16. Thís is normally not a problem. All standard sizes like 640, 480, 352, 320, 288, 240, ...etc are multiples of 16. But if you intend to monitor a network camera which is saving jpeg images you may have to pay attention to the dimensions of the picture. -

-ffmpeg_filename has changed name to movie_filename -The 3.2.5 release contains a motion_guide and man page in which it was forgotten to change ffmpeg_filename to movie_filename. Please note that the option that defines the filenames for mpeg movies is now called movie_filename. This change is made because we may soon implement alternatives to ffmpeg and then ffmpeg_filename will be a bad name. This is fixed in release 3.2.5.1. -

-error: `time_current_frame' undeclared (first use in this function) -A bug in 3.2.5 and 3.2.5.1 where a bugfix related to snapshot feature has created a new bug when you compile Motion without ffmpeg libs installed. This is fixed in 3.2.6. -

-

-

How do I install Motion?

-Motion is mainly distributed as source files that you must compile yourself. There is also an RPM made on Fedora Core 3. And Debian packages are available for selected versions. -

-The short overview of the steps to install Motion from sources.

-

-

- - - - - - -

- -

-

-

Preparation For Install

-

-Note: If you're using SuSE 9.2, you might want to ADDITIONALLY have a look at Compiling on SuSE 9.2. As mentioned on that page as well, you will still need to read the instructions here as well. -

-Before you start you may need to install a number of shared libraries that Motion uses. If they are missing the feature will simply normally not be included. Most of these libraries can be found on the CDs of your distribution. A few will have to be downloaded from the Internet. Note that when you install software using pre-compiled binaries (Redhat type RPMs, Debian debs etc) you normally only get what is needed to run the programs themselves. In order to compile other programs from source that uses these pre-compiled libraries you also need to installed the development packages. These are normally called the same name as the package suffixed by -devel or -dev. These development packages contains the header files (xxx.h) that Motion needs to build with the shared libraries. If you build a library from sources you already have these header files. It is recommended to simply install the pre-compiled binary packages and their development brothers. -

-This is a list of shared libraries used by Motion and the RPM packages that provides them. -

-Motion will always need these libraries to be built and work - - - - -
Library RPM Packages Debian Packages
libm, libresolv, libdl, libpthread, libc, ld-linux, libcrypt, and libnsl glibc and glibc-devel libc6 , libc6-dev ,libglib1.2
libjpeg libjpeg and libjpeg-devel libjpeg62 and libjpeg62-dev ( optional libjpeg-mmx-dev )
libz zlib and zlib-devel zlib1g and zlib1g-dev
-

-For generating mpeg films with ffmpeg you need this library:
-(See also the section Generating MPEG films with ffmpeg for how to install ffmpeg and libavformat/libavcodec)
-Motion must be installed with revision 0.4.8 or 0.4.9pre1 of ffmpeg. Motion will also work with later CVS snapshots of ffmpeg but the API of the ffmpeg libraries changes all the time and without warning. If you have problems compiling Motion or with running an RPM of Motion you may try with an older CVS snapshot of ffmpeg. The Motion developers will like to know when ffmpeg changes and breaks Motion so we can fix it. Please file a bug report then with the exact date of the ffmpeg CVS version you have trouble with. -

- - -
Library RPM Packages Debian Packages
libavcodec, libavformat ffmpeg and ffmpeg-devel or install from source libavcodec-dev libavcodec0d libavformat-dev libavformat0d (*)
-

-Debian has not provided deb packages for ffmpeg due patent issues. However this is about to change so checkout for availability of newer versions of debian ffmpeg debs. You can build yourself from source or from Christian Marillat website or apt repository. -

-deb http://www.debian-multimedia.org stable main # ( etch )
-deb http://www.debian-multimedia.org testing main # ( lenny )
-deb http://www.debian-multimedia.org unstable main # ( sid )
+

+

+ -
-Add the suitable line to your /etc/apt/sources.list and run this: -
-apt-get update ; apt-get -y install libavcodec-dev libavcodec0d libavformat-dev libavformat0d
-
-

-For logging in MySQL you need this library: - - -
Library RPM Packages Debian Packages
libmysqlclient mysql and mysql-devel libmysqlclient15-off and libmysqlclient15-dev
-

-For logging in PostgreSQL you need this library: - - -
Library RPM Packages Debian Packages
libpq postgresql-libs and postgresql-devel libpq-dev and libpq4
-

-

-

Configure Script

-Configure is script that you run to setup the build environment for the C-compiler. It generates the "Makefile" which the program "make" uses to compile and install the software. -

-To run configure your current directory must be the motion directory. You type -

+ +

+ +

Overview

+ + +

Known Problems

+ +

Installation on Ubuntu and Debian

+ + +

How to build Motion from source code

+ + +

Important Definitions

+ + +

The Configuration Files

+ + +

Command Line Options

+ + +

Signals (sent with e.g. kill command)

+ + +Video4Linux Devices + + +Network Cameras + + +Image_Processing + + +Motion Detection + + +Script Execution + + +Output - General + + +Output - Picture + + +Output - Movie + + +Output - Pipe + + +Stream and Webcontrol + + +Database + + +Tracking + + +Conversion Specifiers + + + +

System Processing

+ + +

Video4Linux Device

+ + +

Network Cameras

+ + +

Image Processing

+ + +

Motion Detection

+ + +

Script Execution

+ + +

Output - General Options

+ -#change to suit your needs: -#location of 'sms-client' binary -SMS_CLIENT="/usr/bin/sms_client" -#Destination sms number -TO="12345" +

Output - Picture Options

+ + +

Output - Movie Options

+ + +

Output - Pipe Options

+