Skip to main content

Onvif Replay Extension

The VAPIX® Onvif Replay Extension API makes it possible to receive a Real-time Transport Protocol (RTP) header extension with a Network Time Protocol (NTP) timestamp for video and/or audio streams on an Axis device. /axis-cgi/param.cgi can be used to enable Real-Time Streaming Protocol (RTSP) parameters as a default. Use cases include mapping a metadata object with a timestamp into a video frame within a video stream. The Onvif Streaming specification specifies the RTP header extension.

Identification​

  • Property: Properties.API.RTP.OnvifReplayExt
  • AXIS OS: 10.11 and later

Example

Check if the feature is supported. On an open terminal, send the following HTTP GET request to /axis-cgi/param.cgi:

curl --digest --user root:pass 'http://<servername>/axis-cgi/param.cgi?action=list&group=Properties.API.RTP.OnvifReplayExt'

A correct response will contain the property "Properties.API.RTP.OnvifReplayExt=yes".

Authentication​

For detailed information on how to authenticate requests to this API, please refer to Authentication.

Use cases​

Retrieve video stream​

Enable Onvif Replay Extension with the RTSP setup. NTP timestamps will be included in the RTP packets and the client can use them to map frames to metadata objects, synchronize video from different cameras, etc. RTP header extensions are enabled if the RTSP parameter is used.

Example

Open a streaming application, such as VLC, and a network URL (Media -> Open Network Stream):

rtsp://root:pass@<servername>:554/axis-media/media.amp?videocodec=h264&onvifreplayext=1

Check the network with, for example, a wireshark for an RTP header extension. This can also be used if you want to disable the feature in case it was enabled by default:

rtsp://root:pass@<servername>:554/axis-media/media.amp?videocodec=h264&onvifreplayext=0

Retrieve default values​

Check if the RTP header extension is enabled by default. If it is, the feature will be used even if the RTSP setup doesn't contain any extra parameters.

Example

Check if the feature is enabled by default. On an open terminal, send the following HTTP GET request to /axis-cgi/param.cgi:

curl --digest --user root:pass 'http://<servername>/axis-cgi/param.cgi?action=list&group=Network.RTP.OnvifReplayExt'

If the feature is supported, the response will contain Network.RTP.OnvifReplayExt=yes.

Enable Onvif Replay Extension​

Enable or disable the RTP header extension by default.

Example

Enable or disable the feature by default. On an open terminal, send the following HTTP GET request to /axis-cgi/param.cgi:

curl --digest --user root:pass 'http://<servername>/axis-cgi/param.cgi?action=update&Network.RTP.OnvifReplayExt=yes'

API specifications​

Check if the feature is supported​

Check if RTP with the OnvifReplayExt feature is supported.

Request​

curl --request GET \
--anyauth \
--user "<username>:<password>" \
"http://<servername>/axis-cgi/param.cgi?action=list&group=Properties.API.RTP.OnvifReplayExt"
ParameterAvailable valuesDescription
action=<string>listThe parameter action.
group=<string>Properties.API.RTP.OnvifReplayExtThe parameter group name.

Responses​

200 OK

Example value

Properties.API.RTP.OnvifReplayExt=yes

Schema​

Feature is supported

{
[
Properties.API.RTP.OnvifReplayExt=yes
]
}

Feature is not supported

{
[
# Error: Error -1 getting param in group 'Properties.API.RTP.OnvifReplayExt'
]
}

Check if the feature is enabled by default​

Check if RTP with the OnvifReplayExt feature is enabled by default.

Request​

curl --request GET \
--anyauth \
--user "<username>:<password>" \
"http://<servername>/axis-cgi/param.cgi?action=list&group=Network.RTP.OnvifReplayExt"
ParameterAvailable valuesDescription
action=<string>listThe parameter action.
group=<string>Network.RTP.OnvifReplayExtThe parameter group name.

Responses​

200 OK

Example value

Network.RTP.OnvifReplayExt=yes

Schema​

Feature is enabled

{
[
Network.RTP.OnvifReplayExt=yes
]
}

Feature is disabled


{
[
Network.RTP.OnvifReplayExt=no
]
}

Feature is not supported


{
[
# Error: Error -1 getting param in group 'Network.RTP.OnvifReplayExt'
]
}

Enable or disable the feature by default​

Enable RTP with the OnvifReplayExt feature by default.

Request​

curl --request GET \
--anyauth \
--user "<username>:<password>" \
"http://<servername>/axis-cgi/param.cgi?action=update&Network.RTP.OnvifReplayExt=yes"
ParameterAvailable valuesDescription
action=<string>updateThe parameter action.
Network.RTP.OnvifReplayExt=<string>yes, noThe new default value for Network.RTP.OnvifReplayExt.

Responses​

200 OK

Example value

OK

Schema​

Value is updated

{
[
OK
]
}

Feature is not supported

{
[
# Error: Error setting 'root.Network.RTP.OnvifReplayExt' to 'yes'!
]
}