Field notes · 2026-11-15

Get only a time range from an ONVIF camera replay URI

After GetReplayUri, the RTSP link often looks like it covers the whole recording. How do you pull just a start–end time range from an ONVIF IP camera or recorder?

Answer

Answered by the Tracewind engineering team.

ONVIF GetReplayUri typically hands back an RTSP URL for a replay session. The time window is often enforced on PLAY, not baked into the URI. Send RTSP PLAY with a Range header, preferably clock= in UTC (start and end as ISO-8601 with Z), or npt= in seconds on firmwares that expect that. If the device ignores Range, check that FindRecordings / GetRecordingSearchResults actually returned a token scoped to the period you care about, and compare one PLAY from the vendor’s own VMS—Axis, Hikvision and others differ on query parameters, digest auth on RTSP, and rate control.

Once PLAY with Range works, save with an RTSP-capable tool such as FFmpeg pointed at the same URL, or stop the client at the end time. Support is uneven: some cameras advertise replay weakly and still expect a vendor HTTP or SDK export by time if you only need the file.

For investigation work on already-supported recorders, Tracewind Search can download footage by time range from Hikvision, Dahua and Uniview (with plugins for further brands), then index it on a local GPU machine. That path is for bringing recordings into a case, not for implementing the ONVIF stack yourself.

Where this question came from

The question is paraphrased from a public post on Stack Overflow (2026-11); the person who asked it has no link to us. Read the original thread

Stuck on something similar?

Send us a sample