Skip to main content

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 correctly
  • process_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

omniview-1.0.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omniview-1.0.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

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

Hashes for omniview-1.0.1.tar.gz
Algorithm Hash digest
SHA256 78a99ddebee190ab0dfe64a40cfea1e211202bb9cb54cba4cd51fbe8dc2f2937
MD5 0c12a3d58cd9cbbe747ffe021dfcaf0e
BLAKE2b-256 6161bb6c6534ec369302090ff12330ecc90ebd67446536db2fe4514bd894348f

See more details on using hashes here.

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

Hashes for omniview-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20a5c10d98284d465723237ead98570c6ef1700da0177f6046893471604e67ce
MD5 92fb10a394ab99b00eac6da56aab6701
BLAKE2b-256 e69e0565bd5b586c5779cf0730ea97d268c6452a79581bca44ad35a19a046e13

See more details on using hashes here.

Supported by

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