Photo Capture Plugin
Purpose
The purpose of this plugin is to capture an image from locally connected cameras.
Usage
Cameras connected via a local ethernet network are sometimes referred to as IP or WEB cameras. Most IP/WEB connected cameras allow photo and/or video collection by common protocols such as http
, fswebcam
or rtsp
. The site https://www.ispyconnect.com/sources.aspx
can be used to determine if and how a camera image can be captured from a particular make and model of camera, via http
, fswebcam
or rtsp
. The file defined in config_filename
(see Arguments below) must contain a single command that is used get the photo, and 4 command types are currently supported by this plugin, either http
, rtsp
, fswebcam
or ffmpeg
. The command must start with either of these keywords. Comments are allowed in the config filename, but must start with '#'. Some examples of the contents of config_filename
:
If collecting via rtsp
, then installation of the ffmpeg
command must be done manually, as below, if its not already installed. If ffmpeg
is not installed, do the following on an X86 device.
For testing, try and capture an image to the filename /tmp/img.jpg
, try the following:
Capturing an image via http
is much easier. The convert
tool is optional, and only to reduce the size of the image if it is too big.
You may have to encode the password using this guide: https://www.w3schools.com/tags/ref_urlencode.ASP if it contains special characters. For example; A password of (say) ()&^%
becomes: %28%29%26%5E%25
.
At the moment, the plugin WILL NOT setup the WATCH scenario in the Ardexa YAML file. This MUST be done manually. An example is shown below. If you don't know how to do this, contact Ardexa.
Ardexa does not recommend USB connected cameras. However if you need to connect to a USB device, the fswebcam
seems to be a more usable and stable app. The fswebcam
allows for better collection and control of camera properties. Its best to use a config file to control exposure and resolution. Its usually better to leave the settings to auto
, so the camera can work it out. It may be work better to make sure the camera skips the first 50 or so frames, so it can execute its auto focus, etc functions before taking a frame. To install the fswebcam
package and set controls, do the following:
Photo Smearing
Sometimes you may see an artifact whereby a photographs "smears", as show below. If this problem persists, make sure you add the argument -rtsp_transport tcp
to the ffmpeg command
Arguments
This plugin only needs 1 mandatory argument, a config filename, which as described above contains the Linux command to take a frame. All the other options are as follows
AXIS Camera Control
These are high quality cameras made in Sweden. They can be controlled (pan/zoom/tilt/etc) using a (local) web API. See reference: https://www.axis.com/support/developer-support/axis-camera-application-platform/q-and-a. API guide is found at : https://www.axis.com/files/tech_notes/script_guide.pdf. For controlling the camera, the userid must have access rights to undertake the task. Examples below
VIVOTEK Camera Control
These are cameras made in Taiwan. Some of them can be controlled (pan/zoom/tilt/etc) using a (local) web API. See reference: http://download.vivotek.com/downloadfile/downloads/usersmanuals/fd8167manual_en.pdf. For controlling the camera, the userid must have access rights to undertake the task. Examples below
Last updated