Skip to main content

Syncronous reading from multiple webcams

Project description

Synchronized reading from multiple webcams using v4l2 on Linux

Installation

sudo apt install libjpeg-turbo8-dev libjpeg-dev cmake python setup.py install for system-wide installation python setup.py install --user for user-specific installation

Use

Multiple cams:

import multicam as mc
with mc.Multicam(['/dev/video0','/dev/video2'], (640,480), 'YUYV', fps=30) as cs:
    try:
        while True: 
            res = cs.read() #RGB images
            print(res.shape)
    except KeyboardInterrupt:
        pass

Single cam:

import multicam as mc
with mc.Camera(0, (640,480), 'YUYV', fps=30) as c:
    print(c.read().shape)

Various utils:

import multicam as mc
print(mc.list_cams())
print(mc.is_valid_device("/dev/video0"))
print(mc.get_formats("/dev/video0"))

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

multicam-1.0.4.tar.gz (10.1 kB view details)

Uploaded Source

File details

Details for the file multicam-1.0.4.tar.gz.

File metadata

  • Download URL: multicam-1.0.4.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for multicam-1.0.4.tar.gz
Algorithm Hash digest
SHA256 aa8f7e0040a0554e8a038573fb4152048f4c9032e2e207163c2fbccbea889644
MD5 3db35cfa68e580ca1b43253dc5b06a3c
BLAKE2b-256 21f3b3aa1475dee4ab75d1cf9265d993d9e2c0ecf528d19ff7886077b0e45b39

See more details on using hashes here.

Supported by

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