📄 motion_guide.html
字号:
<p />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.<p />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.<p />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.<p /><h3><a name="Which_version_to_download_and_us"></a> Which version to download and use? </h3>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.<p />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. <p />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.<p /><h3><a name="What_features_does_Motion_have"></a><a name="What_features_does_Motion_have_"></a> What features does Motion have? </h3>See more description at the <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome" target="_top">Motion Homepage</a>. <ul><li> Taking snapshots of movement </li> <li> Watch multiple video devices at the same time </li> <li> Watch multiple inputs on one capture card at the same time </li> <li> Live streaming webcam (using multipart/x-mixed-replace) </li> <li> Real time creation of mpeg movies using libraries from ffmpeg </li> <li> Take automated snapshots on regular intervals </li> <li> Take automated snapshots at irregular intervals using cron </li> <li> Executing external program when detecting movement</li> <li> Execute external program at the beginning of an event of several motion detections.</li> <li> Execute external program at the end of an event of several motion detections. </li> <li> Execute external program when a picture is saved.</li> <li> Execute external program when a movie mpeg is created (opened)</li> <li> Execite external program when a movie mpeg ends (closed) </li> <li> Motion tracking </li> <li> Feed events to an MySQL or PostgreSQL database. </li> <li> Feed video back to a video4linux loopback for real time viewing </li> <li> Web interface using <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/RelatedProjects" class="twikiLink">Motion Related Projects</a> such as <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MotionCGI" class="twikiLink">motion.cgi</a>, <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/KennethsWebcamPackage" class="twikiLink">Kenneths Webcam Package</a>, <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/KevinsWebpage" class="twikiLink">Kevins Webpage</a>, <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/XMotionTool" class="twikiLink">X-Motion</a> and many more.</li> <li> User configurable and user defined on screen display.</li> <li> Control via simple web interface.</li> <li> Automatic noise and threshold control</li> <li> Ability to control the pan/tilt of a Logitech Sphere (or Orbit) camera</li> <li> Highly configurable display of text on images.</li> <li> High configurable definition of path and file names of the stored images and films.</li></ul> <p />You can find more information and links at the <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome" target="_top">Motion Homepage</a>.<p /><h3><a name="FreeBSD"></a><a name="_FreeBSD"></a> FreeBSD </h3><p />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 <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/FreeBSD" target="_top">Install <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/FreeBSD" class="twikiLink">FreeBSD</a></a>.<p /><h3><a name="MacOSX"></a><a name="_MacOSX"></a> MacOSX </h3><p />From Motion version 3.2.4 it is now also possible to build and install Motion under <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MacOSX" class="twikiLink">MacOSX</a>. Feature set it the same as for FreeBSD. See the <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MacOSX" class="twikiLink">MacOSX</a> topic for specific help how to install Motion and its dependencies on <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MacOSX" class="twikiLink">MacOSX</a>. Again this port has been contributed by Angel Carpintero.<p /><h3><a name="Documentation"></a> Documentation </h3>You have the following sources of information:<p /> <ul><li> This <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide" class="twikiLink">Motion Guide</a>.</li> <li> The <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/FrequentlyAskedQuestions" class="twikiLink">Frequently Asked Questions</a></li> <li> The author of the program has written a description of the <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/MotionTechnology" class="twikiLink">technology behind motion</a>.</li> <li> The man page. After installation simply write man motion</li> <li> The default motion.conf file (motion-dist.conf) that comes with the package.</li></ul> <p /><h3><a name="Supported_Hardware"></a> Supported Hardware </h3>Input devices: Here we are thinking about the cameras.<p />Motion supports video input from two kinds of sources.<p />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. <ul><li> <a href="http://www.saillard.org/pwc/" rel="nofollow" target="_top">Driver for USB Philips cameras (and more)</a> This driver is a fork of the old pcw(x) driver which got kicked out of the kernel. (see: <a href="http://www.smcc.demon.nl/webcam/" rel="nofollow" target="_top">http://www.smcc.demon.nl/webcam/</a>). See also the new <a href="http://www.lavrsen.dk/twiki/bin/view/PWC/WebHome" class="twikiLink">PWC Documentation Site</a> which is hosted in this wiki.</li> <li> <a href="http://bytesex.org/bttv/index.html" rel="nofollow" target="_top">BTTV Driver</a> (capture cards). Part of many distributions now.</li> <li> <a href="http://alpha.dyndns.org/ov511/" rel="nofollow" target="_top">OV511</a> based USB cameras are supported as standard by newer Kernels.</li> <li> <a href="http://spca50x.sourceforge.net/spca50x.php" rel="nofollow" target="_top">kernel driver for USB cameras based on Sunplus spca50</a></li> <li> <a href="http://rivatv.sourceforge.net/" rel="nofollow" target="_top">rivatv.sourceforge.net</a> Driver for tv/composite/svideo input with most Nvidia based video cards.</li></ul> Network cameras (which are actually cameras with a built in web server that can be connected directory to your network). <ul><li> <a href="http://www.axis.com/" rel="nofollow" target="_top">Axis Communications</a></li></ul> <p /><p /><h2><a name="Known_Problems"></a> <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/KnownProblems" class="twikiLink">Known Problems</a> </h2>See also the <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/FrequentlyAskedQuestions" class="twikiLink">Frequently Asked Questions</a> and <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/BugReports" class="twikiLink">Bug Reports</a> for known open bugs.<p /><strong>Kernel 2.6 and pwc.</strong> 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 <a href="http://www.lavrsen.dk/twiki/bin/view/PWC/InstallationOfPWC" class="twikiLink">Installation of PWC</a> page which is also hosted in this wiki.<p />If you use use a <strong>Logitech Quickcam Orbit or Sphere</strong> 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.<p /><strong>Camera picture dimensions must be multiple of 16</strong>Dimentions of camera image must have both height and width that are a multiple of 16. Th韘 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.<p /><strong>ffmpeg_filename has changed name to movie_filename</strong>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.<p /><strong>error: `time_current_frame' undeclared (first use in this function)</strong>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.<p /><p /><h2><a name="How_do_I_install_Motion"></a><a name="How_do_I_install_Motion_"></a> <a href="http://www.lavrsen.dk/twiki/bin/view/Motion/InstallOverview" class="twikiLink">How do I install Motion</a>? </h2>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.<p />The short overview of the steps to install Motion from sources. <ul><li> <strong>Preparation</strong>: Motion uses a number of shared libraries that must be installed on your computer before you can build Motion. The needed shared libraries depends on the features you wish to use. Features network camera, ffmpeg, MySQL and PostgreSQL needs specific shared libraries installed. See preparation section for more information.</li></ul> <p /> <ul><li> <strong>Download</strong> the motion source files (distributed as tar'ed and compressed files). Place the file in a place of your own choice.</li></ul> <p /> <ul><li> <strong>Untar and uncompress</strong> the file to the place you want the program installed. Editor recommends placing the motion source file directory in /usr/local. If you do not have write access to the /usr/local directory (you are under the mercy of an ignorant system administrator with a severe case of paranoia) - you can install the program in a directory in your home directory. You will then need to read the next section about how to configure before you compile the program. Below is shown the exact commands using version 3.2.X installed in /usr/local as an example (replace /path/to with the actual placement of the tar.gz file).</li></ul> <UL><pre>cd /usr/localtar -xvzf /path/to/motion-3.2.X.tar.gz</pre></UL> <ul><li> You will now have created a directory called motion-3.2.X. You can rename it to motion (mv motion-3.1.X motion). I recommend creating a symbolic link to the current version. This way you can more easily experiment with different version simply by changing the link.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -