Xbox - PTZ Controller

Nov 4, 2022

//

2 min read

We recently purchased PTZ Cameras, at TWEC, for streaming our services online. These cameras work great, except that their controls don't flip when the image is flipped (we mounted them upside down). So left was right and up was down, and vice-versa 🙄.

The solution was simple. Since these cameras use the ONVIF protocol - find a library on Github and write a program to control the cameras and flip their commands.

"At the same time, we use VMix as our streaming software and it can be quite tedious switching from VMix to a Chrome tab to control the cameras via their online controls."...

The solution was a bit more adventurous. 

Use an Xbox controller (I had one laying around) and pipe its command through a script that calls the relevant ONVIF commands!

Pygame provided all most of the functions for an Xbox controller, and python-onvif-zeep was the library of choice for the ONVIF commands.

 

...it worked like a charm.

GITHUB REPO: https://github.com/josiahmaharaj/xbox-ptz

logo

©2022 Josiah Maharaj.