Skip to main content

QVAC Virtual Camera

DirectShow virtual camera with Python API for Windows. Send custom video frames from Python to any application that supports webcams (OBS Studio, Zoom, Microsoft Teams, Discord, etc.).

Features

  • DirectShow Virtual Camera: Works with all DirectShow-compatible applications
  • Easy Python API: Simple interface for sending frames
  • Automatic Installation: Install/uninstall virtual camera from Python
  • Frame Conversion: Automatic RGB/BGR/RGBA/BGRA conversion and resizing
  • Production Ready: Fully tested and documented

Installation

pip install qvac

Quick Start

1. Install the Virtual Camera

import qvac

# Requires administrator privileges
qvac.install()

Or from command line:

# Windows (run as administrator)
qvac install

2. Send Frames

from qvac import QVACCamera
import numpy as np

# Create a red frame
frame = np.zeros((720, 1280, 3), dtype=np.uint8)
frame[:, :] = [255, 0, 0]

# Send to virtual camera
with QVACCamera() as cam:
    cam.send_frame(frame)

3. Use in Applications

The virtual camera appears as "QVAC Virtual Camera" in:

  • OBS Studio
  • Zoom
  • Microsoft Teams
  • Discord
  • Any DirectShow-compatible application

Usage Examples

Webcam Relay

from qvac import QVACCamera
import cv2

cap = cv2.VideoCapture(0)

with QVACCamera() as cam:
    while True:
        ret, frame = cap.read()
        if ret:
            cam.send_frame(frame)

Screen Capture

from qvac import QVACCamera
from PIL import ImageGrab
import numpy as np
import time

with QVACCamera() as cam:
    while True:
        screen = np.array(ImageGrab.grab())
        cam.send_frame(screen)
        time.sleep(1/30)

Video File Playback

from qvac import QVACCamera
import cv2

cap = cv2.VideoCapture('video.mp4')

with QVACCamera() as cam:
    while True:
        ret, frame = cap.read()
        if not ret:
            break
        cam.send_frame(frame)

API Reference

Installation Functions

import qvac

# Install virtual camera (requires admin)
qvac.install()

# Uninstall virtual camera (requires admin)
qvac.uninstall()

# Check if installed
if qvac.is_installed():
    print("Virtual camera is installed")

QVACCamera Class

from qvac import QVACCamera

# Create camera instance
cam = QVACCamera(width=1280, height=720)

# Open connection
cam.open()

# Send frame (numpy array)
frame = np.zeros((720, 1280, 3), dtype=np.uint8)
cam.send_frame(frame)

# Close connection
cam.close()

# Or use context manager (recommended)
with QVACCamera() as cam:
    cam.send_frame(frame)

Command Line Interface

# Install virtual camera
qvac install

# Uninstall virtual camera
qvac uninstall

# Check installation status
qvac status

Requirements

  • Windows 7 or later
  • Python 3.6+
  • NumPy
  • OpenCV (for frame resizing/conversion)
  • Administrator privileges (for install/uninstall)

Frame Format

  • Resolution: 1280x720 (default, configurable)
  • Color Format: RGB, BGR, RGBA, or BGRA (automatically converted)
  • Data Type: numpy.ndarray with dtype=uint8
  • Shape: (height, width, 3) or (height, width, 4)

Frames are automatically:

  • Resized if dimensions don't match
  • Converted from grayscale to RGB if needed
  • Converted to BGRA format for the virtual camera

Troubleshooting

Permission Error

If you get a permission error during installation:

# Run Python as administrator, then:
import qvac
qvac.install()

Camera Not Found

If the camera doesn't appear in applications:

  1. Verify installation: qvac status
  2. Restart the application
  3. Try reinstalling: qvac.install(force=True)

Import Error

If you get "ModuleNotFoundError":

pip install numpy opencv-python

License

MIT License - see LICENSE file for details.

Support

For issues and questions, please visit the GitHub repository.

Release files for qvac 1.0.1

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

Source distribution (sdist)

Source distribution for qvac 1.0.1
File Size Uploaded
qvac-1.0.1.tar.gz 40.3 kB Details

Built distribution (wheel)

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

Total release size: 76.5 kB

Release files / qvac-1.0.1.tar.gz

Download URL qvac-1.0.1.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bf938f559eef4cdd8b6f85134ddee6d908d05935362ccf6f20693a761e2f5ff3
BLAKE2b-256 checksum
How to use checksums
f74a817f71956d1a8f773e0a7447d31568a2bbc7731d107886803558f94f26c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / qvac-1.0.1-py3-none-any.whl

Download URL qvac-1.0.1-py3-none-any.whl
Size 36.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a3444b7db9f5c60a9f7f4027318d212a0f998e42b93fdad8262e6bc67f02564
BLAKE2b-256 checksum
How to use checksums
dd3b5d16bc13f6be1c450c66d5acc32def7b59ac0717f040c5b4d12d3b8cf803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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