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

thedarkangel

New Member
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.
 

thedarkangel

New Member
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

New Member
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?
 

thedarkangel

New Member
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

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

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

New Member
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

New Member
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

New Member
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.
 
Top