Skip to main content

A CLI to control NDI-capable PTZ cameras via a joystick.

Project description

ndi-ptz

This is a CLI to control an NDI-enabled PTZ camera with a joystick.

Installation

uv tool install ndi-ptz

# or
pip install ndi-ptz

You also need to install the NDI Runtime, unless you have the NDI Tools or the NDI SDK installed

For further options, like choco or brew, consult the DistroAV wiki.

Quick-Start

$ ndi-ptz control

Or pre-defined a source and joystick:

$ ndi-ptz list-sources
Looking for NDI sources in the next 5 seconds
TAIL_AIR_006666 (OBSBOT)

$ ndi-ptz list-joysticks
Looking for joysticks in the next 5 seconds
Nintendo Switch Pro Controller (0)

$ ndi-ptz control --source-name "TAIL_AIR_006666 (OBSBOT)" --joystick-instance 0

Supported Joysticks

Currently only the following joysticks are supported:

Nintendo Controller

Only the Nintendo Switch Pro Controller was tested.

  • You must hold L and R constantly to control the PTZ.
  • Use the left stick to control pan (left/right) and tilt (up/down).
  • Use the right stick to control the zoom (up/down).
  • Press the right stick to return the camera to the home position.
  • Hold the A button to trigger the autofocus.

Xbox Controller

Only the Xbox Series X Controller was tested. On Mac, it only works when connected via Bluetooth.

  • You must hold L and R constantly to control the PTZ.
  • Use the left stick to control pan (left/right) and tilt (up/down).
  • Use the right stick to control the zoom (up/down).
  • Press the right stick to return the camera to the home position.
  • Hold the B button to trigger the autofocus.

PlayStation Controller

PlayStation 4 and 5 controllers were tested.

  • You must hold L and R constantly to control the PTZ.
  • Use the left stick to control pan (left/right) and tilt (up/down).
  • Use the right stick to control the zoom (up/down).
  • Press the right stick to return the camera to the home position.
  • Hold the O button to trigger the autofocus.

Development

This project is managed with UV.

Build & Publish

# edit the project version in pyproject.toml
uv sync
git commit -m "Prepare 0.1.5" .
git tag '0.1.5'
rm -rf dist
uv build
uv publish
git push --tags
git push

Legal

This code is provided under the terms and permissions granted by the MIT license.

NDI® is a registered trademark of Vizrt NDI AB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndi_ptz-0.2.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndi_ptz-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ndi_ptz-0.2.0.tar.gz.

File metadata

  • Download URL: ndi_ptz-0.2.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ndi_ptz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b05c992657d660832439ad74df6c25acbc2491117f7d07a2d41a674076874c4e
MD5 ca03b8935c0c097df1f7402df504ddf8
BLAKE2b-256 92b89190b3cfa69301d8f74c573f57cc27a50673a217c4f26301ca60325b00fd

See more details on using hashes here.

File details

Details for the file ndi_ptz-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ndi_ptz-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ndi_ptz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b7d657a7bc91b2dbfca016494f2d0bd62d2ab652fbfc327c73a4e47928e19aa
MD5 5c00550fd6e93dc41bd315b799e30293
BLAKE2b-256 34ce674cca3c2f807cdb67fd0d4cee2f5a0520909ab5d49162317634f9d3aad4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page