Skip to main content

PTZ Camera Control using Python

Project description

PTZ Camera Control using Python

This library is designed to control PTZ cameras using the ONVIF, VAPIX and SUNAPI.

ONVIF (Open Network Video Interface Forum) is a global and open industry forum with the goal of facilitating the development and use of a global open standard for the interface of physical IP-based security products. ONVIF creates a standard for how IP products within video surveillance and other physical security areas can communicate with each other. ONVIF is an organization started in 2008 by Axis Communications, Bosch Security Systems and Sony.

VAPIX® is Axis Camera API.

SUNAPI® is Hanwha Camera API.

Installation

pip install pyptz

ONVIF

from pyptz.onvif_control import ONVIFCamera

onvif_camera = ONVIFCamera('192.168.1.100', '88', 'admin', 'password')
pan, tilt, zoom = onvif_camera.get_ptz_status()
print(pan, tilt, zoom)

VAPIX

from pyptz.vapix_control import VAPIXCamera

vapix_camera = VAPIXCamera('192.168.1.100', 'admin', 'password')
pan, tilt, zoom = vapix_camera.get_ptz_status()
print(pan, tilt, zoom)

SUNAPI

from pyptz.sunapi_control import SUNAPICamera

sunapi_camera = SUNAPICamera('192.168.1.100', 'admin', 'password')
pan, tilt, zoom = sunapi_camera.get_ptz_status()[:3]
print(pan, tilt, zoom)

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

pyptz-0.1.8.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

pyptz-0.1.8-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

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