Video cameras

Support the IP cameras with output in jpeg or mjpeg. The IP cameras is added by user.

Support the USB webcams of the UVC standard with support for hardware compression in MJPEG. The usb element of the webcam is automatically created in the system then camera connected to USB port.

Support for the AV camera is determined by the presence of the "camera=true" field in the response with the "system" tag.

Camera control is possible with the permission "cameras" in the profile of the user executing the request.

Access to the video stream is possible with the login and password, if they are specified by the user.

For USB camera stream URL is fixed: http://{login}:{password}@{CURRENT IP ADDRESS}/webcam/?action=stream

For AV camera stream URL is fixed: http://{login}:{password}@{CURRENT IP ADDRESS}/cam

For IP cameras stream URL is: http://{login}:{password}@{CURRENT IP ADDRESS}/ipcam_1 (2, 3 and so on)

For RTSP IP cameras stream URL is: http://{CURRENT IP ADDRESS}/rtspcam_604001 (here is camera element id)

Requests for management:

getelement - read the camera element data. Extra options are:

  • k - the user session ID;

  • id - the ID of the item.

 

USB camera (type="usb-cam")

USB camera (type="usb-cam")

<element id="403001" module="2031" num="1" clas="devhwr" type="usb-cam" name="USB Web camera" fps="10.0" username="" password="" resolution="640x480" proxyurl="/webcam/?action=stream" />

AV camera (type="av-cam")

AV camera (type="av-cam")

<element id="405001" module="2031" num="100" clas="devhwr" type="av-cam" name="AV camera" enable="1" resolution="720x576" proxyurl="/cam/" />

IP camera (type="ip-cam")

IP camera (type="ip-cam")

<element id="402001" module="2031" num="2" clas="devhwr" type="ip-cam" name="IP cam 01" url="http://192.168.0.35/webcam/?action=stream" fps="0" username="" password="" proxy="1" proxyurl="/ipcam_1/" />

RTSP IP camera (type="rtsp ip-cam")

RTSP IP camera (type="rtsp ip-cam")

<element id="406001" module="2031" num="1" clas="devhwr" type="rtsp ip-cam" name="rtsp_01" url="rtsp://192.168.0.222/user=admin_password=_channel=1_stream=0.sdp?real_stream" username="" password="" proxyurl="/rtspcam_406001" />

here:

  • proxyurl - an additional address for accessing the stream of cameras, for USB and AV cameras is fixed, for IP cameras, formed by a num field or id field;

  • proxy - enable (1) or disable (0) proxying for current IP camera.

updateelement - update data for USB or AV camera.

Extra options for USB camera are:

  • k - user session ID;

  • id - the identifier of the camera’s element;

  • name - the name of the element, the length is not more than 63 characters;

  • username - username if the camera model requires it;

  • password - password if the camera model requires it;

  • fps - the preferred number of frames per second when outputting images to the web interface;

  • resolution - for USB camera support 160x120, 320x240, 640x480.

Extra options for AV camera are:

  • k - user session ID;

  • id - the identifier of the camera’s element;

  • name - the name of the element, the length is not more than 63 characters;

  • enable - enable camera output to web interface (in any case) and cyclic record (if HDD is available);

  • resolution - for AV camera now support 720x576 only.

 

getcamfiles - returns a list of files created by the camera, only AV camera is supported now. Extra options are:

  • k - user session ID;

  • id - the identifier of the camera’s element.

Response for getcamfiles

Response for getcamfiles

<filelist id="405001">

<entry file="/satahdd/VT900-host900/video/405001/2020.06.02_12-27-11.mp4" time="1591100831" duration="190"/>

<entry file="/satahdd/VT900-host900/video/405001/2020.06.02_12-45-23.mp4" time="1591101923" duration="200"/>

<entry file="/satahdd/VT900-host900/video/405001/2020.06.02_12-51-05.mp4" time="1591102265" duration="190"/>

</filelist>

Each file is described in the "entry" tag, where:

  • file - the path to the file on the device, full path must include IP address, login and password hash (http://{login}:{hash}@192.168.0.102/satahdd/VT900-host900/video/405001/2020.06.02_12-45-23.mp4);

  • time - time of file in UTS;

  • duration - the recording duration in seconds.

 

addwebcam - add / modify the IP or RTSP IP camera. Extra options are:

  • k - user session ID;

  • id - the identifier of the camera element; if the identifier is absent, a new element is created; otherwise the existing one is modified;

  • name - the name of the element, the length is not more than 63 characters;

  • username - username if needed;

  • password - password if needed;

  • fps - the image update is performed 1 time in "fps" seconds. If field set as 0, it is considered that "url" field link to mjpeg stream (IP camera only);

  • url - path to the camera stream in a local network;

  • proxy - enable (1) or disable (0) proxying for current IP camera (IP camera only).

delwebcam - delete the IP camera. Extra options are:

  • k - user session ID;

  • id - the identifier of the camera element.