0

How can I connect to an ONVIF (IP) camera in C++, in order to take snapshots and play live stream? Is there a relatively simple way to obtain that (similar to Python ONVIFCamera package)?

Thanks ahead, Shahar

Shahar Gino
  • 155
  • 3
  • 11
  • Personally, it took me a while till I could actually get something going. If you just aim to support one camera ventor/model, ONVIF might not be what you want to go with. – Niko May 16 '18 at 12:36

1 Answers1

1

I'll stick to this because you asked about C++ specifically, but there are also other solutions. This paper might be a good place to start

In theory it is simple: You can use gSOAPs' wsdl2h to create headers from the wsdl files (which can be obtained from onvif.org) and then generate your stub code using soapcpp2. You need to check in which wsdl file the service for the streaming is included and then find the corresponding function in C++. GetStreamUri is the service that is mandatory for an ip-camera that is Profile S compliant.

Niko
  • 642
  • 6
  • 12