Motion - Motion Release 3x 1x 20snap 3

Motion Snapshot Release 3.1.20_snap3

Release Notes

3.1.20 snap3 - 28 Mar 2005

Bugfix Development Release - not recommended for normal use

The netcam code is still under development but we are very interested in getting test reports on these releases from people with Network cameras.

Netcam related bug reports from the snapshot releases can be added as a comment to http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch

Changes since 3.1.19

snap1
  • Fixed a bug in noise tune which was most visible at very low light. (Joerg Weber and Kenneth Lavrsen)
  • Improvement in the noise-tune algoritm (Joerg Weber)
  • Netcam fixes and debug code by Christopher Price. http://www.lavrsen.dk/twiki/bin/view/Motion/NetcamStabilityPatch
    • 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
    • Synced syslog/printf style to new motion standard
    • Added developer debug trace defines/code
    • Defines now used for many constants
    • Fixed support for netcams without content-length header (streaming only)
    • Remove memmem from netcam_wget.[c|h] (no longer used)
    • Several miscellaneous code cosmetic changes
    • Fixed support for non-streaming (image based) netcams without content-length header.
    • TODO: remove tests for memmem from configure
  • 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)

snap2
  • Removed a gcc 2.95 compiler warning (netcam.c:1036: warning: variable `pic' might be clobbered by `longjmp' or `vfork') (Kenneth Lavrsen)
  • Fixed some file descriptor leaks in webcam.c and netcam.c (Christophe Grenier)
  • 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
  • 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).

snap3
  • 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 2 because it caused more trouble than it fixed. Removed the close_anything_open(). 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).
  • 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).
  • Removed memmem check in configure , fix version in configure.in.freebsd, fix CPU autodetection in FreeBSD version (Angel Carpintero).

Next Steps

  • Still open todos on Netcam code. Keep on sending bug reports.
  • Fix open bugs.

Known Problems

  • See the 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.

Download

Bug Reports


Kenneth,

I'm still having problems with the Toshiba IK-WB01A. It's telling me that it's not a JPEG file (it works with Motion v3.1.16).

Here's the output from a test run:

$ motion
Processing thread 0 - config file motion.conf
Processing thread 1 - config file /usr/config/camera1.properties
Processing thread 2 - config file /usr/config/camera2.properties
Processing thread 3 - config file /usr/config/camera3.properties
Processing thread 4 - config file /usr/config/camera4.properties
Webcam port for thread 1 is 0
Webcam port for thread 2 is 0
Webcam port for thread 3 is 0
Webcam port for thread 4 is 0
Thread1 device: http://192.168.254.53:10053/SnapshotJpeg?Resolution=320x240&Quality=Standard input: -1
Thread2 device: http://192.168.254.51:10051/SnapshotJpeg?Resolution=320x240&Quality=Standard input: -1
[1] netcam: starting...
Thread3 device: http://192.168.254.52:10052/SnapshotJpeg?Resolution=320x240&Quality=Standard input: -1
Thread4 device: http://192.168.254.54:10054/__live.jpg?&&& input: -1
[1] netcam: content-length supported
[1] netcam: content-length supported
[1] netcam: entering loop...
[2] netcam: starting...
[2] netcam: content-length supported
[2] netcam: content-length supported
[2] netcam: entering loop...
Thread 1 exiting
[3] netcam: starting...
[3] netcam: content-length supported
[3] netcam: content-length supported
[3] netcam: entering loop...
Thread 2 exiting
[4] netcam: starting...
Not a JPEG file: starts with 0x3c 0x68
$ 

My /var/log/messages has the following motion related entries:

Mar 27 22:38:20 cpe1 motion: Processing thread 0 - config file motion.conf
Mar 27 22:38:20 cpe1 motion: Processing thread 1 - config file /usr/config/camera1.properties
Mar 27 22:38:20 cpe1 motion: Processing thread 2 - config file /usr/config/camera2.properties
Mar 27 22:38:20 cpe1 motion: Processing thread 3 - config file /usr/config/camera3.properties
Mar 27 22:38:20 cpe1 motion: Processing thread 4 - config file /usr/config/camera4.properties
Mar 27 22:38:20 cpe1 motion: [1] netcam: starting...
Mar 27 22:38:20 cpe1 motion: [1] netcam: entering loop...
Mar 27 22:38:22 cpe1 motion: [2] netcam: starting...
Mar 27 22:38:22 cpe1 motion: [2] netcam: entering loop...
Mar 27 22:38:24 cpe1 motion: Somebody stole the video device, lets hope we got his picture
Mar 27 22:38:24 cpe1 motion: [3] netcam: starting...
Mar 27 22:38:25 cpe1 motion: [3] netcam: entering loop...
Mar 27 22:38:26 cpe1 motion: Somebody stole the video device, lets hope we got his picture
Mar 27 22:38:27 cpe1 motion: [4] netcam: starting...
Mar 27 22:39:31 cpe1 ntpd[4000]: time reset -0.455368 s
Mar 27 22:39:31 cpe1 ntpd[4000]: kernel time discipline status change 41
Mar 27 22:39:31 cpe1 ntpd[4000]: synchronisation lost
Mar 27 22:44:02 cpe1 ntpd[4000]: kernel time discipline status change 1

-- BruceDurham - 28 Mar 2005

I'm having identical problems with the Toshiba IK-WB11A. See my mailing list post of 2/18/2005 for an ethereal capture file, which shows Motion connecting to the camera twice - the first time succeeds, but the second time (3 ms later) fails.

This camera worked just fine with 3.1.17.

-- MikeChudobiak - 29 Mar 2005

-- KennethLavrsen - 28 Mar 2005
Topic revision: r3 - 29 Mar 2005, MikeChudobiak
Copyright © 1999-2019 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.