parent
f0527f9dcb
commit
9fce5541f8
@ -0,0 +1,38 @@
|
|||||||
|
### Install the important dependencies
|
||||||
|
~~sudo apt install v4l2loopback-dkms~~
|
||||||
|
```
|
||||||
|
sudo apt install ffmpeg
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install v4l2loopback
|
||||||
|
```
|
||||||
|
git clone https://github.com/umlaeute/v4l2loopback.git
|
||||||
|
cd v4l2loopback
|
||||||
|
make
|
||||||
|
sudo su
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
```
|
||||||
|
sudo depmod -a
|
||||||
|
```
|
||||||
|
### Add Kernel Modules
|
||||||
|
```
|
||||||
|
sudo modprobe v4l2loopback card_label="My Fake Webcam" exclusive_caps=1
|
||||||
|
```
|
||||||
|
### Link Video Stream To Fake Webcam
|
||||||
|
Find video feed in dev
|
||||||
|
```
|
||||||
|
ls -1 /dev/video*
|
||||||
|
```
|
||||||
|
|
||||||
|
Next up, we need to “fake” our webcam feed with :
|
||||||
|
```
|
||||||
|
ffmpeg -stream_loop -1 -re -i /path/to/video -vcodec rawvideo -threads 0 -f v4l2 /dev/videoX
|
||||||
|
```
|
||||||
|
|
||||||
|
### Remove the fake webcam streams
|
||||||
|
Once you are done with the fake stream, remove the previously loaded kernel modules with:
|
||||||
|
|
||||||
|
`sudo modprobe --remove v4l2loopback`
|
||||||
|
|
||||||
|
This should disable the fake webcam.
|
||||||
Loading…
Reference in new issue