From d721a8418bc6446088c61cc7f88aeb450e7af6a0 Mon Sep 17 00:00:00 2001 From: Venki Date: Wed, 1 Apr 2026 09:41:44 +0530 Subject: [PATCH 1/3] SRTP Playback Streaming 1. ONVIF Replay Service->GetServiceCapabilities->SupportedSRTPProtocolAlgorithms capability flag added to list supported cryptographic algorithms for SRTP Playback streaming if device supports SRTP Playback Streaming. 2. ONVIF Replay Service->GetReplayUri->SRTPProtocol ->The optional parameter defines the network protocol for SRTP Playback streaming as defined by trp:SRTPTransportProtocol. The Device should ignore StreamSetup parameters once this parameter is present. 3. ONVIF Replay Service->GetReplayConfiguration/SetReplayConfiguration->Configuration->SRTPProtocolAlgorithm->If SRTP playback streaming is supported, this optional parameter specifies the cryptographic algorithm to be used for the SRTP playback session, as defined by tt:SrtpSecurityAlgorithms. 4. ONVIF Replay Service Spec is updated with SRTP RTP Packet with playback header extension diagram. 5. ONVIF Replay Service Spec->Fault error codes related to SRTP Playback are added in GetReplayUri Faults. --- doc/Replay.xml | 47 +++++++++++++++++++++++----- doc/media/Streaming/SRTPPlayback.svg | 3 ++ wsdl/ver10/replay.wsdl | 20 +++++++++++- wsdl/ver10/schema/onvif.xsd | 5 +++ 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 doc/media/Streaming/SRTPPlayback.svg diff --git a/doc/Replay.xml b/doc/Replay.xml index 056f8f848..de4c7f8a2 100644 --- a/doc/Replay.xml +++ b/doc/Replay.xml @@ -4,19 +4,19 @@ Replay Control Service Specification Replay Control - 21.12 + 26.12 ONVIF™ www.onvif.org - December 2021 + December 2026 - 2008-2021 + 2008-2026 ONVIF™ All rights reserved. @@ -86,6 +86,14 @@ Change Request 2054, 2065 Fix typo in commands names and role names. + + 26.12 + Dec-2026 + + Venki, Aravapalli + + SRTP Playback support added. + @@ -180,8 +188,8 @@ Change Request 2054, 2065 Overview The replay service provides a mechanism for replay of stored video, audio and metadata. This mechanism may also be used to download data from the storage device so that export functionality can be provided. - The replay protocol is based on RTSP [RFC 2326]. However because RTSP does not directly support all of the requirements for replay, several extensions have been added to the protocol. In particular, an RTP header extension is defined to allow an absolute timestamp to be associated with each access unit (e.g. video frame), and to convey information about stream continuity. - The GetReplayUri command in the replay service returns the RTSP URL of a recording to allow it to be replayed using RTSP. + The replay protocol is based on RTSP [RFC 2326] and SRTP [RFC 3711]. However because RTSP does not directly support all of the requirements for replay, several extensions have been added to the protocol. In particular, an RTP header extension is defined to allow an absolute timestamp to be associated with each access unit (e.g. video frame), and to convey information about stream continuity. + The GetReplayUri command in the replay service returns the RTSP or SRTP URL of a recording to allow it to be replayed using RTSP or SRTP protocol. WSDL for this service is specified in http://www.onvif.org/ver10/replay.wsdl. The following table shows the namespace prefix mapping used throughout this specification. Referenced namespaces (with prefix) @@ -245,10 +253,10 @@ Change Request 2054, 2065 Replay Control - This section defines a service for mapping replay endpoints to URI for use in RTSP. + This section defines a service for mapping replay endpoints to URI for use in RTSP or SRTP protocol.
GetReplayUri - GetReplayUri requests a URI that can be used to initiate playback of a recorded stream using RTSP as the control protocol. The URI is valid only as it is specified in the response. A device supporting the Replay Service shall support the GetReplayUri command. + GetReplayUri requests a URI that can be used to initiate playback of a recorded stream using RTSP or RTSPS as the control protocol. The URI is valid only as it is specified in the response. A device supporting the Replay Service shall support the GetReplayUri command. request @@ -257,6 +265,8 @@ Change Request 2054, 2065 The StreamSetup element contains two parts. StreamType defines if a unicast or multicast media stream is requested. Transport specifies a chain of transport protocols defining the tunnelling of the media stream over different network protocols. RecordingToken [tt:RefernceToken] Indicates the recording to be streamed. + SRTPProtocol [xs:string] + The optional parameter defines the network protocol for SRTP Playback streaming as defined by tr2:TransportProtocol. The Device should ignore StreamSetup parameters once this parameter is present in the input request. @@ -275,6 +285,8 @@ Change Request 2054, 2065 Specification of StreamType or Transport part in StreamSetup causes conflict with other streams. env:Sender - ter:InvalidArgVal - ter:NoRecording The recording does not exist. + env:Sender - ter:InvalidArgVal - ter:InvalidSRTPProtocol + Specification of SRTPProtocol is not supported. @@ -287,7 +299,7 @@ Change Request 2054, 2065
ReplayConfiguration - The ReplayConfiguration provides optional configuration information. Currently it only contains the deprecated RTSP SessionTimeout which can be controlled via the RTSP layer. + The ReplayConfiguration provides optional configuration information. Currently RTSP SessionTimeout is deprecated and can be controlled via the RTSP layer.
SetReplayConfiguration @@ -404,8 +416,27 @@ Change Request 2054, 2065 over WebSocket and provides the WebSocket URI for replay as described in the ONVIF Streaming Specification section 5.1.1.5. + + SupportedSRTPProtocolAlgorithms + Indicates the list of supported cryptographic algorithms as defined by tt:SrtpSecurityAlgorithms if the device supports SRTP playback streaming. +
+
+ SRTP Playback - RTP Packet Layout + The following diagram illustrates the structure of an SRTP packet used by SRTP Playback Session. +It includes the RTP header, playback header extension, encrypted RTP payload, and the SRTP authentication tag. Encryption and authentication are handled via SRTP, as +specified in RFC 3711 for AES_CM_128_HMAC_SHA1_80, and in RFC 7714 for AEAD_AES_128_GCM and +AEAD_AES_256_GCM modes. +
+ Diagram of SRTP packet with Playback Header Extension + + + + + +
+
Revision History diff --git a/doc/media/Streaming/SRTPPlayback.svg b/doc/media/Streaming/SRTPPlayback.svg new file mode 100644 index 000000000..782edd527 --- /dev/null +++ b/doc/media/Streaming/SRTPPlayback.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/wsdl/ver10/replay.wsdl b/wsdl/ver10/replay.wsdl index 63a295e60..15345a614 100644 --- a/wsdl/ver10/replay.wsdl +++ b/wsdl/ver10/replay.wsdl @@ -55,6 +55,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO If playback streaming over WebSocket is supported, this shall return the RTSP WebSocket URI as described in Streaming Specification Section 5.1.1.5. + + + If SRTP playback streaming is supported, this shall return the list of supported cryptographic algorithms as defined by tt:SrtpSecurityAlgorithms. + + @@ -72,6 +77,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO The identifier of the recording to be streamed. + + + The optional parameter defines the network protocol for SRTP Playback streaming as defined by trp:SRTPTransportProtocol. The Device should ignore StreamSetup parameters once this parameter is present. + + @@ -120,6 +130,14 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + + + + @@ -155,7 +173,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Requests a URI that can be used to initiate playback of a recorded stream - using RTSP as the control protocol. The URI is valid only as it is + using RTSP or RTSPS as the control protocol. The URI is valid only as it is specified in the response. A device supporting the Replay Service shall support the GetReplayUri command. diff --git a/wsdl/ver10/schema/onvif.xsd b/wsdl/ver10/schema/onvif.xsd index f151172ca..864ea4e96 100755 --- a/wsdl/ver10/schema/onvif.xsd +++ b/wsdl/ver10/schema/onvif.xsd @@ -8729,6 +8729,11 @@ and sample rate. The RTSP session timeout. + + + If SRTP playback streaming is supported, this optional parameter specifies the cryptographic algorithm to be used for the SRTP playback session, as defined by tt:SrtpSecurityAlgorithms. + + From c9fec42bfa52acdec7e95f11ddab294c1c812bd0 Mon Sep 17 00:00:00 2001 From: Venki Date: Fri, 29 May 2026 23:25:57 +0530 Subject: [PATCH 2/3] ONVIF Replay Service GetReplayUri API update 1. The ONVIF Replay Service GetReplayUri API now uses the ReplayStreamSetup data structure. 2. onvif.xsd has been updated with the ReplayStreamSetup data structure. An optional SRTP attribute has been added to the ReplayStreamSetup data structure to request a URI for SRTP playback streaming when set to true. When set to false or omitted, the RTP and RTSP playback streaming behaviour remains unchanged. 3. The ONVIF Replay Control specification has been updated: GetReplayUri now uses the ReplayStreamSetup data structure, and an error code has been added for an invalid SRTP protocol when SRTP playback streaming is not supported by the device. --- doc/Replay.xml | 14 ++++++-------- wsdl/ver10/replay.wsdl | 19 +++---------------- wsdl/ver10/schema/onvif.xsd | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/doc/Replay.xml b/doc/Replay.xml index de4c7f8a2..943a2004a 100644 --- a/doc/Replay.xml +++ b/doc/Replay.xml @@ -261,12 +261,10 @@ Change Request 2054, 2065 request - StreamSetup [tt:StreamSetup] - The StreamSetup element contains two parts. StreamType defines if a unicast or multicast media stream is requested. Transport specifies a chain of transport protocols defining the tunnelling of the media stream over different network protocols. - RecordingToken [tt:RefernceToken] - Indicates the recording to be streamed. - SRTPProtocol [xs:string] - The optional parameter defines the network protocol for SRTP Playback streaming as defined by tr2:TransportProtocol. The Device should ignore StreamSetup parameters once this parameter is present in the input request. + StreamSetup [tt:ReplayStreamSetup] + The ReplayStreamSetup element contains two parts. StreamType defines whether a unicast or multicast media stream is requested. Transport specifies a chain of transport protocols defining the tunnelling of the media stream over different network protocols. The optional SRTP flag, when set to true, indicates that SRTP playback streaming is requested. + RecordingToken [tt:ReferenceToken] + Indicates the recording to be streamed. @@ -285,8 +283,8 @@ Change Request 2054, 2065 Specification of StreamType or Transport part in StreamSetup causes conflict with other streams. env:Sender - ter:InvalidArgVal - ter:NoRecording The recording does not exist. - env:Sender - ter:InvalidArgVal - ter:InvalidSRTPProtocol - Specification of SRTPProtocol is not supported. + env:Sender - ter:InvalidArgVal - ter:InvalidSRTPProtocol + The specified SRTP protocol algorithm is not supported by the device. diff --git a/wsdl/ver10/replay.wsdl b/wsdl/ver10/replay.wsdl index 15345a614..5b6d16c05 100644 --- a/wsdl/ver10/replay.wsdl +++ b/wsdl/ver10/replay.wsdl @@ -67,7 +67,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - + Specifies the connection parameters to be used for the stream. The URI that is returned may depend on these parameters. @@ -76,12 +76,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO The identifier of the recording to be streamed. - - - - The optional parameter defines the network protocol for SRTP Playback streaming as defined by trp:SRTPTransportProtocol. The Device should ignore StreamSetup parameters once this parameter is present. - - + @@ -129,15 +124,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - - - - - - - - - + diff --git a/wsdl/ver10/schema/onvif.xsd b/wsdl/ver10/schema/onvif.xsd index 864ea4e96..211f9a06b 100755 --- a/wsdl/ver10/schema/onvif.xsd +++ b/wsdl/ver10/schema/onvif.xsd @@ -8739,6 +8739,23 @@ and sample rate. + + + + + Defines if a multicast or unicast stream is requested + + + + + + + When set to true, this flag indicates that SRTP playback streaming is requested. When set to false or omitted, RTP and RTSP playback streaming behaviour remains unchanged. + + + + + From bb92d760babc34661684faf0b392e1fdde515a09 Mon Sep 17 00:00:00 2001 From: Ottavio Campana <68333584+ocampana-videotec@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:12:31 +0200 Subject: [PATCH 3/3] Removing comma the breaks the build Between type="xs:string" and minOccurs there is a comma that brakes the syntax --- wsdl/ver10/schema/onvif.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsdl/ver10/schema/onvif.xsd b/wsdl/ver10/schema/onvif.xsd index 211f9a06b..bcb769eb5 100755 --- a/wsdl/ver10/schema/onvif.xsd +++ b/wsdl/ver10/schema/onvif.xsd @@ -8729,7 +8729,7 @@ and sample rate. The RTSP session timeout. - + If SRTP playback streaming is supported, this optional parameter specifies the cryptographic algorithm to be used for the SRTP playback session, as defined by tt:SrtpSecurityAlgorithms.