AI-built desktop application that brings intelligent auto-tracking to PTZOptics cameras. Uses MediaPipe pose detection to locate a person in the camera's RTSP video feed and sends real-time VISCA over IP pan, tilt, and zoom commands to keep them centered in frame.
Built as an open-source replacement for the PTZOptics CMP tracking feature, which dropped support for G2 USB-model cameras.
- Windows 10 or 11
- PTZOptics camera with a LAN port (tested on PT12X-USB-G2)
- Camera LAN port connected to the same network as your PC
- Python 3.9–3.11 — https://www.python.org/downloads/
- Check Add Python to PATH during install (only needed for source install)
- mediapipe 0.10.9 does not support Python 3.12+
Run Trackmind_Setup.exe and follow the prompts. Creates a Start Menu entry, desktop shortcut, and uninstaller. No Python required.
- Install Python 3.9–3.11 — check Add Python to PATH
- Double-click
INSTALL.batto install dependencies - Double-click
START_TRACKER.batto launch
- Install Python 3.9–3.11
- Double-click
BUILD_EXE.bat— installs all dependencies automatically, then producesdist\Trackmind.exe - (Optional) Install NSIS from https://nsis.sourceforge.io/Download, then run
BUILD_INSTALLER.batto produce aTrackmind_Setup.exeinstaller
On the very first launch, TrackMind walks you through a setup wizard:
- Camera IP — the LAN IP of your camera (find it in your router or camera web UI)
- Credentials — RTSP username and password (default:
admin/admin) - Home Preset — the preset the camera returns to when the subject is lost (0 if not configured)
- Dead Zone — tracking sensitivity. 0.17 is recommended — increase if the camera twitches
- Done — settings are saved per Windows user account
Settings are stored per user in %USERPROFILE%\.trackmind\<username>\config.json, so multiple users on the same PC each have independent settings.
- Connect your camera LAN port to your network
- Find the camera IP — check your router, or try
http://192.168.100.88(factory default) - PC and camera must be on the same subnet
- VISCA over IP must be enabled — camera web UI → Network settings
- VISCA uses TCP port 5678 — make sure Windows Firewall is not blocking it
RTSP stream URLs:
Main stream (1080p): rtsp://admin:admin@[camera-ip]/1
Sub stream (720p): rtsp://admin:admin@[camera-ip]/2 ← recommended (default)
The app connects to the camera automatically on startup. The preview shows NO SIGNAL until the stream connects (2–5 seconds).
The left panel is kept minimal — only the controls you need during a shoot:
| Control | Description |
|---|---|
| Camera IP | LAN IP of your camera |
| Username | RTSP username |
| Password | RTSP password |
| Home Preset | Preset recalled when subject is lost |
| TRACKING button | Green = tracking on. Camera follows whoever is in frame |
| LOCK button | Amber = locked on. Camera ignores everyone except the current subject |
| SETTINGS button | Opens the full settings panel |
When ON (green) the camera follows whoever MediaPipe detects in frame. When OFF the camera stops moving and you have full manual control via joystick, Stream Deck, vMix, or any other controller.
While tracking is ON, click LOCK to lock onto the current subject. The camera ignores everyone else. Click again to unlock. Lock resets automatically when tracking is turned off.
Click SETTINGS to open the settings window. Changes take effect when you click Apply Settings or Save.
Save and load named setting presets — useful for switching between different rooms, presenters, or camera positions.
| Control | Description |
|---|---|
| Dropdown | Select a saved profile |
| LOAD | Apply the selected profile immediately |
| Name entry + SAVE AS | Save current settings under a new name |
| DEL | Delete the selected profile |
Profiles are stored per Windows user account alongside your settings.
| Field | Default | Description |
|---|---|---|
| Vertical Offset | 2 | Fine-tune aim point. -7 = top of head, +7 = feet, 0 = centered |
| Pan Dead Zone | 0.17 | Fraction of frame where pan offsets are ignored. Higher = steadier near center |
| Pan Slow | 2 | Pan speed when slightly off-center (1–24) |
| Pan Fast | 5 | Pan speed when far off-center (1–24) |
| Tilt Dead Zone | 0.17 | Same as Pan Dead Zone but for tilt |
| Tilt Slow | 2 | Tilt speed when slightly above/below center (1–24) |
| Tilt Fast | 5 | Tilt speed when far above/below center (1–24) |
| Field | Default | Description |
|---|---|---|
| Enable Auto-Zoom | Off | Toggle auto-zoom. Off = manual zoom only |
| Target Fill % | 45 | How much frame height the person occupies. 45 = wider, 80 = tight |
| Dead Zone % | 20 | Tolerance before zoom activates. Higher = less hunting |
| Zoom Speed | 1 | Motor speed 0–7. Start at 1 for smooth motion |
| Field | Default | Description |
|---|---|---|
| Latency Comp | 0.40 | Seconds of look-ahead to compensate for RTSP delay. Too high = oscillation |
| Lost Timeout | 2.0 | Seconds before camera returns to home preset when subject is missing |
Click Check for Updates to check GitHub for a newer version. If one is found, TrackMind will download and install it automatically.
| Key | Action |
|---|---|
| F11 | Toggle fullscreen |
| Esc | Exit fullscreen |
- Video is pulled from the camera's RTSP stream over the LAN port
- Each frame is processed by MediaPipe Pose — a local AI model, no internet required
- A dedicated buffer thread drains the RTSP stream continuously, keeping only the latest frame to prevent lag buildup
- Velocity prediction estimates where the subject is heading to compensate for RTSP latency
- VISCA over IP pan/tilt/zoom commands are sent to the camera's LAN port (TCP 5678)
Lock-on: When LOCK is active, the detector only follows detections within 25% of the frame distance from the last known position of the locked subject. Anyone else is ignored.
App opens but shows NO SIGNAL
- Check camera IP is correct in the main panel
- Test in VLC: Media → Open Network Stream →
rtsp://admin:admin@[ip]/2 - Verify username and password are correct
Camera doesn't move
- Ping the camera IP from your PC
- Check TCP port 5678 is not blocked by Windows Firewall
- Confirm VISCA over IP is enabled in the camera web UI
Tracking is jittery or oscillating
- Open Settings → increase Pan/Tilt Dead Zone (try 0.20–0.22)
- Lower Pan Slow / Tilt Slow speed
- Reduce Latency Comp in Advanced (try 0.2)
Camera goes in the wrong direction
- In
autotrack.pyfindpan_vel = -zone_speed(...)and remove or add the minus sign
EXE shows default Windows icon
- Make sure
trackmind_icon.icois in the same folder asautotrack.pybefore building - Rebuild with
BUILD_EXE.bat
Setup wizard doesn't appear on first launch
- Delete
%USERPROFILE%\.trackmind\<your-username>\config.jsonand relaunch
| Package | Version | Notes |
|---|---|---|
| opencv-python | >= 4.8.0 | Video capture and frame processing |
| mediapipe | == 0.10.9 | Pinned — newer versions removed the solutions API |
| Pillow | >= 10.0.0 | UI image rendering |
| numpy | >= 1.24.0 | Array operations |
| pyinstaller | >= 6.0.0 | EXE packaging (build only) |
- RTSP latency (1–3s) means the camera lags the subject slightly. Velocity prediction compensates but does not fully eliminate this.
- MediaPipe single-pose model always detects the most visually prominent person in frame. Use LOCK to pin to a specific subject.
- MediaPipe — pose detection
- OpenCV — video capture
- Tkinter — UI
- PyInstaller — exe packaging
- NSIS — Windows installer