You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more examples, check out the [`samples/`](samples) folder.
21
+
20
22
## Installation
21
23
22
-
This package is Windows-only for now. Binary wheels are provided on PyPI.
23
-
Check out [pyfakewebcam](https://github.com/jremmons/pyfakewebcam) for something that works on Linux.
24
+
This package works on Windows, macOS, and Linux. Install it from PyPI with:
24
25
25
26
```sh
26
27
pip install pyvirtualcam
27
28
```
28
29
29
-
The package uses [obs-virtual-cam](https://github.com/Fenrirthviti/obs-virtual-cam/releases) which has to be installed separately. Note that the obs-virtual-cam installer assumes an OBS Studio installation and will fail otherwise. You can also download the obs-virtual-cam zip package from https://github.com/CatxFish/obs-virtual-cam/releases without installing OBS Studio. After unzipping, from an admin command prompt, run:
pyvirtualcam relies on existing virtual cameras which have to be installed first. See the next section for details.
31
+
32
+
## Supported virtual cameras
33
+
34
+
### Windows: OBS
35
+
36
+
[OBS](https://obsproject.com/) includes a built-in virtual camera for Windows (since 26.0).
37
+
38
+
To use the OBS virtual camera, simply [install OBS](https://obsproject.com/).
39
39
40
-
## Contributions
40
+
Note that OBS provides a single camera instance only, so it is *not* possible to send frames from Python, capture the camera in OBS, mix it with other content, and output it again as virtual camera.
41
41
42
-
The most useful contributions would be to add support for macOS or Linux.
42
+
### macOS: OBS
43
+
44
+
[OBS](https://obsproject.com/) includes a built-in virtual camera for macOS (since 26.1).
45
+
46
+
To use the OBS virtual camera, follow these one-time setup steps:
Note that OBS provides a single camera instance only, so it is *not* possible to send frames from Python, capture the camera in OBS, mix it with other content, and output it again as virtual camera.
53
+
54
+
### Linux: v4l2loopback
55
+
56
+
pyvirtualcam uses [v4l2loopback](https://github.com/umlaeute/v4l2loopback) virtual cameras on Linux.
57
+
58
+
To create a v4l2loopback virtual camera on Ubuntu, run the following:
59
+
60
+
```sh
61
+
sudo apt install v4l2loopback-dkms
62
+
sudo modprobe v4l2loopback devices=1
63
+
```
43
64
44
-
Similar to Windows, it may be possible in macOS to piggyback on https://github.com/johnboiles/obs-mac-virtualcam.
65
+
For further information, see the [v4l2loopback documentation](https://github.com/umlaeute/v4l2loopback).
45
66
46
-
For Linux, it seems like https://github.com/umlaeute/v4l2loopback is the right dependency. Code from https://github.com/CatxFish/obs-v4l2sink may be useful as inspiration on how to send frames to the loopback device. Also, there is https://github.com/jremmons/pyfakewebcam which may be a good candidate.
67
+
pyvirtualcam uses the first available v4l2loopback virtual camera it finds.
68
+
The camera device name can be accessed with `cam.device`.
0 commit comments