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
- 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,
max_cameras=4,
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",
],
max_cameras=4,
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 correctlyprocess_frames()- returns dictionary of current frames (ID: frame)
Class USBCameraManager
Designer Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| show_gui | bool | True | True |
| 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 |
Class IPCameraManager
Builder parameters (Same as USBCameraManager, but with an addition):
| Parameter | Type | Default | Description |
|---|---|---|---|
| rtsp_urls | list[str] | [] | List of RTSP URLs |
🤝 Project Development
Welcome:
- Bug reports
- Pull requests
- Ideas for improvement
- Usage examples
📄 License
The project is distributed under the GNU GPL v3 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.0.1.tar.gz.
File metadata
- Download URL: omniview-1.0.1.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a99ddebee190ab0dfe64a40cfea1e211202bb9cb54cba4cd51fbe8dc2f2937
|
|
| MD5 |
0c12a3d58cd9cbbe747ffe021dfcaf0e
|
|
| BLAKE2b-256 |
6161bb6c6534ec369302090ff12330ecc90ebd67446536db2fe4514bd894348f
|
File details
Details for the file omniview-1.0.1-py3-none-any.whl.
File metadata
- Download URL: omniview-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a5c10d98284d465723237ead98570c6ef1700da0177f6046893471604e67ce
|
|
| MD5 |
92fb10a394ab99b00eac6da56aab6701
|
|
| BLAKE2b-256 |
e69e0565bd5b586c5779cf0730ea97d268c6452a79581bca44ad35a19a046e13
|