Get list of video cameras and information about them
GET http://IP Address:port/prefix/camera/list − get all available original sources (cameras) of Axxon-domain.
The returned VIDEOSOURCEID identifiers will have the format as follows "HOSTNAME/ObjectType.Id/Endpoint.Name". Friendly name and other related meta data will also be received.
Parameter
Required
Description
limit
No
Determines the maximum number of returned results, the default value is 1000.
next_page
No
The value of the nextPageToken parameter, which will be in the response if the request returns not all the results. It is used to get the following values.
filter
No
Allows getting a subset of the results in accordance with the filter. Currently it can have the HOSTNAME or VIDEOSOURCEID values.
Attention!
If Office is specified as the Server name, then the GET http://IP-address:port/prefix/camera/list?filter=Office request will receive all video cameras of Office Server.
group_ids
No
List of the group identifiers to which the cameras should belong (see Get list of groups and their contents). It is possible to specify several identifiers using the separator "|". For example:
If no parameters are specified in the request, then the video will be received in the MJPEG format.
Parameter
Required
Description
format
No
Parameter values are "mp4", "hls".
Video can be received in the original format (without recompression) via HLS protocols. HLS protocol supports only H.264 format.
The "mp4" player allows to receive the original video in H.264 and H.265. In all other cases the server re-compresses it to MJPEG format.
Important!
If video is requested in the format that differs from the original one, then recompression will be performed, therefore, Server load will increase.
w, h
No
w – frame width, h – frame height.
Note
If h and w values are more than size of original video, the video will be received with original size.
Zooming out of width and height is available only discretely – in 2, 4, 8 times, etc. If specified sizes are not corresponding to 1/2, 1/4 etc. of original video size, the video will be received with size divisible by the original video size close to specified values.
Important!
The mp4 video is transferred without scaling.
fr
No
fps.
Important!
This parameter is relevant only for MJPEG video.
enable_token_auth
No
Get signed links to video streams.
enable_token_auth – enable authorization by token = 1.
valid_token_hours – signature validation time (in hours). The maximum value is a week. The default value is 12 hours.
valid_token_hours
No
key_frames
No
1 – playback only by key frames;
0 – original frame rate (default).
Sample request:
GET http://IPAddress:port/prefix/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&enable_token_auth=1&valid_token_hours=1
HLS video
HLS protocol video can be received in the original format only. The following parameters are in use when receiving HLS protocol video:
Parameter
Required
Description
keep_alive
No
Time in seconds in which the stream is to be kept alive.
hls_time
No
The segment length in seconds.
hls_list_size
No
The maximum number of playlist entries. If set to 0 the list file will contain all the segments.
hls_wrap
No
The number after which the segment filename number wraps. If set to 0 the number will be never wrapped.
Sample request:
GET http://127.0.0.1:80/live/media/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0?format=hls&keep_alive=60
Time in seconds in which the stream is to be kept alive.
keep_alive_url
The url to keep the stream alive.
stop_url
The url to stop the stream.
stream_url
The url to access the list of segments.
Important!
HLS protocol video becomes available with some delay (about 20 seconds). This is due to a feature of the HLS protocol: after receiving the link, it forms a cache of several video segments, and only after that the video starts playing.
To playback video via HLS protocol use the stream_url parameter from the response as follows:
RTSP protocol video is sent in the original format only.
Request to get the structure of the RTSP link: http://login:password@IP-address:Port/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?format=rtsp
If h and w values are more than size of original frame, the frame will be received with original size.
Zooming out of width and height is available only discretely – in 2, 4, 8 times, etc. If specified sizes are not corresponding to 1/2, 1/4 etc. of original frame size, the frame will be received with size divisible by the original frame size close to specified values.
crop_x
crop_y
crop_width
crop_height
No
crop_x – horizontal indent from the upper left corner. Possible values are 0 to 1. The default is 0.
crop_y – vertical indent from the upper left corner. Possible values are 0 to 1. The default is 0.
crop_width – the ratio of the original image width. Possible values are 0 to 1. The default is 1.
crop_height – the ratio of the original image hight. Possible values are 0 to 1. The default is 1.
Note
By default, the snapshot update period is 30 seconds. To change this value, create the NGP_SNAPSHOT_TIMEOUT system variable and set the required value in milliseconds (see Appendix 10. Creating system variable).
Sample request:
To get a snapshot in the original resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0.
To get a snapshot in 640*480 resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480.
To get the right lower particle of a snapshot: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?crop_x=0.5&crop_y=0.5&crop_width=0.5&crop_height=0.5.
To get the right lower particle of a snapshot in 640*480 resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&crop_x=0.5&crop_y=0.5&crop_width=0.5&crop_height=0.5.
waterlevel = 1 − the response will contain the current water level value, if the water level detection is created for the camera (see Configuring Water level detection).