Motion - Release Note Motion 3x 2x 1

Release Note - Motion 3.2.1

-- KennethLavrsen - 26 May 2005

Summary of changes since 3.1.19

Features

  • Control Interface: XMLRPC replaced by http interface so you can remote control Motion with a normal webbrowser. It has two modes: html reply and text reply. The text reply makes it more easy to parse the responses for 3rd party GUI control applications.
  • Best preview feature: When you generate mpegs Motion can save ONE preview image from the same event and it is selected as the frame with most motion content.
  • Removed most command line options and replaced them by an option to specify location to motion.conf and a few options related to setting up motion.
  • New setup mode which runs in console mode (non-daemon) and writes lots of useful data to the control and at the same time changes the webcam output to a special setup mode where changed pixels are grey, largest labelled area is blue and smartmask and normal mask is red. Text display shows vital numbers for the motion detection.
  • Improvement in the noise-tune algoritm
  • Added the feature gap=0. It disables gap completely so that one single mpeg file is created. You can end the event from the remote control interface make movie feature using for example cron. This makes Motion close the mpeg and make a new with event number increased by one
  • Implemented new Generic onxxxx features.
    Function --- Old Option --- New Option
    Start of event (first motion) --- execute --- on_event_start
    End of event (no motion for gap seconds) --- New! --- on_event_end
    Picture saved (jpg or ppm) --- onsave --- on_picture_save
    Movie starts (mpeg file opened) --- onmpeg --- on_movie_start
    Movie ends (mpeg file closed) --- onffmpegclose --- on_movie_end
    Motion detected --- New! --- on_motion_detected
  • Motion Guide refactored completely for 3.2.1 with better web navigation and auto generation of pages. Makefile updated so that the Motion TWiki topic. MotionGuideOneLargeDocument is fetched when updating the guide and making releases.
  • Changed the default values for a few options: quiet on, webcam_maxrate 1, threshold_tune off, webcam_quality 50
  • Improved mask file feature. When you specify a mask file in the config file and start Motion, and the mask file does not exist, Motion will create a new clear (white) mask file for you in the right size. Then it is easy to simply open the file in your favorite paint program and add the masking in black.
  • Improved the auto-brightness algoritm. When auto-brightness is enabled the brightness option becomes a target value for the brightness level.
  • Webcam mjpeg stream can now also be viewed with the open source project Palantir.
  • Added new conversion specifiers: %D (diffs), (noise) %K (motion center x), %L (motion center y), %i (locate width x) and %J (locate width y). This change is part of the implementation of a generic tracking feature and it enables implementing external programs that can perform sinple prediction features.
  • Adding checking for conflict between control port and webcam port. Webcam port for a thread is disabled if it is set to the same value as the control port.

