Page 1 of 1

Ubiquiti Aircam 7955 ERR Found bogus jpeg

Posted: Fri Mar 01, 2013 8:33 pm
by tcecsc
Hello,

I am beta testing a Ubiquiti Aircam using the .jpeg snapshot feature. I am running Zoneminder 1.25.0-1 on Xubuntu 12.04 LTS.

Zoneminder does not seem to be picking up the .jpeg images correctly. There are errors in the log files:

2013-03-01 14:13:52.451612 zmc_m22 5514 ERR Failed to capture image from monitor 22 (0/1) zmc.cpp 263
2013-03-01 14:13:52.036022 zmc_m22 5514 ERR Unable to get response zm_remote_camera_http.cpp 1097
2013-03-01 14:13:51.613458 zmc_m22 5514 ERR Found bogus jpeg header '3130' zm_remote_camera_http.cpp 956

I have tried different snapshot channel [with different resolutions] but get the same error message.

Any ideas? My other cameras [non-Ubiquiti] are working fine with this install, as well as Ubiquiti cameras using rtsp [ffmpeg]. I have attached a sample .jpeg from the camera.

Re: Ubiquiti Aircam 7955 ERR Found bogus jpeg

Posted: Mon Mar 04, 2013 1:26 pm
by wocketfast
Hi

The snapshot.cgi uses authentication, so it will work for a period after someone has accessed the camera directly then stop working.

I have been running one for 6 weeks without a hitch using these settings:
  • Source Type: Ffmpeg
  • FP: both blank - set these on the camera for a unicast stream.
  • Source Path: rtsp://IPADDRESS:554/live/ch00_0
  • Source width: 1280
  • Source height: 720
You need to change the FPS on the camera to something ZoneMinder can handle. The default of 25fps is just too high for my box. I found 2-5 worked best.

You can check the width/height by putting the URL into VLC, taking a snapshot and checking the dimensions of the resulting jpeg.

I also notice yours looks like it has arrived out of focus.

Re: Ubiquiti Aircam 7955 ERR Found bogus jpeg

Posted: Mon Mar 04, 2013 2:16 pm
by tcecsc
Thanks for your suggestions. We have been using the RTSP but it seems to come up with tiling artifacts and lost connections on some of our cameras often enough to be annoying [possibly from low bandwidth situations]. We normally have the FPS set to 2.

I wrote a Python 2.7 script that uses wget to pull in the .jpeg images that I am using Crontab to run once per minute. The new Ubiquiti Aircam Beta does not require authentication to get full resolution snapshots. I set Zoneminder to look at the local file for the image.

Here is the script if it may be useful to anyone:

Code: Select all

IPAddress = '192.168.200.5'
import os
import datetime, time
Start = datetime.datetime.now()
TimeElasped = (datetime.datetime.now() - Start).total_seconds()
Count = 0




def UpdateLocalJpg(IPAddress):
    os.system('wget ' + IPAddress + '/snapshot.cgi?chan=0 -O /cameras/' + IPAddress + 'Temp.jpg')
    os.system('mv ' + '/cameras/' + IPAddress + 'Temp.jpg /cameras/' + IPAddress + '.jpg')

while (TimeElasped < 59):
    UpdateLocalJpg(IPAddress)
    Count = Count + 1
    TimeElasped = (datetime.datetime.now() - Start).total_seconds()
    if(TimeElasped < Count):
        time.sleep(Count - TimeElasped)
    TimeElasped = (datetime.datetime.now() - Start).total_seconds()
    print "Getting Image:  " + str(TimeElasped) + '           ' + str(Count)

Re: Ubiquiti Aircam 7955 ERR Found bogus jpeg

Posted: Mon Mar 04, 2013 9:57 pm
by tcecsc
After some more expirementation, it turned out that setting http to 1.0 instead of 1.1 fixed the problem. I posted on the Ubiquiti forum in case it is a problem with the Aircams and http 1.1.