Programm zur Steuerung von bis zu 2 Logitech PTZ 2 Pro Kameras

Mit Corona kamen wir auch als Kirchengemeinde schnell zum Streamen unserer Gottesdienste. Die Lernkurve war steil und für mich ziemlich heftig.

Selten musste ich so viele Dinge auf einmal unter den Hut bringen und lernen und zeitgleich ein Team aufbauen, dass das Videostreaming seit Mai 2020 aufrechterhält.
Und wie es aussieht, wird es keinen Schritt mehr zurückgeben. Jetzt haben wir Streaming als bleibenden Dienst mit einem festen Mitarbeiterteam und die Gemeinde hat sich mehr oder weniger auch an diesen Luxus gewöhnt. Das ist positiv wie negativ (aber das ist vielleicht etwas für einen späteren Blogartikel).

In kürzester Zeit musste ich mich für eine Technik, Hardware und Software entscheiden. Dabei sollte die Lösung natürlich preiswert, einfach, kompatibel und billig sein.
Was auch sonst?

Wir haben uns entschieden ohne Video Schnittboard (ATEM Board oder ähnliches) zu arbeiten. Der Preis für digitale Kameras schockte mich etwas, zudem fand ich festinstallierte Kameras zu statisch.

Ich dann schnell kam zu der folgenden Lösung:

  • OBS als primäre Software, auch zur Schnittsteuerung und zur Auswahl der Szenen
  • 2 angeschlossene Logitech PTZ 2 Pro (am Anfang war es nur eine)
  • Ein Elgato HD 60S+ um unsere Beamer Ausgabe in den Stream einzubinden
  • Unser Sound wird auch über das Elgato HD 60S+ direkt aus dem Mischpult abgegriffen.
  • Ein weiteres USB-Mikro, als Raummikrofon bei Bedarf
  • Gestreamt wird direkt über YouTube
  • Als Hardware wurde ein preiswerter (hässlicher) HP-Laptop mit einem schnellen Intel I5 Prozessor angeschafft (500€), aber die Hardware ist schnell gut und stabil auch durch die OBS QSV Hardware Unterstützung.
  • Dazu noch einige aktive USB-2 Kabel mit 10m Länge.

Alles in allem sind wir damit unter 1.800€ geblieben.

Die Logitech PTZ 2 Pro erschien mir mit einem 10fach Zoom und der hohen Bildqualität als ideal und preiswerte Kamera. Ich habe beide Kameras als B-Ware (1 Jahr Garantie) für um die 450€ erwerben können.

Beim Start des Streamens mit einer Kamera konnten wir noch die Fernbedienung nutzen, aber das war hakelig. Zudem stört das Zoomen und Scharfstellen, das Streaming-Erlebnis. Das Video wirkt nervös und unprofessionell.

Also wurde eine zweite Kamera angeschafft. Damit können wir nun überblenden von einer Szene in die andere (was sehr professionell wirkt). Eine neue Kameraposition anfahren mit der inaktiven Kamera und wieder überblenden, nun ganz einfach.
Das Problem war nur die Steuerung von zwei Kameras.

Man hätte es einfach machen können und eine Kamera mit fester Position nutzen können und bei der anderen die PTZ (Pan Tilt Zoom) Funktionen. Damit hätte man zumindest ein flexibles Überblenden ermöglicht.

Aber auch das „Zielen“ mit der Fernbedienung auf die Kamera war während des Streamens suboptimal. Zudem die Kamera hinter dem Mitarbeiter an der Wand montiert war. Also Blick nach vorne auf OBS und mit der Fernbedienung hinter sich zielen.

Idealer wäre also eine Softwaresteuerung für beide Kameras.
Also habe ich geschaut was man machen kann, um die Kameras per Software zu steuern. Denn eigentlich müsste sich alles über das DirectInput Interface von Windows steuern lassen.

Herausgekommen ist ein kleines PTZControll.exe. Dieses kann alle Kamera Features komplett ausnutzen.

Oberfläche der Kamera Steuerung

