Posts Tagged “ICamViewProxy”

I have several emails from people commenting on the ICamViewProxy and several people having problems compiling it and using it. I forget that not everyone is a programmer and alot of the things that are second nature to myself are not to others.

I will update the page this week to answer some of these questions and perhaps update the source code as I see fit. So any additional comments get in touch!

Stay tuned!

Tom

Tags: , , ,

Comments No Comments »

ICamView CameraICamView Web Server

ICamViewProxy has been updated.

I have purchased a ICamView Plus web server and compatible Infrared camera. These devices are relatively well built and the 2 together cost me as little as £40.

They are certainly not the best cameras in the world, but for that price the image quality and the functionality offered by the web server are very impressive.

The web server offers the following main features:

  • Motion Detection
  • Scheduled Recording
  • Remote web interface
  • SNMP
  • Email and FTP alerting / uploading
  • Multiple user accounts. I.E. view only, admin
  • Single image URL (not MJPEG explained in more detail below)
  • Video streaming port (proprietary explained in more detail below)

All sounds very good and for the price and it is. For myself though the image processing is overly simply and the only ‘tweaking’ parameter is a percentage of sensitivity. Which is pretty pointless and useless. Ideally I would like to be able to monitor a single ‘zone’ and ignore motion detection outside the zone.

My next step was to try and connect this IP Camera into zoneminder to give me the motion detection and alerting system I required. Simple I assumed.. How wrong I was.

Image URL

The single image URL provided by the web server is appallingly unreliable. Request an image via the constructed URL and sometimes get a JPEG, sometimes an error and often nothing.

http://IPADDRESS:VIDEOPORT/pda.cgi?user=&password=&page=image&cam=1

‘user=’ is an anonymous viewer

‘user=admin’ would be an admin user

similar goes for ‘password=’

Video Port

Unfortunately the video port is a proprietary authenticated protocol based on UDP, not a MJPEG stream. I cannot understand the logic here, it would make far more sense to provide an MJPEG stream.

To connect to zone minder an MJPEG stream is required. This is where my proxy application comes in.

After a bit of googling, some reverse engineering of the protocol using wireshark to capture the packets sent from the windows application to the web server and some coding I have a working solution which logs into the web server video port and requests an image every 1000/FPS ms. I found Neil Raymond’s application a great starting point. So if you are reading this, thank you!

The application sits on the box running zoneminder and provides a proxy between the proprietary video port and provides an MJPEG stream to zoneminder. In an ideal world, ICamView would make a complient port, but given their releases of updates it seems unlikely.

The application is fully portable and has been written using C++, SDL and SDL_net extension. I have compiled and tested it in windows and Linux (Fedora 6). There is no reason why this should not work on any other platform.

Usage Instructions:

Simple really:

ICamViewProxy -camid 1 -camhost 192.168.1.3 -camport 9001 -camuser user -campass password -proxyport 8888

Download

The source is working source and as such may not be considered production code. This could be easily turned into a daemon with an init script in Linux.

This will happily cross compile, the zip file contains a working windows binary and also the required dependencies for windows compilation. This should build out of the box on visual studio 2008.

Source Code and Win32 Binary

ICamViewProxy has been placed onto GitHub for further development, feel free to send me patches.

ICamViewProxy on GitHub

Any questions, bugs, suggestions feel free to get in contact.

Setup in ZoneMinder

Camera Type:

ICamView Proxy Zoneminder 1

Source Settings:

ICamView Proxy Zoneminder 2

Buffers:

ICamView Proxy Zoneminder 3

Tags: , , ,

Comments 23 Comments »