Skip to content
Gerry33 edited this page May 18, 2017 · 7 revisions

Welcome to the IPCameraServer wiki!

Purpose & Motivation

This program allows to receive your pictures, videos from your IP- cameras. You just need a computer running 24/7 that is able to host this little JAVA program like a NAS or an embedded machine like ODROID, RASPBERRY, BANANA PI, etc.

You do not need any cloud service. However, you may forward your pictures, videos to a WEB- space of your own to keep your privacy. Prior you may convert the pictures/videos to any format you like.

Getting Starting

  • download _cameraServer.jar, CameraServer.properties _, optional log4j2.xml from here.
  • Edit CameraServer.properties . Adapt to your environment.The parameters are all obvious and lots of comments give explanation.
  • run : java -jar cameraServer.jar

Done !

If all is fine, send the program to background: 'java -jar ipCamServer.jar & ' if all is still fine, install a system service using the provided service description file or create a task in WINDOWS task manager.

Configuration Details

Setup of FTP- server

The program established a FTP server that your camera send the pictures/videos to. This must be reflected in your camera as well. Choose a username/password in CameraServer.properties and put the same in your camera. See comments in 'CameraServer.properties'. For the entry FTPServer.homedir=... it is a good idea also to put the log files into this location defined in logs4j.xml. Then also obsolete log files are purged with the built-in deletion functions defined with FTPServer.Days2KeepFiles=

Choose an FTP- port >1024, eg. 2121 not to conflict with running services and avoid access right conflicts.

Picture & Video conversion

Optionally any received picture and video may be converted into any arbitrary format. Recommended tool for this is the "ffmpeg" tool. 'ffmpeg' must be installed separately. LINUX: 'apt-get install ffmpeg', WINDOWS: see ffmpeg.org Check out the ffmpeg- options using a sample command line to see if you get the expected results.

Then edit the command line in properties file to adapt to your needs. A typical conversion from AVI to MP4 looks like this:

Conversion.Command.avi=.\ffmpeg\ffmpeg.exe -y -i ${FileName}.avi -c:v libx264 -crf 22 -c:a aac -strict experimental ${FileName}.$EXT_mp4

Explanation:

Conversion.Command.avi: conversion command that will be used when a file with extension 'avi' is received. Add other commands as needed e.g. Conversion.Command.mp4:

_.\ffmpeg\ffmpeg.exe _: the path to ffmpeg executable

_'${FileName} _ : the input filename as a substitutor

-c:v libx264 -crf 22 -c:a aac -strict experimental : the ffmpeg options

${FileName}.$EXT_mp4 : the output filename with extension MP4. For 'avi' extension, use $EXT_avi, etc.

Upload to a WEB- Server

Any pictures/videos may be uploaded to your private WEB space if it supports HTTP WEBDAV. (Which is usually the case for all modern servers).

Provide the access data in

WebDav.RemoteURIRoot=.

WebDav.Username=

WebDav.Password=

If you do not want uploads, comment/remove out WebDav.RemoteURIRoot=.

Motion detection control

If you're at home you might not want your camera take pictures/videos. So the the camera's motion control can be switched ON or OFF depending on the presence of any IP- device in W/LAN typically your mobile phone or TV or whatever.

This features is tested and working with "UPCAM"- webcams (upcam.de), but may simply be adapted to other cams by configuration.

Cron time expressions may be provides that define where motion MUST be ON regardless of a any device presence e.g. at night when your're at home, but asleep - typically ;-)

Motion detection timings

The motion detection ON/OFF is controlled by a intern cron-like scheduler. This scheduler determines when the motion control may be switched off or on again and the intervall in which the configured hosts are interrogated for presence. Outside these time bands, the motion control detection is always ON.

Motion detection command line.

For using this feature you need to know the URL that controls this feature in your camera. A example is given for "UPCAM"- cameras in cameraService.service. This URL can be easily determined /sniffed using e.g. FIREFOX HTTPFOX add-on.

See more comments in cameraService.service.