summarylogtreecommitdiffstats
path: root/readme.md
blob: a6f8bcefdb7efff5004003590999bbc8bab038cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

## Basic usage
The systemd service instance name is mapped to the video device number. So for example:

```sh
systemctl start fake-background-webcam@0.service
```

would use `/dev/video0` as the source and create `/dev/video20` as the virtual camera with fake background.

## Customization
Edit the `/etc/fake-background-webcam/config.ini` and restart the systemd service.

The `background-image` can be changed there instead of customizing the systemd unit file.

### Multiple cameras
Override the systemd unit file:

```sh
systemctl edit fake-background-webcam@0.service
#edit
systemctl daemon-reload
systemctl restart fake-background-webcam@0.service
```


```sh
[Service]

# To disable automatic loading/removing of the v4l2loopback kernel module completely
ExecStartPre=
ExecStartPost= 
```

It is then possible to for example handle multiple cameras by loading the module manually with custom parameters:

```sh
modprobe v4l2loopback video_nr=20,21 card_label="Fake Background cam1","Fake Background cam2" exclusive_caps=1

```

```sh
systemctl start fake-background-webcam@{0,1}.service
```