Skip to main content

ONVIF Replay (Playback & Search)

Overview

ONVIF Replay provides standardized access to recorded video and audio from ONVIF‑compliant devices such as ITVDesk IPCam.

Unlike live streaming, replay allows clients to:

  • Retrieve video from a specific time in the past
  • Control playback direction and speed
  • Perform accurate event and transaction review

ONVIF Replay is a core component of ONVIF Profile G and is fully supported by ITVDesk. Replay is also compatible with standard RTSP players for forward playback.


Live Stream vs Replay Stream

It is important to understand the difference between live RTSP streaming and ONVIF replay streaming.

Live RTSP Stream

  • Delivers real‑time video
  • No historical access
  • Can be opened by generic RTSP players (e.g. VLC)

ONVIF Replay Stream

  • Delivers recorded video
  • Supports time‑based seeking
  • Requires ONVIF‑aware clients
  • Uses RTSP with additional ONVIF control headers

ONVIF Replay can be opened by generic RTSP players for forward playback, but advanced controls require ONVIF‑aware clients.


Why ONVIF Replay Is Required for POS Playback

In ITVDesk, POS Overlay integration records:

  • Video
  • POS overlay text
  • Transaction metadata (e.g. billId)
  • Exact UTC timestamps

When searching by POS receipt or time range, ITVDesk returns a Replay URI.

This replay stream:

  • Must start at an exact UTC timestamp
  • Must support forward / reverse playback
  • Must stay synchronized with POS data

Only ONVIF Replay‑capable clients can perform advanced controls (reverse playback and clock‑range seeking) correctly.


Generic RTSP Players (VLC/ffplay)

Generic RTSP players such as VLC and ffplay can open ITVDesk replay URLs for forward playback. They do not implement ONVIF replay control features.

Limitations include:

  • No support for Range: clock=UTC
  • No support for reverse playback
  • No ONVIF Profile G handling
  • No metadata or event synchronization

As a result:

  • Forward playback works
  • ONVIF time‑based seeking and reverse playback are not available
  • POS‑based lookup still works, but advanced replay controls require ONVIF clients
tip

Use ITVDesk VMS or another ONVIF-compatible client for advanced replay control.


How ONVIF Replay Works Internally

Time‑Based Playback Control

Playback is controlled using the RTSP PLAY command with UTC time ranges.

Example (forward playback):

Range: clock=20260114T080000Z-20260114T081000Z

Example (reverse playback):

Range: clock=20260114T081000Z-20260114T080000Z
Scale: -1.0

Playback Speed Control

The Scale header controls playback speed and direction:

Scale ValueDescription
1.0Normal forward playback
2.02× fast forward
-1.0Reverse playback
-2.0Fast reverse

RTP Timestamp Accuracy

ITVDesk embeds accurate UTC timestamps into the RTP stream during replay.

This enables:

  • Precise frame‑to‑time mapping
  • Correct reverse playback
  • Reliable synchronization with POS and events
tip

Accurate replay depends on correct system time and NTP synchronization.


tip

For replay operations, RTSP over TCP is strongly recommended.

Reasons:

  • Reliable packet delivery
  • Stable reverse and fast‑forward playback
  • No packet loss during seeking

UDP transport may cause:

  • Gaps in playback
  • Unstable rewind behavior

POS Integration with ONVIF Replay

ITVDesk extends standard ONVIF Replay by linking recordings to POS data.

Workflow:

  1. POS transaction is recorded with overlay
  2. Receipt ID (billId) is indexed
  3. Search API returns replay information
  4. ONVIF client opens replay stream
  5. Playback starts exactly at transaction time

This enables instant video lookup by receipt number.


Feature Detection

Clients can verify replay support using an RTSP Require header:

Require: onvif-replay

ITVDesk accepts replay even when this header is missing (for VLC/ffplay compatibility).


Best Practices

  • Use ITVDesk VMS for replay and POS review
  • Ensure system time is synchronized (NTP)
  • Use RTSP over TCP for replay
  • Use generic RTSP players only for forward playback

Summary

ONVIF Replay in ITVDesk provides:

  • Accurate time‑based playback
  • POS‑to‑video correlation
  • Forward and reverse playback
  • Enterprise‑grade forensic review

For replay and POS workflows, always use an ONVIF-compatible client, not a generic RTSP player.