Skip to main content

🎥 CustomCam

Extendable webcam customisation in Python.

CustomCam uses pyvirtualcamera to interact with virtual output devices. As this package was primarily developed for Linux, the Quick Start commands address that use case. To set up virtual output devices for other platforms, check the pyvirtualcam docs.

Quick Start

Install

pip install CustomCam                    # Install CustomCam
sudo apt install v4l2loopback-dkms       # Install virtual camera creator (Linux)

Launch

sudo modprobe v4l2loopback devices=1     # Create virtual camera (Linux)
CustomCam                                # Launch CustomCam

Usage

On-Launch

usage: CustomCam [-h] [--input_camera INPUT_CAMERA]
                 [--output_camera OUTPUT_CAMERA] [--fps]
                 [--pref_width PREF_WIDTH] [--pref_height PREF_HEIGHT]
                 [--pref_fps PREF_FPS]
                 [--filter {Gray,NoFilter,Segment,Sepia,Shake,BlurBox,Frame,Pixel,BlurSat}]
                 [--verbose] [--logfile]

🎥 CustomCam. Extendable webcam modification on your commandline.

optional arguments:
  -h, --help            show this help message and exit
  --input_camera INPUT_CAMERA
                        ID of webcam device (default: 0)
  --output_camera OUTPUT_CAMERA
                        Dummy output device (default: /dev/video2)
  --pref_width PREF_WIDTH
                        Overwrite camera width. (default: None)
  --pref_height PREF_HEIGHT
                        Overwrite camera height. (default: None)
  --pref_fps PREF_FPS   Overwrite camera fps. (default: None)
  --filter {Gray,NoFilter,Segment,Sepia,Shake,BlurBox,Frame,Pixel,BlurSat}
  --verbose             Enable verbose logging. (default: False)
  --logfile             Write log to disk. (default: False)

Mid-Run

Users are able to change the active filter, display statistics, flip the camera, close the program etc. whilst CustomCam is running by entering the appropriate command in the terminal in which CustomCam was launched.

Filters:
• 'BlurBox': Blur background via single face detection.
• 'BlurSat': Blur background via saturation detection.
• 'Frame': Highlight targets of face detection.
• 'Gray': Apply grayscale.
• 'NoFilter': Applies no filters.
• 'Pixel': Pixelate individuals in the foreground.
• 'Segment': Blur background using mediapipe's SelfieSegmentation.
• 'Sepia': Apply sepia effect.
• 'Shake': Shake two channels horizontally.

Options:
• 'f', 'flip': Flip camera
• 's', 'stats': Display statistics
• 'h', 'help': Get this help
• 'q', 'quit': Exit CustomCam

Creating your own filters

User-defined filters can be added to filters.py.

Filter classes must:

  • Inherit from filters.Filter
  • Implement a __str__ method that return string containing a short description of the filter.
  • Implement an apply method which takes a frame (as a np.array), applies filter logic and returns that a np.array.
  • Not share a name with any existing class or input command.

Metadata

Release files for CustomCam 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for CustomCam 0.0.2
File Interpreter ABI Platform Actions
CustomCam-0.0.2-py3-none-any.whl Python 3 none any Details for CustomCam-0.0.2-py3-none-any.whl

Release files / CustomCam-0.0.2-py3-none-any.whl

Download URL CustomCam-0.0.2-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46fc8e0815a5aa1845745dc18c8408bb17c207c128e5a6135c59e2e823a557ff
BLAKE2b-256 checksum
How to use checksums
bfd8f0507afb608b4e71af36179ef6242a92c131b03c147c6e31fe914be17060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.56.0 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11

Security for CustomCam 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page