Receiving video stream from multiple cameras (usb/ip) for further processing
Project description
📝 About the project
A system for simultaneous viewing and processing of streams from multiple cameras (USB/IP) with the ability to integrate into computer vision.
🚀 Features
- Support for USB and IP cameras (via RTSP)
- Automatic reconnection in case of connection failure
- Customizable camera parameters (resolution, FPS)
- Multithreaded frame processing
- Hardware-accelerated decoding (D3D11 on Windows, VAAPI on Linux) with automatic software fallback
- Flexible callback system for video processing
- Ready-to-use GUI for viewing streams
- Configuration via constructor parameters
⚙️ Installation
pip install omniview
🛠️ Usage
🔌 Basic example for USB cameras
from omniview.managers import USBCameraManager
def frame_callback(camera_id, frame):
# Your framing
pass
if __name__ == "__main__":
manager = USBCameraManager(
show_gui=True,
show_camera_id=True,
frame_callback=frame_callback
)
try:
manager.start()
except KeyboardInterrupt:
manager.stop()
🌐 Basic example for IP cameras
from omniview.managers import IPCameraManager
def frame_callback(camera_id, frame):
# Your framing
pass
if __name__ == "__main__":
manager = IPCameraManager(
show_gui=True,
rtsp_urls=[
"rtsp://admin:12345@192.168.0.1:9090",
],
frame_callback=frame_callback
)
try:
manager.start()
except KeyboardInterrupt:
manager.stop()
📚 API
Main methods:
start()- starts the camera manager (blocking call)stop()- stops all threads correctly
Class USBCameraManager
Designer Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| show_gui | bool | False | Show video windows |
| show_camera_id | bool | False | Adds a caption with the camera ID to the frame |
| max_cameras | int | 10 | Max. number of cameras |
| frame_width | int | 640 | frame width |
| frame_height | int | 480 | frame height |
| fps | int | 30 | target FPS |
| min_uptime | float | 5.0 | Min. uptime (sec) |
| frame_callback | function | None | Callback for frame processing |
| exit_keys | tuple | (ord('q'),27) | exit keys |
| hw_acceleration | bool | True | Use GPU video decoding when available (D3D11/VAAPI); falls back to software |
| sequential_mode | bool | False | Method to show the cameras one by one |
| switch_interval | float | 5.0 | The time after which the cameras will change. Only works if sequential_mode is selected |
Class IPCameraManager
Builder parameters (Same as USBCameraManager, but with an addition):
| Parameter | Type | Default | Description |
|---|---|---|---|
| rtsp_urls | list[str] | [] | List of RTSP URLs |
🎨 Built With
🤝 Contributing
Contributions are welcome! Here's how you can help:
- 🐛 Report bugs and request features via Issues
- 🔧 Submit pull requests with improvements
- 📖 Improve documentation
®️ Legal status
This project is protected by patent. All rights reserved. Use, copying, and distribution are permitted only with the written permission of the copyright holder.
| Page 1 | Page 2 |
|---|---|
📝 License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
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
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 omniview-1.3.0.tar.gz.
File metadata
- Download URL: omniview-1.3.0.tar.gz
- Upload date:
- Size: 52.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8986405573985d08d7bc2ba202172e5f8af3d7097e7bc17884fe53ee455916a1
|
|
| MD5 |
9ebcfaf4686f9eb6696bfdab67cd2292
|
|
| BLAKE2b-256 |
2935dbe51b5854698ff8d4c4b51703d1ec85b8dfec56a89f76a79c4742aacd9b
|
File details
Details for the file omniview-1.3.0-py3-none-any.whl.
File metadata
- Download URL: omniview-1.3.0-py3-none-any.whl
- Upload date:
- Size: 43.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77df54051d9018cc72b90a69870e04e7f2615a2d7fb4c92342d4800eb592e5ec
|
|
| MD5 |
4f01c4bab4d81b8e8b78aaeb81a883c5
|
|
| BLAKE2b-256 |
e69ba0c97220c5377ab89447291b530049032111d75d2220f6ebf5d67d5cadd1
|