onvif / specs

ONVIF Network Interface Specifications
Other
341 stars 93 forks source link

Questionable client side SET_PARAMETER recommendation in Streaming Spec #310

Closed HansBusch closed 1 year ago

HansBusch commented 1 year ago

Section 5.2.2.2 of the Streaming Specification defines timeout and keep-alive handling.

Beside a number of strong requirements it contains a client side recommendation to use SET_PARAMETER as keep alive. Unfortunately the underlying RTSP 1.0 specification does not mandate support for this function. Section 1.5 states " Some servers may not support setting stream parameters and thus not support GET_PARAMETER and SET_PARAMETER.".

As far as I could figure out ONVIF DTT tests SET_PARAMETER in case of Media1 MJPEG streaming but not for other test cases.

Question is whether to drop the client recommendation?

kieran242 commented 1 year ago

I had been working on client side and streaming a few different manufacturers lately and captured PCAP files.

Upon review of them I have not seen the use of "SET_PARAMETER" at all as an RTSP request under RTSP/1.0 . The RTSP/1.0 Response OPTIONS list states the method can be called but I have not seen it's use.

I have further reviewed the ONVIF Streaming Spec "5.2.2.2Timeout and keep-alive handling" and the fact that it is noted as an "optional method to keep an RTSP session alive".

My response to your question is that I agree with dropping the client recommendation.

venki5685 commented 1 year ago

Both GET_PARAMETER and SET_PARAMETER are optional in RTSP 1.0 specification as per RFC 2326. Now if we are going to drop client side recommendation to use SET_PARAMETER for RTSP keep-alive , what is the recommended RTSP method to be used in both device and client for RTSP Keep-alive?

HansBusch commented 1 year ago

Hi Venki, ONVIF specifications typically work with device side requirements, because it is hard to request a behavior from client side when device is not required to provide the functionality. My colleagues from the client side stumbled across this problem when they realized that not all devices where behaving as expected when using SET_PARAMETER. In first place they requested me to add a device side requirement, but I don't think that such a change would be backward compatible.

venki5685 commented 1 year ago

Hi Hans, I understood the issue now. Since SET_PARAMETER is not mandatory for the device as per RFC 2326, making client mandatory does not make any sense, so we are relaxing client side requirement for SET_PARAMETER.

Then ONVIF streaming specification needs to clarify how client can extended the RTSP session using Keep Alive.

Example: Client first query the device supported RTSP methods using RTSP Options and then use either GET_PARAMETER or SET_PAMETER for RTSP Keep Alive if the device supports it.

HansBusch commented 1 year ago

Further discussion please on the PR.