Spaces:
Sleeping
Sleeping
Download test/test_vcam.py from AutoFramingSoftware/afs-backend: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/spaces/AutoFramingSoftware/afs-backend/resolve/main/test/test_vcam.py
- Command line
-
hf download hf://spaces/AutoFramingSoftware/afs-backend/test/test_vcam.py
-
curl -L -o test_vcam.py https://huggingface.co/spaces/AutoFramingSoftware/afs-backend/resolve/main/test/test_vcam.py
318 Bytes
| import pyvirtualcam | |
| import numpy as np | |
| try: | |
| with pyvirtualcam.Camera(width=1280, height=720, fps=30) as cam: | |
| print(f"Virtual camera started: {cam.device} ({cam.width}x{cam.height} @ {cam.fps}fps)") | |
| cam.send(np.zeros((720, 1280, 4), np.uint8)) | |
| except Exception as e: | |
| print(f"FAILED VCAM: {e}") | |