Major Bug fixes

  • Netcam stability fixes - quite many of them.
  • Fixed netcam->userpass problem
  • Added support in configure for athlon64
  • Fixed a bug in noise tune which was most visible at very low light.
  • Fixed some file descriptor leaks in webcam.c and netcam.c.
  • Added additional error information when connection to MySQL fails
  • Initiate cnt->event_nr to 1 to avoid code related to end of events and long mpeg films to be run during startup of Motion.
  • Fixed a problem with file descriptors leaking to the external shell invoked by on_xxxx options. This could cause these external programs to hang.
  • Renamed the top level global context structure to cnt_list so it can be reached from child threads.
  • Fixed a problem when compiling with --without-v4l configuration.
  • Fixed a bug where rate of fetching picture frames was disturned by the signal SIG_CHLD from exec_command programs terminating. The symptom was that the number of post_capture frames became inaccurate and motion in mpegs did not have constant time between frames.
  • Fixed a bug where motion did not work with gap=1.
  • Moved some code in the beginning of the motion_loop to a position later to improve the accuracy of time calculations for the framerate.
  • Fixed a bug in the rgb2yuv420p function.
  • Fixed a bug of locate feature for movement images combined with the new output_normal best feature.
  • Removed the debug_parameter option which had no use.
  • Changed some cosmetics in the way motion.conf is written (space after #).
  • Updated the motion-dist.conf to use default values unless there is a reason not to.
  • Fix the compile issue with official ffmpeg packages from debian.
  • Fixed memory leak when restarting Motion.
  • Fixed a bug in the low_cpu feature where cpu load increased instead of decreasing because the framerate calculations were completely wrong. This was an old bug introduced in 3.0.1.
  • Started adding tuner_number as option. This is not fully implemented but at least the tuner_number code implements default number 0.
  • Fixed small bug when pre_capture buffer is resized during operation.
  • Fixed a bug in switchfilter which caused motion detection to not work when the feature was enabled.
  • Added init script to RPM.

Detailed changes for all 3.2.1 snapshot releases since 3.1.19_snap4

snap1

snap2

snap3

snap4
  • Fix for tracking control with http control (Angel Carpintero)
  • Added the new feature Setup Mode (Joerg Weber). This also enables much more error messages given to the console when in non-daemon mode while still preserving the messages in syslog which are important for daemon mode debugging. The patch is still being worked on and is not finished. Changes in the FreeBSD code are not yet tested. http://www.lavrsen.dk/twiki/bin/view/Motion/SetupModePatch
  • Remove most command line options and replace them by an option to specify location to motion.conf and a few options related to setting up motion. (Joerg Weber). This is also included in http://www.lavrsen.dk/twiki/bin/view/Motion/SetupModePatch.
  • Small improvement of the http control interface (link to setting itself on the html response when setting parameter) (Kenneth Lavrsen)

snap5
  • Fixed a bug in noise tune which was most visible at very low light. (Joerg Weber and Kenneth Lavrsen)
  • Further improvement in the setup mode. Messages are now prefixed by the thread number in [brackets]. Moved 2 funtions from motion.c to picture.c. The setup mode patch is now considered finished. (Joerg Weber)

snap6
  • Netcam fixes and debug code by Christopher Price - http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch - snap5_post1_video.c and snap5-post1 patches.
    • Fixed netcam startup race condition.
    • Refactored image handling back to single unified function.
    • Refactored reconnection algorithm.
    • Jpeg only based connections should now use less cpu time.
    • Temporarily removed support for devices that do not support content-length (in progress).
    • Synced syslog/printf style to new motion standard.
    • Added developer debug trace defines/code.
    • Defines now used for many constants.

snap7
  • Improved console output in setup mode. Now also outputs threshold. (Joerg Weber)
  • Added some additional text to the motion http messages to the terminal so that you know where the messages come from. (Kenneth Lavrsen)
  • Netcam Stability Patch version snap6-post1 (Christopher Price)
    • Added support for netcams without content-length header (streaming only)
    • Remove memmem from netcam_wget.[c|h] (no longer used)
    • Several miscellaneous code cosmetic changes
    • TODO: remove tests for memmem from configure

snap8
  • Added support for non-streaming (image based) netcams without content-length header. (3.2.1-snap7-post1 version of the Netcam Stabilty Patch by Christopher Price).
  • Improvement in the noise-tune algoritm (Joerg Weber)
  • Re-arranged many of the const char declarations so that they are always before any statements within a block { }. This is to avoid compiler errors with older but still used gcc versions such as 2.9.5. (Kenneth Lavrsen)
  • Changed the use of %zd to %llu in printf statements of size_t types. This is done to avoid compiler errors with older but still used gcc versions such as 2.95. (Kenneth Lavrsen)

snap9
  • Fixed even more gcc 2.95 compiler errors (declarations not at beginning of block) (Kenneth Lavrsen).
  • Removed a gcc 2.95 compiler warning (netcam.c:1036: warning: variable `pic' might be clobbered by `longjmp' or `vfork') (Kenneth Lavrsen)
  • The values for cnt->locate and cnt->new_img are now #defines in motion.h to enhance code readability (Kenneth Lavrsen).
  • The setting of sql_mask is now only done once per second to save CPU power (Kenneth Lavrsen)
  • Adding checking for conflict between control port and webcam port. Webcam port for a thread is disabled if it is set to the same value as the control port (Kenneth Lavrsen).
  • Fixed some file descriptor leaks in webcam.c and netcam.c (Christophe Grenier).
  • Added "motion-http:" prefix to error messages from the http control thread (Kenneth Lavrsen).
  • Added additional error information when connection to MySQL fails (Kenneth Lavrsen).
  • Initiate cnt->event_nr to 1 to avoid code related to end of events and long mpeg films to be run during startup of Motion. (Kenneth Lavrsen)
  • Added new function in event.c close_anything_open() which is called from send_sms, send_mail and exec_command in order to prevent file descriptor and open sockets to be inherited by the shell causing freezing and instability. Code contributed by Christophe Grenier, Christopher Price and Kenneth Lavrsen. http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x21x070534
  • Added new context global cnt_list.control_socket_server set by the httpd thread so that the above mentioned close_anything_open() can close open control sockets (Kenneth Lavrsen).
  • Renamed the top level global context structure to cnt_list so it can be reached from child threads and by above mentioned close_anything_open() (Christophe Grenier).

snap10
  • Fixed a problem when compiling with --without-v4l configuration (Philip Marien). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x27x112843
  • Threw away the file descripter leak fix from snap 9 because it caused more trouble than it fixed. Removed the close_anything_open() and the cnt_list.control_socket_server field. Replaced it all with a simple piece of code that all server daemons call when started: setsid() followed by for (i=getdtablesize(); i>2; --i) close(i). Dirty and simple (Kenneth Lavrsen). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x21x070534
  • Fixed a bug where rate of fetching picture frames was disturned by the signal SIG_CHLD from exec_command programs terminating. The symptom was that the number of post_capture frames became inaccurate and motion in mpegs did not have constant time between frames (Kenneth Lavrsen).
  • Fixed a bug where motion did not work with gap=1 (Kenneth Lavrsen). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x01x30x073616
  • Added the feature gap=0 which now also works. It disables gap completely so that one single mpeg file is created. You can end the event from the remote control interface make movie feature using for example cron. This makes Motion close the mpeg and make a new with event number increased by one (Kenneth Lavrsen).
  • Improved the http remote control action features so that makemovie and snapshot for thread 0 (all) works on all threads instead of being ignored (Kenneth Lavrsen).
  • Moved some code in the beginning of the motion_loop to a position later to improve the accuracy of time calculations for the framerate (Kenneth Lavrsen).
  • Updated code so Motion again runs on FreeBSD (Angel Carpintero).
  • Removed chech for memmem from configure (Angel Carpintero).
  • Updated http control interface so that an additional check is done before saving config files (Angel Carpintero).
  • Fixed a problem with URLs http://192.168.1.3:8080/0 which did not work without a trailing space (Angel Carpintero).

snap11
  • Implemented new Generic onxxxx features.
    Function --- Old Option --- New Option
    Start of event (first motion) --- execute --- on_event_start
    End of event (no motion for gap seconds) --- New! --- on_event_end
    Picture saved (jpg or ppm) --- onsave --- on_picture_save
    Movie starts (mpeg file opened) --- onmpeg --- on_movie_start
    Movie ends (mpeg file closed) --- onffmpegclose --- on_movie_end
    Motion detected --- New! --- on_motion_detected
    http://www.lavrsen.dk/twiki/bin/view/Motion/OnXxxCommandsPatch and http://www.lavrsen.dk/twiki/bin/view/Motion/OnXxxxFeatureDiscussion (Joerg Weber)
  • More Netcam Stability Fixes (snap10-post1-6) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Destroy mutexes in netcam_cleanup().
    • Add reconnection for netcam_start() - this may block other cameras from starting up!.
    • Added additional defines for reconnect retries.
    • Change reconnection timeouts to 60 seconds.
    • Reworked close(sock) in netcam_connect, to insure future changes won't forget to close the socket.
    • Reworked reconnection for netcam_start() - disabled by default, see source for INIT_RECONNECT_RETRIES.
    • Break some long lines in code.
    • Replaced sleep with nanosleep per suggestion by Kenneth Lavrsen.
    • Added additional header validation check.
    • Changed a couple fd references to use RBUF_FD.
    • Added error message if jpeglib error occurs.
    • Removed additional header validation check.
    • Limited times headers will be checked.
    • Removed mutex lock around netcam_start() in video.c, hopefully race conditions are fixed.
    • Added additional headers in http request.
    • Added back header validation (should fix netcam_read_header lockups).
    • Detect when there is no data on socket in netcam_read_ functions (should fix netcam_read_image_contentlength() and netcam_read_image_no_contentlength() lockups).
    • Rearranged timeout assignments for pthread_cond_timedwait() calls.
    • Adjusted TIMEOUT_COND_WHICH to 4 seconds.
  • Improvements of motion.conf help comments including improvements in new onxxxx options. (Kenneth Lavrsen)

snap12
  • Fixed a bug in the rgb2yuv420p function. (Daniel Ladd). http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x03x30x011107
  • Fixed a bug of locate feature for movement images combined with the new output_normal best feature (Joerg Weber).
  • More Netcam Stability Fixes (snap11-post1-4) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Reworked thread signal/wait conditions, should fix some race conditions.
    • Use gettimeofday() to determine thread timeouts, results in better accuracy.
    • Adjusted condition timeouts to smaller values due to usage of gettimeofday()
    • and rework of thread signal/wait conditions.
    • Adjusted reconnection retries to 60 (every minute for an hour).
    • Fix bug where motion will not quit if requested when reconnecting.
    • Cruft, feature creep and redudant code removed.
    • Consolated reconnection capability to unified netcam_reconnect function.
    • Rework netcam_start logic, minimize startup variables.
    • Rework netcam_stream_read and netcam_single_read logic.
    • Minor changes to netcam_next logic.
    • Fix bug in streaming camera without content-length, recent mod broke.
    • Fix bug in startup of single image reads without content-length.
  • Motion Guide refactored completely for 3.2.1 with better web navigation and auto generation of pages. Makefile updated so that the Motion TWiki topic. MotionGuideOneLargeDocument is fetched when updating the guide and making releases. (Kenneth Lavrsen).

snap13
  • Removed the debug_parameter option which had no use. Programmers can still use it because the code is only commented out. This change required a small update in the code that rewrites motion.conf so that a remote control command to write the config files still adds a text header for the thread section at the end of motion.conf (Kenneth Lavrsen).
  • Changed the default values for a few options: quiet on, webcam_maxrate 1, threshold_tune off, webcam_quality 50 (Kenneth Lavrsen).
  • Changed some cosmetics in the way motion.conf is written (space after #) (Kenneth Lavrsen).
  • Updated the motion-dist.conf to use default values unless there is a reason not to (Kenneth Lavrsen).
  • Fix the compile issue with official ffmpeg packages from debian (Angel Carpintero).
  • More Netcam Stability Fixes (snap12-post1) (Christopher Price) http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • Newrote url parser, better syntax checking and error handling of urls.
    • Userpass now allowed in url (http://user:pass@example.com/). Netcam_userpass has precedence, it will override a userpass embedded in the url.

snap14
  • Added basic authentication to the http control interface introducing new config option control_authentication (Angel Carpintero).
  • Fixed memory leak when restarting Motion from http control (Angel Carpintero).
  • Small improvement in configure script for Debian (Angel Carpintero).
  • Added the ability to clear an option to off (bool), 0 (int) or undefined (string) by submitting blank entry field in the http control interface (Angel Carpintero).

snap15

snap16

snap17

release

Known Problems

  • See the http://www.lavrsen.dk/twiki/bin/view/Motion/BugReports for open bugs.
  • The pwc-ioctl.h is for pwc version 9.0.1 and 10.0.6. If you still use the pwc 8 series then you need to use the headerfile pwc-ioctl.h-pwc8.0 (copy the pwc-ioctl.h-pwc8.0 over pwc-ioctl.h). This is relevant for USB cameras using Philips chips.

-- KennethLavrsen - 26 May 2005
Topic revision: r6 - 26 May 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.