BUG: Multible Netcams doesnt work longer

When i run Motion with 2 NetCams, one Cam ist stopping after a short time. My NetCam from Thread1 is a D-Link dcs-900, the Cam for Thread2 is an Axis 205. Both Netcams are connected cia an Ethernetswitch to the DMZ from the Server. The DMZ is a 100 MBit Ethernetinterface only for the NetCams. After starting Motion, one the Cam from Thread1 ist working fine, on next Startup Motion perhaps the Cam from Thread3 working fine.

The motion.conf is the original from motion-dist.conf (only my path ist changed) und my thread config Files comming here:

# /usr/local/etc/thread1.conf

netcam_url http://webcam1dmz.emptysoft.net/IMAGE.JPG

netcam_userpass xxxx:xxxxxx

#Target directory for pictures
target_dir /EmptySoft/WebCam/Cam1

############################################################
# Motion Detection Settings:
############################################################

#Threshold for number of changed pixels in an image that
#triggers motion detection (default: 1500)
threshold 5000

#Automaticly tune the threshold down if possible (default: on)
threshold_tune on

#Noise threshold for the motion detection (default: 32)
noise_level 32

#Minimum gap in seconds between the storing pictures while detecting motion.
minimum_gap 15

############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################

#Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 61

tarzan:/usr/local/etc # cat thread3.conf
# /usr/local/etc/thread3.conf

netcam_url http://webcam3dmz.emptysoft.net/axis-cgi/jpg/image.cgi?resolution=640x480&showlength=1

#netcam_url http://webcam3dmz.emptysoft.net/axis-cgi/mjpg/video.cgi?showlength=1

#netcam_userpass xxxxxx:xxxxx

#Target directory for pictures
target_dir /EmptySoft/WebCam/Cam3

############################################################
# Motion Detection Settings:
############################################################

#Threshold for number of changed pixels in an image that
#triggers motion detection (default: 1500)
threshold 5000

#Automaticly tune the threshold down if possible (default: on)
threshold_tune on

#Noise threshold for the motion detection (default: 32)
noise_level 32

#Minimum gap in seconds between the storing pictures while detecting motion.
minimum_gap 15

############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################

#Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 63


the output from starting Motion :


tarzan:/Backup/BackupScript # motion
Processing thread 0 - config file /usr/local/etc/motion.conf
Processing thread 1 - config file /usr/local/etc/thread1.conf
Processing thread 2 - config file /usr/local/etc/thread3.conf
Webcam port for thread 1 is 0
Webcam port for thread 2 is 0
Thread1 device: http://webcam1dmz.emptysoft.net/IMAGE.JPG input: -1
Thread2 device: http://webcam3dmz.emptysoft.net/axis-cgi/jpg/image.cgi?resolution=640x480&showlength=1 input: -1
Netcam: thread 1: starting...
Netcam: thread 2: starting...
[HTTP/1.0 200 OK]
Netcam: thread 2: jpeg file
Netcam single : Content-length supported
Netcam: thread 2: thread PID: 2789
[HTTP/1.0 200 OK]
Netcam: thread 1: jpeg file
File of type 32 saved to: /EmptySoft/WebCam/Cam3/2005/20050212-timelapse.mpg
Netcam single : Content-length supported
Netcam: thread 1: thread PID: 2789
Thread Condiction timeout
Thread Condiction timeout


both Threads alone working fine (but the Message "Thread Condiction timeout" comes also)

Test case

Environment

Motion version: 3.1.19 Snap1 with latest patches from Angel
ffmpeg version: 0.4.8
Shared libraries: curl, ffmpeg, mysql
Server OS: SuSE Linux 9.2, kernel 2.6.8-24.11

-- EmptySoft - 12 Feb 2005

Follow up

First curl are not needed from motion-3.1.18 because the new netcam driver make the use of it obsolete. What's the framerate did you setup for each thread ?

Thread Condiction timeout message is because the thread that gets image from net spend more that 5 seconds to get a non error image. I'll gonna add the thread information to this message to allow users to know which thread is making errors.

-- AngelCarpintero - 12 Feb 2005

Take the patch from http://www.lavrsen.dk/twiki/bin/view/Motion/StreamingNetcamWithoutCurl , and try to run motion in no deamon mode to get detailed information. Try to report the log when one of the camera fails.

