mirror of
https://github.com/Brandon-Rozek/website.git
synced 2026-01-18 10:30:24 +00:00
New Posts
This commit is contained in:
parent
5b8aee2c97
commit
2945159b41
2 changed files with 71 additions and 0 deletions
36
content/blog/fakewebcam.md
Normal file
36
content/blog/fakewebcam.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: "V4l2 Webcam"
|
||||
date: 2020-05-25T23:49:08-04:00
|
||||
draft: false
|
||||
tags: []
|
||||
---
|
||||
|
||||
In Linux you can create a fake webcam by making use of the `v4l2loopback` kernel module.
|
||||
|
||||
To install,
|
||||
|
||||
```bash
|
||||
sudo apt install v4l2loopback-dkms
|
||||
```
|
||||
|
||||
If you already had an existing module, remove it so we can customize it.
|
||||
|
||||
```bash
|
||||
sudo modprobe -r v4l2loopback
|
||||
```
|
||||
|
||||
Then create the file `/etc/modprobe.d/fakecam.conf` and add the following line
|
||||
|
||||
```
|
||||
options v4l2loopback devices=1 video_nr=20 card_label=fakecam exclusive_caps=1
|
||||
```
|
||||
|
||||
The value of `video_nr` must be larger than the amount of cameras in your system. I wouldn't have more than 10 webcams plugged into my system, so I set it to 20.
|
||||
|
||||
Then load back up the kernel module
|
||||
|
||||
```bash
|
||||
sudo modprobe v4l2loopback
|
||||
```
|
||||
|
||||
Now when you open up Chrome, Skype, etc, you should see a new device labeled "fakecam".
|
||||
Loading…
Add table
Add a link
Reference in a new issue