Skip to main content

SearchByTime

Application Guide

For video snapshot and recording search examples, see the Video Snapshots & Recording Search application guide.

Searches for recorded video segments within a specified time range and recording type filter. Use this to find available recordings before constructing RTSP playback URLs.

FieldValue
Endpoint/SearchByTime[/channelId]
MethodPOST or GET
ProductsIPC, NVR
Channel IDOptional (default 1)

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0" xmlns="http://www.ipc.com/ver10">
<search>
<recTypes type="list">
<itemType type="recType"></itemType>
<item>manual</item>
<item>schedule</item>
<item>motion</item>
</recTypes>
<starttime type="string"><![CDATA[2017-06-30 00:00:00]]></starttime>
<endtime type="string"><![CDATA[2017-06-30 23:59:59]]></endtime>
</search>
</config>

Parameters

ParameterTypeFormatDescription
recTypesliststring itemsRecording types to search for. Use values from GetRecordType.
starttimestringYYYY-MM-DD HH:MM:SSStart of the search time range
endtimestringYYYY-MM-DD HH:MM:SSEnd of the search time range

RTSP Playback URL

Once you have identified a recording segment, construct an RTSP URL to play it back:

rtsp://<host>[:rtspPort]/chID=0&date=2014-01-09&time=15:07:28&timelen=200&streamType=main&action=playback
ParameterDescription
chIDChannel ID (0-based)
dateRecording date (YYYY-MM-DD)
timeRecording start time (HH:MM:SS)
timelenPlayback duration in seconds
streamTypemain (full resolution) or sub (lower resolution)
actionplayback

Notes

  • The time range format uses YYYY-MM-DD HH:MM:SS wrapped in CDATA tags.
  • You can include multiple recording types in the recTypes list to search across different trigger types simultaneously.
  • On NVR systems, include the channelId in the URL to search recordings for a specific camera channel.
  • The RTSP playback URL uses 0-based channel indexing (chID=0 for channel 1).