-- AngelCarpintero - 13 Feb 2005

My Framerate is set to 2. Your Netcampatch is already installed. The output from Motion say nothing from stopping capture images. There is only a "Closing devices ..." after save a snapshot.



Thread Condiction timeout
File of type 2 saved to: /EmptySoft/WebCam/Cam1/lastsnap.jpg
Closing devices ...
Thread Condiction timeout


Most times the non working Thread only captures frames, but stopping bevor 1 snapshot. I have sniffed on the Ethernet mith ethereal, there are no request to the sencond Netcam, but there are no Errormessages from motion output or the /var/log/messages File.


Now i have changed the axis from jpg to mjpg Stream. At this time both Camīs working since a hour und it looks good. Not every Snapshot are saved (configured to 61 Seconds) but 1 in 5 Minutes are saved. There is always the Thread Condiction timeout from the motion output.

-- EmptySoft - 13 Feb 2005


Are you sure that you have installed the new netcam patch ? , it shows thread number in Thread Condiction timeout , for instance Thread 2 Condiction timeout .

So please , be sure you have motion-3.1.19_snap1 with netcam-patch installed.

-- AngelCarpintero - 13 Feb 2005


Hi Angel.

So as it look, i have made an error during patching the Motion. Sorry. Now i have patched agin and i see the Thread 1 Condiction timeout

tarzan:/Share/download/Linux_Webcam # motion
Processing thread 0 - config file /usr/local/etc/motion.conf
Processing thread 1 - config file /usr/local/etc/thread1.conf
Processing thread 2 - config file /usr/local/etc/thread3.conf
Webcam port for thread 1 is 0
Webcam port for thread 2 is 0
Thread1 device: http://webcam1dmz.emptysoft.net/IMAGE.JPG input: -1
Thread2 device: http://webcam3dmz.emptysoft.net/axis-cgi/mjpg/video.cgi?showlength=1 input: -1
Netcam: thread 1: starting...
Netcam: thread 2: starting...
[HTTP/1.0 200 OK]
Netcam: thread 2, mjpeg stream
Netcam: thread 2: netcam->boundary_string [--myboundary]
Netcam stream : thread 2: Content-length supported
Netcam: thread 2: thread PID: 30042
File of type 32 saved to: /EmptySoft/WebCam/Cam3/2005/20050213-timelapse.mpg
[HTTP/1.0 200 OK]
Netcam: thread 1: jpeg file
File of type 2 saved to: /EmptySoft/WebCam/Cam3/lastsnap.jpg
Closing devices ...
Netcam single: thread 1: Content-length supported
Netcam: thread 1: thread PID: 30042
Thread 1 Condiction timeout
File of type 32 saved to: /EmptySoft/WebCam/Cam1/2005/20050213-timelapse.mpg
Thread 1 Condiction timeout

Snapshots for Cam3 looks OK File of type 2 saved to: /EmptySoft/WebCam/Cam3/lastsnap.jpg

for Cam1 only every 5. is OK (some times the 4. and then the 6.)

If i configured Motion to use jpeg for the Axis Cam (Cam3) then i get the diction timeout for both threads.

Du you have any Idea, what i can do for Condiction timeout ?

-- EmptySoft - 13 Feb 2005


Note: I replaced your many <BR> by surrounding text by <VERBATIM> and </VERBATIM>

-- KennethLavrsen - 13 Feb 2005


Can you confirm if the problem is still there with Motion 3.1.19 released?

-- KennethLavrsen - 03 Mar 2005


This still exists in Motion 3.1.19. I've attached a small patch that I believe fixes the problem.

-- ChristopherPrice - 18 Mar 2005


This should now be resolved for the D-Link DCS-900 and Axis 205 netcams in 3.1.20-snap5 and 3.2.1-snap12.

-- ChristopherPrice - 15 Apr 2005

Fix record

Topic attachments
I Attachment Action Size Date Who Comment
motion-3.1.19-video.c.diffdiff motion-3.1.19-video.c.diff manage 0.5 K 18 Mar 2005 - 16:56 ChristopherPrice Patch to lock video mutex when starting netcams
Topic revision: r13 - 27 May 2005, KennethLavrsen
 
Motion - Bug Report 2005x 02x 12x 172946
Copyright Đ 1999-2014 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.