A collection of code examples for controlling PTZOptics cameras programmatically using different protocols.
- HTTP-CGI: Web-based CGI commands over HTTP
- VISCA over IP: Sony VISCA protocol via TCP/IP
- Motion Detection: RTSP feed motion detector in Python
Control PTZOptics cameras using HTTP-CGI commands
- HTTP-CGI interface with URL-based commands
- HTTP Digest Authentication support
- Automatic command cycling demo (5-second intervals)
- Preset recall functionality with configurable camera settings
Control PTZOptics cameras using VISCA protocol over IP
- Direct VISCA protocol implementation
- TCP socket communication (default port 5678)
- Byte-level command control with response interpretation
- Automatic command cycling demo (5-second intervals)
Motion Detection main.py
- Key Features: - Real-time RTSP streaming with OpenCV - Background subtraction for motion tracking - Face detection using Haar cascades - Visual indicators with bounding boxes (green for motion, red for faces) - Configurable sensitivity and detection parameters
- Command-line options: - --sensitivity: Adjust motion detection sensitivity (default: 25, lower = more sensitive) - --min-area: Set minimum motion area in pixels (default: 300) - --stream: Choose stream quality (1 for high quality, 2 for low latency)
- Requirements: - Python 3.8+ - OpenCV and NumPy - PTZOptics camera with RTSP enabled
- Use cases: - Security monitoring - Presence detection - Activity tracking - Event triggering based on motion/faces
- PTZOptics Developer Portal - Complete API documentation, command references, and developer resources
- PTZOptics Support - Technical support and FAQs
This project is licensed under the MIT License - see the LICENSE file for details.