Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyvirtualcam not recognizing UnityCapture #128

Open
nothiin opened this issue Sep 28, 2024 · 0 comments
Open

pyvirtualcam not recognizing UnityCapture #128

nothiin opened this issue Sep 28, 2024 · 0 comments

Comments

@nothiin
Copy link

nothiin commented Sep 28, 2024

  • Operating system: Windows 11
  • Python version: 3.11.5
  • pyvirtualcam version: 0.12.0
  • Virtual camera (OBS, v4l2loopback, UnityCapture): UnityCapture
  • Virtual camera version: commit: 3ed54c3

Describe the bug
pyvirtualcam not recognizing UnityCapture

To Reproduce
cloned unitycapture repo, ran install.bat as admin , restarted PC, ran a test code and face this error -

import colorsys
import numpy as np
import pyvirtualcam


with pyvirtualcam.Camera(width=1280, height=720, fps=20, backend="unitycapture") as cam:
    print(f"Using virtual camera: {cam.device}")
    frame = np.zeros((cam.height, cam.width, 3), np.uint8)  # RGB
    while True:
        h, s, v = (cam.frames_sent % 100) / 100, 1.0, 1.0
        r, g, b = colorsys.hsv_to_rgb(h, s, v)
        frame[:] = (r * 255, g * 255, b * 255)
        cam.send(frame)
        cam.sleep_until_next_frame()
Traceback (most recent call last):
  File "c:\Users\Nothing\Downloads\All VS code projects\Test Projects\testwebcam.py", line 6, in <module>
    with pyvirtualcam.Camera(width=1280, height=720, fps=20, backend="unitycapture") as cam:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nothing\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvirtualcam\camera.py", line 219, in __init__
    raise RuntimeError('\n'.join(errors))
RuntimeError: 'unitycapture' backend: No camera registered. Did you install any camera?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant