ipTIME C400G ONVIF PTZ control wrapper
Project description
c400g-ptz
ipTIME C400G 전용 ONVIF PTZ 컨트롤 래퍼입니다. C400G의 ONVIF PTZ 특성(속도 magnitude 무시, RemoteDisconnected 등)을 고려하여 좌/우/상/하 이동과 정지에 집중한 단순한 API를 제공합니다.
ipTIME C400G ONVIF PTZ control wrapper. Provides a simple API for pan/tilt control, handling C400G's ONVIF quirks (ignoring speed magnitude, RemoteDisconnected errors, etc.).
Requirements
중요: PTZ 제어를 사용하기 전에 ipTIME CCTV 앱에서 RTSP 설정을 활성화해야 합니다.
Important: You must enable RTSP settings in the ipTIME CCTV app before using PTZ control.
Installation
pip install c400g-ptz
Usage
from c400g_ptz import C400GPTZ
# Connect to camera
cam = C400GPTZ("192.168.1.100", 5000, "admin", "password")
# Step movements (with duration)
cam.left(0.3)
cam.right(0.3)
cam.up(0.5)
cam.down(0.5)
# Continuous movement
cam.start_move("left")
# ... do something ...
cam.stop()
# Generic step with custom duration
cam.step("up", duration=0.4)
API
C400GPTZ(ip, port, user, password, *, profile_index=0, default_step_time=0.3, log=None)
Main PTZ control class.
Parameters:
ip: Camera IP addressport: ONVIF port (usually 5000)user: Usernamepassword: Passwordprofile_index: ONVIF media profile index (default: 0)default_step_time: Default duration for step movements in seconds (default: 0.3)log: Optional logger instance
Methods:
step(direction, *, duration=None): Move in direction for specified durationleft(duration=None): Move leftright(duration=None): Move rightup(duration=None): Move updown(duration=None): Move downstart_move(direction): Start continuous movementstop(): Stop movement
Directions: "left", "right", "up", "down"
Logging
Enable logging to see what's happening:
import logging
logging.basicConfig(level=logging.INFO)
from c400g_ptz import C400GPTZ
cam = C400GPTZ("192.168.1.100", 5000, "admin", "password")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file c400g_ptz-0.1.2.tar.gz.
File metadata
- Download URL: c400g_ptz-0.1.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040d0d9c59c2032a58eb7a246e72217e14a3feb5a75d7966452927e1db76814d
|
|
| MD5 |
81f7a1b19094579f7ab5260462366f30
|
|
| BLAKE2b-256 |
dd5ecde8e7792305f163f33c6e5c6a636857a33cbedac7c7ccf3a9ebf12fdb1f
|
File details
Details for the file c400g_ptz-0.1.2-py3-none-any.whl.
File metadata
- Download URL: c400g_ptz-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83d0309aad743d09c74e0358d107bfcb413f79e181fe5684802a7686379856f6
|
|
| MD5 |
152e1cfd4731581f9fde57223443da61
|
|
| BLAKE2b-256 |
a3e3b146a4ff720cdca4e6a760e6ce39d8447bf9bea01bfdfbc2b8dabd10e582
|