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,
        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
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

🤝 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.2.0.tar.gz (23.0 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.2.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file omniview-1.2.0.tar.gz.

File metadata

  • Download URL: omniview-1.2.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for omniview-1.2.0.tar.gz
Algorithm Hash digest
SHA256 18b19691fbd93e3ab7e2709fab0c4435e5351fc94640d3bbeda43775a825fd20
MD5 374c19bbd08091bcfb9b844b750a7db3
BLAKE2b-256 dd6e1b5d1b319149525c7ab3e33fefb317b35c8e1f30fd93c2b5805a9490094c

See more details on using hashes here.

File details

Details for the file omniview-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: omniview-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fe3c2571a4a8bc424e548b2e78384401a9e0535a91724a5730f2108c855bd2e
MD5 48b5538f9c1a2185eb154c2bec644cea
BLAKE2b-256 b073e4b6e24993167f4107797d31f1369f80aca89805b74d681602c322460924

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