Skip to main content

A simple and convenient library to interact with webcams in Python without having to address Hardware Limitations

Project description

Webcam

webcam Webcam is a simple, yet powerful Python library that brings advanced webcam handling to your projects. It offers numerous advantages over alternatives like cv2.VideoCapture, making it a go-to choice for developers seeking to enhance their webcam integration and usage.

Webcam provides you with an intuitive way to handle video input from a range of sources like webcams, IP cameras, and video files. It grants you the power to dictate the exact frame size and regulate aspect ratio adjustments when the camera's native resolution doesn't match, thereby ensuring all returned frames comply with your format requirements. Furthermore, Webcam includes a unique aspect that allows users to authentically mirror webcam input using video files. It ensures the frame accessed at any particular moment matches the exact frame you'd encounter in a real-time webcam stream, making it a valuable tool for testing and development.

Designed for simplicity and user-friendliness, Webcam provides advanced features without compromising ease of use. This allows you to channel your efforts into developing your application, instead of grappling with the complexities of webcam control.

Advanced Functionality

Webcam showcases a rich set of features, advancing beyond fundamental webcam manipulation to offer a higher degree of control and flexibility:

  • Enhanced Input Sources: Webcam seamlessly handles all input types that OpenCV accepts, but with added versatility. Including webcams, IP cameras (using RTSP URLs), and video files.

  • Customizable Frame Configuration: With Webcam, you can define the specific frame size and manage aspect ratio changes when the camera's native resolution differs. Keep the widest field of view by setting just one dimension, or set both and decide between center cropping or resizing (sacrificing aspect ratio).

  • OpenCV Compatibility: Webcam supports RGB and BGR reading, ensuring compatibility with your existing OpenCV pipelines.

  • Background Reading: Enhances performance by reading frames in a background thread, with an option to limit the frame rate.

  • Webcam Input Emulation: Uses video files to accurately emulate webcam input. The frame you access at any instant matches the one from a real-time webcam stream at the same time, a feature that's especially handy for testing and development scenarios.

  • Iterator and Batch Processing: Webcam offers an iterator for simplified camera frame reading, with optional batch yielding for efficient data handling.

Balancing simplicity and advanced functionality, Webcam is an efficient, flexible tool for webcam integration.

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

webcam-1.3.tar.gz (13.8 kB view details)

Uploaded Source

File details

Details for the file webcam-1.3.tar.gz.

File metadata

  • Download URL: webcam-1.3.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for webcam-1.3.tar.gz
Algorithm Hash digest
SHA256 f4fbcec19ca65fc89bb63c10dfbaac98e6ca0b1c9a88d03666df859641f6ed90
MD5 e61bc7f485b6e80ce01b7bf7344aa02f
BLAKE2b-256 761bfe6a4e9e178a724aededde2b04f92df8511181e8e6c10e6b23bd1931bc53

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