"Connection to camera lost" errors with Aviosys 9100B Video Server
I've been running motion for some time now, quite happily on my Linux box with 2 L QCP 5000 cams.
I have just added a 3rd camera - this is an analogue CCTV camera connected to an Aviosys 9100B IP Video server (takes up to 4 CCTV inputs, converts to single IP cam output).
I have configured motion to get the image from the Aviosys 9100B, and it's set to take snapshots every 15 minutes.
However - a large proportion (probably 20-30%) of the snapshots return a blank grey image with the error "Connection to camera lost since " and then a time/date. Usually the time is less than a minute or two before the snapshot was taken.
Has anyone any experience with a similar setup, or any ideas on any settings that I may need to reconfigure in motion ?
I have noticed that direct image requests from my web browser to the video server can be very slow, of the order of many seconds.
| Motion version:
| ffmpeg version:
| Server OS:
- 11 Apr 2007
I also use an IP9100, but mine is the A ... the little black box. Yours is the metal cased one with BNC inputs I guess? I also use a couple of netcams from the same 'motion' program as well.
I am not having any problems with mine, and it is polled at 1-2 fps 24 hours a day.
Have you checked the web page of the IP9100B
is showing a continuous good image? Motion normally produces the grey screen if there is a connectivity problem to the camera, ie. in this case a network problem.
I don't know why you get slow response from the IP9100 box. Mine is normally 2-4 seconds and no more. And 15 minutes is perhaps long enough for a router to discard a port mapping, or a wireless link to lapse. Hopefully you have a simple setup with none of these items!
Running motion with 'motion -d 9 ....' to use Debug mode may show some useful information. At debug level 9, information relating to the camera is output. (I would run just the problem camera thread, other threads disabled, in Debug mode to avoid extraneous information on the screen).
Motion will send lots of info to the system log with Debug mode on, so don't run it for too long to avoid log flooding. Perhaps once you've caught the problem once/twice, it should be stopped with Ctrl-C.
Are you using the yoics firmware in the IP9100? I am and it works very well.
- 11 Apr 2007
I forgot to mention - motion is taking snapshots every 15 minutes, but is also looking for motion events. Motion is configured to sample the image at 1fps.
Question - on the 9100's web page, do the resolution settings etc just affect the image when shown in that web page, or do they affect the image returned by direct URL to motion as well ?
You say you are polling your camera at 1-2fps, but when you request it via a browser it takes 2-4 seconds to appear. Does motion not suffer the same problem as your browser when it requests the images ?
I am not using the yoics firmware. What advantages would this give me ?
Many thanks for your help.
- 11 Apr 2007
Hmmm. Yes. The situation with access times and the IP9100 box is somewhat complicated! When I first access the IP9100A
using a web browser, my estimate is 2-4 seconds for the first page to load. Refreshes are usually <1s. It's a very inexact science, and I am using the largest images, which take more time than small ones. It's funny that most netcams advertise 30fps etc, these are for the postage-stamp sized images like QCIF (not the good-sized ones....)
I use the yoics firmware which permits access to all 4 channels without using a Round Robin type feature (which Motion does not support for netcams anyway!). It puts all 4 images on the index.html page, which cycle around the enabled inputs at a (configurable) rate of around 1 per second. You can also access them all by direct URL access (I explain how later).
For access by motion, I use the usr/yoics0.jpg channel alone. This returns a jpeg image so there is no HTML page to create on-the-fly in the IP9100 box. Thus it is faster (experience agrees with the logic here). I use a slow server which can only hit the IP9100A
with requests at around 2fps. I think I get 1.5fps on average. I know this by using my StatisticsDataPatch
which you may want to try out (if you are using a late SVN release, that is best for compatibility).
A PC can get higher frame rates than my slow server. I think the IP box can support up to about 8fps or so, before it maxes out. The individual images can be used ( usr/yoics0.jpeg usr/yoics1.jpg etc) or the streaming (video.cgi) method instead (but video.cgi only contains one configured channel).
Take a look at the WorkingDevices
page under the Aviosys IP9100A
entry for a little more explanation on the multiple channel access and a link for the firmware.
Yes, if you set 640x480 (for example) on the IP box's webpage, you will get 640x480 images returned by direct URL access.
I think Motion, when told to use 1fps, silently goes for 2fps - due to the timing loop at the core of the software. It does not actually matter for a netcam, since things are somewhat differently in that case. A netcam under motion has a program thread which reads the frames in over the network, and another which decodes the Jpegs and passes them for motion-detection. Only when one Jpeg is completely decoded is the next one started, and it will be the most recently read frame. Others that may have been read in between are lost. The 'actual fps' of a netcam is thus dependent on a few things, primarily Jpeg decode speed. The StatisticsDataPatch
will show you the MotionThruPut
number, which is the actual fps of motion detection.
The jpeg decoding thread is mutually exclusive. I think that multiple threads on the same machine have to share that resource, which means that slow machines are limited in the fps of netcams by how quickly they decode Jpegs. (Since I have no video devices I can't comment on V4L
fps limitations). This was what I found with my slow server (Linksys NSLU2) which does not have floating-point hardware. With a PC I got much better (ie. faster) results.
Let us know if you find anything in the debug output when you try it.
- 11 Apr 2007
I've attached a screen capture of the IP9100a yielding about 1.5fps on my slow server.
- 11 Apr 2007
Thanks Simon !
- 16 Jun 2008