Skip to main content

An easy way to capture and stream media from multiple cameras, from the screen and urls

Project description


HoloCapture

HoloCapture is a simple, production-ready Python utility for screen and camera capture, screen/camera streaming, multi-camera compositing, and media normalization—using only a few lines of code.


Features

  • Capture screenshots to file
  • Record screen to video
  • Capture images from one or more cameras (with optional normalization)
  • Record video from multiple cameras to a single file (side-by-side)
  • Real-time screen streaming (with auto-resize)
  • Real-time multi-camera streaming (with auto-resize, optional normalization)
  • Simple directory management
  • No external dependencies beyond common imaging libraries

Installation

pip install HoloCapture

Usage

from HoloCapture import HoloCapture
import cv2
import numpy as np

mediaCapture = HoloCapture()

# Capture a screenshot
mediaCapture.captureScreen('screenshots/screen.jpg')

# Record the screen for 10 seconds
mediaCapture.recordScreen('videos/screen.mp4', duration=10)

# Capture from two cameras and save side-by-side
mediaCapture.captureMedia('images/cameras.jpg', 0, 1, normalize=True)

# Record from two cameras for 15 seconds
mediaCapture.recordMedia('videos/cameras.mp4', 0, 1, duration=15, normalize=True)

# Stream live screen preview (press 'q' to exit)
for frame in mediaCapture.streamScreen(fps=15):
    cv2.imshow("Screen", cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()

# Stream from cameras (press 'q' to exit)
for frames, frameCount in mediaCapture.streamCameras(0, 1, normalize=True):
    if any(f is None for f in frames):
        break
    combined = np.hstack(frames)
    cv2.imshow("Combined Cameras", combined)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()

Methods

Method Description
captureScreen(mediaFile) Capture screenshot to file
recordScreen(mediaFile, duration=10) Record the screen to video file
captureMedia(combinedFile, *cameras) Capture side-by-side from one or more cameras
recordMedia(combinedFile, *cameras, ...) Record video from one or more cameras
streamScreen(fps=10, maxWidth=1280, ...) Generator: live screen frames (resized)
streamCameras(*cameras, ...) Generator: live camera frames (resized)
normalizeImage(image) Normalize contrast/gamma of a frame

Notes

  • ImageGrab requires Windows/macOS or X11-based Linux.
  • For multi-camera capture, you must have multiple camera devices attached.
  • Streaming windows can be exited by pressing the q key.
  • Output directories are created automatically if they don’t exist.

License

This project is licensed under the Apache License, Version 2.0. Copyright 2025 Tristan McBride Sr.


Acknowledgements

Project by:

  • Tristan McBride Sr.
  • Sybil

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

holocapture-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

holocapture-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file holocapture-0.1.1.tar.gz.

File metadata

  • Download URL: holocapture-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for holocapture-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c93b521eb9b565517ae5a647c2f084a1dd12f64cee0fbb282fc7954c783d5569
MD5 e1d76d2aefbf35d11e50e2ff95581e7c
BLAKE2b-256 1c0fae927861902408a58829f25e7b00d4072e7b72284d923015d7ad4ce74b56

See more details on using hashes here.

File details

Details for the file holocapture-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: holocapture-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for holocapture-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80f219304c8e758b3cee10f20f54ea64e8eff38f71bdd641f524c2c2cd7540e3
MD5 f86e15dc1cb67f4e8a5c37869719df98
BLAKE2b-256 d2e0da2e180b1bf3472006b88e6f68c5c47611604e19d5367e2986d861c7e03f

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