# Trying to set up virtual webcam - it's not working



## thedarkangel (Aug 2, 2020)

I want to stream my second monitor on Zoom, Skype, etc.

Latest version of Linux Mint, Cinnamon desktop.

I had to go through so many different wikis and tutorials and enter lines and lines in terminal, not even exactly sure what I was doing. This was not easy! 

I've installed V4L2 Loopback, obs-v4l2 sink, v4l-utils.

I did: sudo modprobe v4l2loopback devices=4

Then this:
v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
    /dev/video2

HP HD Webcam: HP HD Webcam (usb-0000:00:14.0-7.2):
    /dev/video0
    /dev/video1

I fire up OBS. I see my second desktop on the screen. I go in tools, V4l2 Video Output. I choose /dev/video2

I went here: https://www.onlinemictest.com/webcam-test/
It gives me the choice between dummy cam and HP Webcam. I choose dummy cam. It's not working. I only see a black square.

I'm stuck, I don't what else to do and have spent several frustrating hours on this. For my friend who uses Windows, it was so straightforward, he just installed OBS, and it worked out of the box.


----------



## Tuna (Aug 2, 2020)

From https://github.com/CatxFish/obs-v4l2sink:


```
Make sure to load the v4l2loopback module and check the Device Path.
If using Chrome or Chromium you must use the option exclusive_caps=1
```


----------



## thedarkangel (Aug 2, 2020)

I'm using Firefox, not Chrome.

I did:
sudo modprobe v4l2loopback devices=4

Then did:
v4l2-ctl --list-devices

Which showed:
Dummy video device (0x0000) (platform:v4l2loopback-000):
    /dev/video2

HP HD Webcam: HP HD Webcam (usb-0000:00:14.0-7.2):
    /dev/video0
    /dev/video1

In OBS, I put the path /dev/video2

It's not working. Black screen.


----------



## thedarkangel (Aug 6, 2020)

I'm bumping this up. Any help please. I followed like twenty different tutorials, installed and reinstalled tons of plugins, it still only streams a black square.

Is it possible to use a virtual webcam at all? Is it possible to make this work?


----------



## Tuna (Aug 7, 2020)

Following the guides works just fine.


----------



## thedarkangel (Aug 7, 2020)

Is there a complete step by step guide with all the steps on the same page available for Ubuntu/Mint?

I tried starting from scratch again, following instructions found here: https://srcco.de/posts/using-obs-studio-with-v4l2-for-google-hangouts-meet.html

I end up with the error message "device open failed" in OBS.


----------



## thedarkangel (Aug 8, 2020)

I've deleted all the packages, started from scratch again.

Here's everything I did:

1-I install OBS though command line following their instructions on obsproject.com
https://obsproject.com/wiki/install-instructions#linux

2-git clone https://github.com/umlaeute/v4l2loopback.git

3-cd v4l2loopback
make
make && sudo make install
sudo modprobe v4l2loopback

4-ls/dev/video*
It gives me:
/dev/video0 /dev/video1 /dev/video2

5-Open OBS, go in tools. See the option is not there.

6-Installing obs-v4l2sink so I go here: https://github.com/CatxFish/obs-v4l2sink
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install

7-Open OBS again. Choose my desktop as source. I see my desktop bright and clear in the OBS preview. Go in tools. I now see V4L2 video output

8-Path: /dev/video2, video format NV12, click start

9-With Firefox, I go to https://www.onlinemictest.com/fr/webcam-test/
It asks me to choose a camera. I choose Dummy video device (0x0000)

And same problem than before. Nothing streams. Stuck at the same place again.


----------



## samekim82 (Sep 23, 2020)

Hi *thedarkangel*. I had the same issue and found this: 








						obs-v4l2sink Resolving all the issues to make it work · Issue #54 · CatxFish/obs-v4l2sink
					

I installed successfully to make it work toghether OBS with Zoom. I share my experience in just one post because I had to research in several posts to make it. OS Ubuntu 18.04 First of all I instal...




					github.com
				




*huertacjavier* solution was only copy a file with the command:
sudo cp /usr/lib/obs-plugins/v4l2sink.so /usr/lib/x86_64-linux-gnu/obs-plugins/

It worked to me. Hope the same goes to you.

Cheers,


----------



## scolimastra (Nov 12, 2020)

I have gotten it to work for me. But after I installed avatarify it got broken again. A thing that I noticed that you haven't done in your v4l2loopback is:
sudo depmod -a 

so to reinstall it try:
make clean && sudo make install
sudo depmod -a

Hope this helps,


----------



## fourpointsix (Nov 12, 2020)

thedarkangel said:


> 8-Path: /dev/video2, video format NV12, click start



I'm running the same config as you (Linux Mint, Cinnamon, /dev/video2, Firefox) and ran into the same black screen problem too. It turned out that NV12 always gives a black screen (RGB32 is even worse with a camera failure message). Switching to YUV420 or YUY2 worked for me. Hope it works for you too!


----------



## JanisE (Feb 23, 2021)

In my case (OBS 2.6.1.1 Linux), the Skype started showing the OBS cam when I changed its output resolution from 1920x1080 to 1280x720.


----------

