Go to documentation repository
Documentation for Intellect 4.10.4. Documentation for other versions of Intellect is available too.
Video archive stream is sent on the same format as live video.
Getting list of records - "arc.intervals"
GET
Required parameters:
command=arc.intervals – command to receive list of records
video_in – camera ID.
time_from – start of interested time range.
Optional parameters:
time_to – start and end of interested time range.
max_count – maximal number of records in reply
split_threshold – time for combining several intervals (in seconds). Intervals, distance between which will be less than specified value, will be combined in one.
format – if absent, the response is in XML; if set to json, the response is JSON.
Example XMLresponse:
|
Example JSON response:
{ 'count' : 1, 'complete' : 'YES', 'sort' : 'INCREASE', 'cam' : '1', 'records' : [ { 'from' : '2019-01-22T12:41:10.144+03:00', 'to' : '2019-01-23T08:28:47.346+03:00' }] } |
Getting one frame from archive - "arc.frame"
GET
Required parameters:
command=arc.frame - command for one frame;
video_in - camera ID;
time - interested time.
Optional parameters:
range - time in seconds to specify search range of the nearest frame relatively the time parameter (the nearest frame all over archive is searched if this parameter is not specified);
imageWidth - width in pixels (is counted automatically with saving proportions if it isn't specified or equal 0);
imageHeight - height in pixels (is counted automatically with saving proportions if it isn't specified or equal 0);
fps - maximal frame frequency per second (if it isn't specified or equal 0, frame frequency won't be limited if).
In return http-headings and the nearest frame from the [time - range, time + range] range in the jpeg format will be received. The reply body will be empty if there is no frame in the range.
Getting video from archive - "arc.play"
GET
Required parameters:
command=arc.play - command to get video from archive;
video_in - camera ID;
time_from - start time of archive playing back.
Optional parameters:
time_to - completion time of archive playing back (if parameter is not specified, all archive will play back);
imageWidth - width in pixels (is counted automatically with saving proportions if it isn't specified or equal 0);
imageHeight - height in pixels (is counted automatically with saving proportions if it isn't specified or equal 0);
maximal frame frequency per second (if it isn't specified or equal 0, frame frequency won't be limited if).
End packet with newstate=closed and errcode=100 will be received when stream completion.
Getting list of records (the second way)
GET
http://example.com:[port]/web2/secure/archive/CAM:2/[2011-12-30|2011-12]?[splitThreshold=50]&[days=1]
splitThreshold – if difference between end of previous record and start of next record less than specified value (in milliseconds), than records will be combined in one. Specify splitTreshold=0. [default: 50] not to combine records.
days - number of days from the current, for which archive is required. [default: 1]
All time is interpreted as local time for server.
Get records for 18 November 2013 and combine all records, interval between which less than 2000 milliseconds:
http://example.com:[port]/web2/secure/archive/CAM:1/2013-10-18/?splitTreshold=2000
Get records for 10 days from 18 November 2013:
http://example.com:[port]/web2/secure/archive/CAM:1/2013-10-18/?days=10
XML:
|
JSON:
|
Getting records for a month (shows days of September at which there are records):
http://example.com:[port]/web2/secure/archive/CAM:2/2011-12/
XML:
|
JSON:
|
If there are no records, the following will be received
XML:
<days/>
JSON:
[]