Documentation for Intellect 4.10.4. Documentation for other versions of Intellect is available too.

Previous page PTZ control  Notification Next page


In the section:

Video archive stream is sent on the same format as live video.

Getting list of records  - "arc.intervals"

GET

http://example.com:[port]/web2/secure/video/action.do?version=4.9.0.0&sessionid=29101F1&video_in=CAM:5&command=arc.intervals&time_from=2013-03-20T00:00:00.000+04:00&time_to=2013-03-22T23:59:59.999+04:00&max_count=100&split_threshold=10399&login=XXX&password=YYY

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: 

<?xml version="1.0" encoding="UTF-8"?>

<records count="1" complete="YES" sort="INCREASE">

    <record>

        <from>2011-09-01T00:00:00-05:00</from>

        <to>2011-09-01T00:00:35-05:00</to>

    </record>

    <record>

        <from>2011-09-01T00:00:35-05:00</from>

        <to>2011-09-01T00:01:10-05:00</to>

    </record>

</records>


 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

http://example.com:[port]/web2/secure/video/action.do?version=4.9.0.0&sessionid=29101F1&video_in=CAM:5&command=arc.frame&time=2013-03-22T13:04:52.312+04:00&range=0.1&login=XXX&password=YYY

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

http://example.com:[port]/web2/secure/video/action.do?version=4.9.0.0&sessionid=29101F1&video_in=CAM:5&command=arc.play&time_from=2013-03-22T13:04:52.312+04:00&time_to=2013-03-22T13:16:31.873+04:00&login=XXX&password=YYY

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:


<?xml version="1.0" encoding="UTF-16"?>

<days>

    <day>

        <id>2013-11-10T00:00:00-02:00</id>

        <records>

            <from>2013-11-10T18:44:01.579-02:00</from>

            <to>2013-11-10T18:44:09.717-02:00</to>

        </records>

    </day>

    <day>

        <id>2013-11-18T00:00:00-02:00</id>

        <records>

            <from>2013-11-18T18:38:30.252-02:00</from>

            <to>2013-11-18T18:38:56.942-02:00</to>

        </records>

        <records>

            <from>2013-11-18T18:39:08.321-02:00</from>

            <to>2013-11-18T18:39:10.080-02:00</to>

        </records>

    </day>

</days>


JSON:


[ {

  "id" : "2013-11-10T00:00:00.000-02:00",

  "records" : [ {

    "from" : "2013-11-10T18:44:01.579-02:00",

    "to" : "2013-11-10T18:44:09.717-02:00"

  } ]

}, {

  "id" : "2013-11-18T00:00:00.000-02:00",

  "records" : [ {

    "from" : "2013-11-18T18:38:30.252-02:00",

    "to" : "2013-11-18T18:38:56.942-02:00"

  }, {

    "from" : "2013-11-18T18:39:08.321-02:00",

    "to" : "2013-11-18T18:39:10.080-02:00"

  } ]

} ]


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:


<?xml version="1.0" encoding="UTF-8"?>

<days>

    <day>

        <id>2011-09-02T00:00:00-05:00</id>

    </day>

    <day>

        <id>2011-09-03T00:00:00-05:00</id>

    </day>

    <day>

        <id>2011-09-05T00:00:00-05:00</id>

    </day>

</days>


JSON:


[ {

  "id" : "2011-09-01T00:00:00-0500",

  "records" : [ ]

}, {

  "id" : "2011-09-03T00:00:00-0500",

  "records" : [ ]

}, {

  "id" : "2011-09-01T00:00:00-0500",

  "records" : [ ]

} ]


If there are no records, the following will be received

XML:

<days/>

JSON:

[]


  • No labels