Die Funktionen des kleinen Tools sind:

  • Automatischer Erkennung und Steuerung von bis zu 2 Logitech PTZ 2 Pro Kameras.
  • 8 Kamera Presets
  • Kamera Presets können direkt in der App (Memory-Taste) umprogrammiert werden
  • Farbige Darstellung des aktuellen Presets
  • Selbst definierbare Tooltips zur Erklärung der Preset Positionen
  • Einfache Bedienung von Pan / Tilt / Zoom im Interface
  • Kleines Interface das direkt immer direkt im Vordergrund bleibt.

Das PTZControl.exe unterstützt 2 Steuerungsvarianten für den Motor. Das eine ist die direkte Schrittsteuerung über eine Logitech internes Interface. Die andere benutzt einen Timer mit einer „Motor an/aus“ Steuerung. Der Timer ist programmierbar (Standard 70msec). Die zweite Steuerung erwies sich als etwas feiner.

Das Programm kann frei heruntergeladen und genutzt werden.
Nutzung auf eigenes Risiko und Gefahr.

Anmerkung zum Programm: Das Programm wurde mit C++ auf VS-2019 entwickelt und nutzt die MFC und ATL.

Wichtig: Das Programm sucht nach Kameras die den Text „PTZ 2 Pro“ im Namen haben und verwendet nur diese. Ich habe keine Teste mit anderen PTZ Kameras gemacht.

Es gibt eine neue Version des PTZControl.exe.
Siehe hier.

