libonvif icon indicating copy to clipboard operation
libonvif copied to clipboard

Subscribe to camera Event

Open PHHENS opened this issue 8 months ago • 2 comments

Dear Developer, Is there a way to susbcribe to camera onvif events (motion detection, humanoid detection ...) ? Thanks

PHHENS avatar May 09 '25 08:05 PHHENS

Thank you so much for reaching out, your interest in the project is greatly appreciated. Unfortunately subscription to camera events is not implemented in this library. At the time the library was developed, which was some years ago, there was not good standardization by cameras of the subscription protocol. It was found at that time that different camera vendors would implement subscriptions in different ways that made it difficult to create a single library that would handle the different types correctly.

Also, as a matter of design philosophy, I personally am of the opinion that cameras should focus exclusively on processing the media streams and not be engaged with higher level analysis. Because the camera has limited computational power, it should not attempt to perform computationally expensive operations with limited resources. My opinion is that advanced analysis should be done by the host computer receiving the camera stream, as the host will have far more computational capacity for higher level analysis.

One thing to keep in mind is that this library does not follow standard design convention for ONVIF devices, and only implements a small subset of the ONVIF specification. There are other libraries out there that do implement the full specification, which might be a better fit for your purposes if the events subscription is a requirement for your design.

Best Regards,

Stephen

sr99622 avatar May 09 '25 13:05 sr99622

Dear Stephen,

Thank you for your answer.

At my point of view, nowadays, most cameras have a good support of standardization and impressive detection capabilities. Motion detection, needs very low computational capacities, and is now supported by every cameras. Many cameras, have computational capacities, allowing advanced analyzes like humanoid detection. In a parallel manner, video resolution goes higher and higher, even with newer codecs, this causes intensive network usage. So using camera hosted detection, for retrievieng the video only if there is an event allows to preserve network bandwidth ... The location of detection, is a compromise between computational capacities usage and network bandwith usage ;-)

I am dreaming of ONVIF CLI based server, with a CLI inspired by asterisk telephony server ;-)

Le ven. 9 mai 2025 à 06:43:46 -07:00:00, Stephen Rhodes @.***> a écrit :

sr99622 left a comment (sr99622/libonvif#118) https://github.com/sr99622/libonvif/issues/118#issuecomment-2866605017 Thank you so much for reaching out, your interest in the project is greatly appreciated. Unfortunately subscription to camera events is not implemented in this library. At the time the library was developed, which was some years ago, there was not good standardization by cameras of the subscription protocol. It was found at that time that different camera vendors would implement subscriptions in different ways that made it difficult to create a single library that would handle the different types correctly.

Also, as a matter of design philosophy, I personally am of the opinion that cameras should focus exclusively on processing the media streams and not be engaged with higher level analysis. Because the camera has limited computational power, it should not attempt to perform computationally expensive operations with limited resources. My opinion is that advanced analysis should be done by the host computer receiving the camera stream, as the host will have far more computational capacity for higher level analysis.

One thing to keep in mind is that this library does not follow standard design convention for ONVIF devices, and only implements a small subset of the ONVIF specification. There are other libraries out there that do implement the full specification, which might be a better fit for your purposes if the events subscription is a requirement for your design.

Best Regards,

Stephen

— Reply to this email directly, view it on GitHub https://github.com/sr99622/libonvif/issues/118#issuecomment-2866605017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2HQZFKQDQAVQPG7KXTK5D25SWJFAVCNFSM6AAAAAB4YPZHQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNRWGYYDKMBRG4. You are receiving this because you authored the thread.Message ID: @.***>

PHHENS avatar May 10 '25 08:05 PHHENS