Anybody use an ONVIF library with Python to control PTZ cameras?

I did manage to use the onvif-zeep library at one point to pull some info from the camera, so it made some kind of connection. And I can use CV2 to see camera live feeds, but I’ve yet to be able to control a camera pan, tilt, or zoom in Python. Would love some help here if somebody has done it.

Edit: if anybody stumbles on this thread and is having issues, I managed to figure it out simply by using HTTP Requests in Python rather than using an ONVIF library thanks to this guy’s GitHub for using a joystick to control cameras.

I have not used ONVIF yet but while working with llamacpp .info I realized handling camera controls in Python can get tricky. Would love to hear if ONVIF works smoothly for PTZ.

1 Like

Good opportunity to update. For my camera, my HTTP REQUESTS worked with panning the camera up and down and stopping it, but I couldn’t get any other requests to work despite having the API guide. No left or right, no zoom, etc.

So I’m going to try ONVIF again but it seems like an uphill battle at least for the cameras I’m using.