21 Gedanken zu „Programm zur Steuerung von bis zu 2 Logitech PTZ 2 Pro Kameras“

  1. Hallo,
    Ik heb met interesse PTZControl.exe bekeken. Ik wil in onze kerk de presets aansturen rechtstreeks vanuit OBS met OBS Lua Scene Execute Command . Ik heb daar wel de PTZ PRO 2 commando’s voor nodig. Bent U genegen deze code’s te verstrekken?
    met vriendelijke groet,
    Ton Traas

  2. Mr Richter, I ran across your posting in the OBS forums regarding the PTZControl.exe you created for controlling the Logitech PTZ Pro 2 camera. I’ve not had any luck getting it to recognize my PTZ Pro 2 on a Windows 10 machine, wondering if I have the latest version or if you have any documentation. I, too, am a developer although I haven’t worked in C/C++ in a while. Would you be willing to provide any troubleshooting assistance or documentation on your program? the only tool I have found is Logitech’s own Camera Settings which is severely lacking. Thank you.

    1. The name of the USB device must contain the text „PTZ 2 Pro“
      It will recognize any camera when you define the name in the registry.
      Create an entry under
      HKEY_CURRENT_USER\SOFTWARE\MRi-Software\PTZControl\Device

      If you already started my program the registry key must exist.
      Create a new REG_SZ entry with the name „DeviceName“.

      Enter the name of the camera that is shown in the device name. Any part of it will be sufficient. Default is „PTZ Pro 2“.
      Try PTZ
      Enter a name part that exists in you camera name.

  3. Hi
    Klasse Software
    Unterstützt die Anwendung auch die Logitech Rally Cameras ?
    bzw wäre es möglich die Anwendung um diese Camera zu erweitern ?

    1. Technisch vermute ich mal, dass dies möglich ist.
      Es kann sein, dass der Kamera Name nicht erkannt wird. Aber die Erkennung kann man umschalten.

      In der Registry den folgenden Schlüssel eintragen.
      HKEY_CURRENT_USER\SOFTWARE\MRi-Software\PTZControl\Device

      Wenn das Programm schon mal gestartet wurde einfach einen REG_SZ Eintrag erzeugen mit Name „DeviceName“.
      Kameraname ermitteln. Oder zumindest einen Teil des Namens. Default ist „PTZ Pro 2“.
      Versuch es mit PTZ oder Rally!

  4. Hi,
    Seems like your software do indeed work on the Logitech Rally.

    But would it be possible to make to make the application a little larger? The windows and the buttons are very small on a 4k monitor. 🙂

    1. Great little program but have the same issue, the window is too small on a 16″ laptop screen. Is there any way to control the size?

      Using PTZ 2 Pro camera and laptop with VOICEMEETER software to control video and sound for hybrid meetings (in-house and Zoom) for a seniors club.

      1. If you screen resolution is so high just increase the Display text setting.
        Goto the System Settings -> Display Settings -> Set the percentage scale to 125%. My application will appear larger as all other elements will do too.

  5. Hallo,
    Ich habe mir PTZControl.exe mit Interesse angesehen. In unserer Kirche möchte ich die Presets direkt aus OBS mit OBS Lua Scene Execute Command steuern. Dafür benötige ich die PTZ PRO 2-Befehle. Sind Sie bereit, diese Codes bereitzustellen?
    Mit freundlichen Grüße,
    Ton Traas

    1. Man kann nicht einfach „irgendwelche Befehle senden… man muss die Windows Device API benutzen.
      Nach meinen Wissen ist das nicht möglich. Sie müssten sich ein spezielles COM Modul bauen und damit dann die Web CAMs steuern.

  6. It would be cool if you could specify keyboard shortcuts that are combinations to trigger presets, like how you can in the Logitech G hub for gaming buttons. That way we could trigger it from programs like Touch Portal or if it was incorporated into touch portal as a plugin. It would be MUCH more capable for live streaming applications.

    1. The Problem is, that usually this program hasn’t the focus. So it will never receive any keyboard input. Best way would be to register global Hotkeys like Alt+number, or a kombination Alt+Shift+number.
      I will think about that. And may be add this feature.

  7. Hallo,

    bevor ich eine Logitech PTZ Pro 2 kaufe, wollte ich sichergehen, dass man die Kamera auch über eine Software steuern kann.
    Vielen Dank, dass du dieses Tool bereit gestellt hast!

    Jetzt habe ich gesehen, dass es in OBS ein Plugin gibt, mit dem man auch PTZ-Kameras steuern kann: https://obsproject.com/forum/resources/ptz-controls.1284/

    Funktioniert dieses Plugin auch mit der Logitech PTZ Pro 2?
    Dann könnte man nämlich in OBS Szenen hinterlegen, die dann ein bestimmtes Preset der Kamera ansteuern. Oder funktioniert das auch ohne dieses Plugin?

    Gruß
    Etienne

    1. Dieses Plugin kann nicht für die Logitech PTZ Pro und Nachfolger funktionieren, weil diese kein VISCA Protokoll unterstützt.
      Dieses Plugin geht nur für dieses eine Protokoll.

      An eine Plugin Programmierung für OBS habe ich mich nicht herangewagt. Da wäre zu viel zu noch lernen gewesen.
      Ich halte die Logitech PTZ 2 Pro (von der wir immerhin 2 besitzen) immer noch für eine gute Wahl.

  8. Ist es möglich oder geplant die Steuerung für die Kameras auch für Linux oder MacOS zu bekommen, habe bisher nichts vergleichbares für diese Systeme gefunden.

    Danke.

  9. Our A/V PC’s screen is projected on the big screen at church and the PTC device is connected to the PC by a long cable. We also run Zoom on the PC in full screen mode and spotlight it, so that what Zoomer’s and the congregation see are the same (close up views of the speaker, musicians, participants, and overall congregation). We use the remote for the one camera, but now want to add a second camera. I am scratching my head as to how I can use the controls on some computer screen other than the PC that the camera’s are connected to. If I show the controls on the main A/V PC then it will be seen on the big screen each time I control either camera. Is it possible for the software with the controls to be on a separate laptop whereas the PTC cameras are connected to the main projection PC? Both PCs would be on the same WiFi network and both would be on Zoom, however the main PC’s Zoom screen would be spotlighted and showing the webcam connected to it.

    1. No. The control for the Logitech cameras work just via USB and the channel and port are identical to the one used by the video signal.
      You can’t split this of.
      I would suggest that it would be easier to compose all data via OBS and create a central output from it. Connect the camera as one signal.
      Than you can use the small control from the computer where you run OBS and the camera is connected.

      Hope I understood your problem corretly.

Schreibe einen Kommentar zu Martin Richter Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.