Skip to main content

Adding cameras to my EVVR Container using a config file

Updated this week

Introduction

It is possible to add cameras to your EVVR Container using a configuration file - either using environment variables when creating the container, or within a seed configuration file.

You have multiple options for configuring your container using a config file - including 'burning in these settings using environment variables, or using a seed config file to provide initial settings for your users.

Don't mix and match different config methods!

It is possible to add different cameras using different methods (e.g. add a camera using the web interface, then add another via environment variables).

This is not recommended, as the web interface will allow editing of some cameras, and not others, and this can be confusing.

To add one or more cameras to your EVVR Container, you can add the following setting, and optionally, decide how PTZ should operate when controlled by alarm actions:

Setting

Description

EV_CHANNEL_<X>

You can add an entry per camera, where you replace <X> with the position of the camera in the list of inputs. i.e. EV_CHANNEL_0 defines the first camera, EV_CHANNEL_1 defines the second camera, and so on. Valid channels are currently 0 to 15.

The following sections outline the three different types of camera you can add.

EV_PTZ_ACTION_OVERRIDE

Selects whether a PTZ command sent by a user overrides a PTZ operation triggered by an alarm rule action.

Can be set true / false (default)

There are three different types of cameras you can add:

Each of which has its own list of options you can add. You can mix and match any of the above in your configuration file (but with a maximum limit of 2 for USB cameras).

Add an ONVIF camera

Unfortunately, you cannot automatically discover ONVIF cameras on your host's network, as the EVVR Container cannot scan beyond the internal Docker network.

You must add the camera manually, using a minimum of its IP Address, a friendly name, and usually a login username/password to access the camera.

There are also a number of further settings you can set to customise how the encoder uses the camera - these mirror the options available in the web interface, and it is recommended to test/obtain any desired settings using the web interface first, before transferring to your config file:

Option

Value

Default

type
(required)

ONVIF

n/a

name
(required)

<Friendly Name>
A unique name that will help you identify the camera in the user interface.

n/a

ip_address
(required)

<IP Address of the camera>

n/a

user_name
(optional)

<camera user name>
Username for camera authentication - not required, but most cameras will need this setting.

None

password
(optional)

<camera password>
Password for camera authentication - not required, but most cameras will need this setting.

None

transport
(optional)

tcp / udp

Network transport to send the video - tcp is normally the correct option.

tcp

port
(optional)

<ONVIF port number>
The camera's ONVIF service port

80

bitrate
(optional)

Automatically configure the camera's video bitrate/settings - use one of:

  • DoNotChange - Don't set

  • Normal - Set to 1080p @ 3 mbit/s

  • High - Set to 1080p @ 6 mbit/s

  • HighMovement - Set to 1080p @ 10 mbit/s

This only happens once, during the initial setup of the container.

DoNotChange

configure_audio
(optional)

Disabled / Enabled
If enabled, the camera's audio features will be enabled and configured to a compatible audio codec.

This only happens once, during the initial setup of the container.

Disabled

metadata
(optional)

true / false
Enable/disable the passing through of ONVIF Profile M metadata

true

metadata_compression
(optional)

Reduce the size of image metadata to save bandwidth - use one of:

  • Original - send images as-is

  • Scale75Percent - use 75% JPEG quality

  • Scale50Percent - use 50% JPEG quality

  • Scale25Percent - use 25% JPEG quality

  • RemoveImages - remove images entirely

Original

pan_speed
(optional)

[1-100]
Tweak how quickly to pan camera during PTZ usage

75

tilt_speed
(optional)

[1-100]
Tweak how quickly to tilt camera during PTZ usage

75

zoom_speed
(optional)

[1-100]
Tweak how quickly to zoom camera during PTZ usage

75

ONVIF Examples

This entry is the bare minimum required to add an ONVIF camera that requires a login (most do) - this should all be on the same line:

EV_CHANNEL_0={"type":"ONVIF","name":"Canon","ip_address":"10.0.0.20", "user_name":"root","password":"PW!23456"}

This entry extends the above to automatically configure the ONVIF video stream to High Quality, and slows the PTZ zoom speed down from 75 to 50:

EV_CHANNEL_1={"type":"ONVIF","name":"Bosch","ip_address":"10.0.0.21", "user_name":"root","password":"PW!23456","bitrate":"High","zoom_speed":"50"}

Add an RTSP video feed

You can add RTSP video feeds to your EVVR Container as long as they contain 720p or 1080p H.264.

You can use the following settings:

Option

Value

Default

type
(required)

RTSP

n/a

name
(required)

<Friendly Name>
A unique name that will help you identify the camera in the user interface.

n/a

url
(required)

rtsp://<username>:<password>@<ip address:port>/<endpoint>

The full RTSP URL of your video feed. If not specified, port 554 is assumed.

n/a

transport
(optional)

tcp / udp

Network transport to send the video - tcp is normally the correct option.

tcp

RTSP Examples

This entry is the bare minimum required to add an RTSP camera that doesn't require a login - this should all be on the same line:

EV_CHANNEL_1={"type":"RTSP","name":"RTSP Camera", "url":"rtsp://10.152.0.36/black-car.mp4"}

This entry extends the above to specify login details, an RTSP port, and specificy the network transport:

EV_CHANNEL_2={"type":"RTSP","name":"RTSP Camera 2", "url":"rtsp://admin@password:10.152.0.36:554/white-car.mp4","transport":"tcp"}

Adding a USB camera

Automatically add a USB camera to the given stream index. You can not manually select a particular USB camera - it will add the first compatible USB camera it finds.

You can add up to two USB cameras to your EVVR Container (using multiple EV_CHANNEL_<X> entries). The second entry will skip any USB camera already added, and add the next unused USB camera.

Option

Value

Default

type
(required)

AUTO_USB

n/a

name
(optional)

<Friendly Name>
A unique name that will help you identify the camera in the user interface.

If not supplied, a name is auto-generated from the manufacturer's name.

USB Examples

Simplest entry to add the first USB camera that is found:

EV_CHANNEL_1={"type":"AUTO_USB"}

The entry also sets the camera name, overriding the manufacturer's name:

EV_CHANNEL_2={"type":"AUTO_USB","name":"USB Cam 1"}

Did this answer your question?