I am trying to get the absolute wallclock timestamp in playback of recordings from the ONVIF server. As I understand it, this information should be present in the RTP header 0xABAC extension as defined by ONVIF.

The 0xABAC extension is mentioned here: Edge Storage Retrieval and RTSP/RTP timestamps - Third-party integrations | Milestone Documentation 2020 R2 (milestonesys.com)

I expected to see this information in the RTP playback stream once I set the proper headers in the RTSP SETUP and PLAY commands, but the resulting RTP stream does not include the header extension. Am I missing something?

Here is the RTSP sequence I am using:

SETUP rtsp://… RTSP/1.0

CSeq: 4

User-Agent: GStreamer/1.16.2

Transport: RTP/AVP;unicast;client_port=39226-39227

Require: onvif-replay

Authorization: Digest username=“testuser”, realm=“RtspServerLibrary”, nonce=“…”, uri=“rtsp://…/streamid=0”, response=“9b192a37ef3fe03f378b7a61bf599689”

Date: Thu, 26 Aug 2021 12:13:01 GMT

RTSP/1.0 200 OK

CSeq: 4

Date: Thu, Aug 26 2021 12:12:59 GMT

Session: CEAB7A2A

Transport: RTP/AVP;unicast;client_port=39226-39227;server_port=4000-4001

Media-Properties: Random-Access=2.5, Unlimited, Immutable, Scales=“-16:16”

PLAY rtsp://… RTSP/1.0

CSeq: 5

User-Agent: GStreamer/1.16.2

Range: clock=20210730T153038.0Z-

Require: onvif-replay

Rate-Control: no

Session: CEAB7A2A

Authorization: Digest username=“testuser”, realm=“RtspServerLibrary”, nonce=“…”, uri=“rtsp://…”, response=“ab798dfa01666f5b2a4628ca9a103c2a”

Date: Thu, 26 Aug 2021 12:13:01 GMT

RTSP/1.0 200 OK

Scale: 1

Range: clock=20210730T153038.0Z-

CSeq: 5

Date: Thu, Aug 26 2021 12:12:59 GMT

Session: CEAB7A2A

RTP-Info: url=rtsp://…;seq=4236;rtptime=8097

Hi Mark,

You don’t need to specify anything additionally.

RTP ONVIF playback header extension (ABAC) should present always on playback streams and never on live ones.