# OBS virtual cam on Linux.



## viciousflamingos (Dec 5, 2020)

Is there a way to use the OBS virtual cam on Linux? On other installations, I usually see a button on the right that allows you to turn on the virtual cam, but on my Linux installation, the option is not appearing. Is the virtual cam not on Linux or is there something else that I must do?


----------



## cash_flagg (Dec 9, 2020)

Virtual cam support is not built into the linux version just yet. You can get the functionality with the v4lsink plugin here:









						GitHub - CatxFish/obs-v4l2sink: obs studio output plugin for Video4Linux2 device
					

obs studio output plugin for Video4Linux2 device. Contribute to CatxFish/obs-v4l2sink development by creating an account on GitHub.




					github.com


----------



## viciousflamingos (Dec 9, 2020)

cash_flagg said:


> Virtual cam support is not built into the linux version just yet. You can get the functionality with the v4lsink plugin here:
> 
> 
> 
> ...


Thanks.


----------



## cash_flagg (Dec 9, 2020)

Looks like version OBS Studio 26.1 Release Candidate 1 has this feature built in, though not sure if you still need this plugin code or not, since I have not tried this release.


----------



## greg23 (Jan 26, 2021)

The current Linux release is 26.1.1 and no, it does not have the VirtualCam. I am curious to find out if v4l2sink will work with Discord. I will try as soon as I've got some time.


----------



## Profejuca (Jan 27, 2021)

You have to install v4l2loopback-dkms to have the virtual cam option (the same is required for sink) in 26.1.


----------



## obsnewnoob (Feb 7, 2021)

With 26.1.1, it does have the virtual cam feature, but you need to apt install v4l2loopback-dkms (and then possibly quit obs and reload it)


----------



## CLOVIS (Mar 8, 2021)

Can confirm the same solution works for ArchLinux, for anyone else using it, I added a bug report here: https://bugs.archlinux.org/task/69918


----------



## juan0172 (Mar 15, 2021)

Good afternoon. Yes, after install dkms, virtual camera button  appears, but, it's not posible run that virtual camera, even, in console, shows a warning that inform. Still read about....


----------



## buggydad (Mar 20, 2021)

Strange bug:  I'm on OBS 25.1.1 and can start Virtual Camera into Zoom (v 5.5.4).  Other people in Zoom can view my Virtual Camera but it is NOT being displayed in Zoom at all for me.  I just get a black screen instead.  Thoughts?


----------



## buggydad (Mar 20, 2021)

buggydad said:


> Strange bug:  I'm on OBS 25.1.1 and can start Virtual Camera into Zoom (v 5.5.4).  Other people in Zoom can view my Virtual Camera but it is NOT being displayed in Zoom at all for me.  I just get a black screen instead.  Thoughts?


Never mind.  It just started working.  No idea why but all's well that ends well.


----------



## Jorge Gustavo Rocha (Mar 25, 2021)

OBS 26.1.1 here, on Ubuntu 20.04, nvidia drivers, software encoding (x264), flatpak based install.
I've installed `v4l2loopback-dkms`, but no Virtual Camera option added.
Any ideas? Am I missing some additional package or configuration?


----------



## Jorge Gustavo Rocha (Mar 25, 2021)

I was an easy fix. I've uninstalled OBS from flatpak and installed it from ppa. It works now.


```
flatpak remove com.obsproject.Studio
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt install obs-studio
```


----------



## Jorge Gustavo Rocha (Mar 25, 2021)

Seems like a flatpak limitation.


----------



## Metabob (Apr 2, 2021)

Latest OBS, Mint 20.1 (4.8.6), Kernel 5.4.0-70, NVIDIA 460.39 Drivers

I'm experiencing a weird issue: a couple of weeks ago I finally managed to get OBS working properly, without weird interface glitch and including virtualcam...

Today I wanted to use it and had to realize that the virtualcam option is missing. For some reason it is just gone.

I have tried re-installing OBS and rebooting but the button didn't come back.

Has some one an idea how I can find out why it went missing?

Thanks!

Cheers


----------



## Metabob (Apr 19, 2021)

Anyone else where the virtual cam disappeared?


----------



## Metabob (Apr 19, 2021)

Now I have re-installed everything and virtual cam is back, but so is the weird display glitch.
Obs only shows everything as it should as long as I don't have my second monitor connected. Otherwise it makes super weird stuff. Probably because of the high-dpi scaling freature that I need to use in order to be able to read stuff on my my 165ppi displays.


----------



## Tuna (Apr 19, 2021)

Looks like you run a Wayland session. You will need OBS Studio v27 for that support. Else run it as a XWayland session or login in you system via classic/X11 session.


----------



## liekendeeler (Apr 19, 2021)

Hi, I'm new with OBS and wanna use it together with ZOOM.
I have the XWayland system running under Debian, where to get the v27?
Thanks


----------



## jukjukjuk (Apr 20, 2021)

Hi
My virtual cam is also lost at the moment.
I'm on debian buster, amd64.
I got it to work yesterday, after updating the debian generic Kernel to 5.10.0-6-amd64 and reinstalling it from the ftp.de.debian.org mirror, so I got the obs-studio v26.1.2.
After that I wanted to try also the liquorix kernel, which didn't functions out of the box. So I just wanted to deleted some old kernels, but accidently removed also the fresh installed gerneric kernel mentioned above. Now I reinstalled it - but the virtual camera is lost.
The v4l2loopback-dkms package is up to date.
What could be the Problem?


----------



## jukjukjuk (Apr 20, 2021)

jukjukjuk said:


> Hi
> My virtual cam is also lost at the moment.
> I'm on debian buster, amd64.
> I got it to work yesterday, after updating the debian generic Kernel to 5.10.0-6-amd64 and reinstalling it from the ftp.de.debian.org mirror, so I got the obs-studio v26.1.2.
> ...


Oh forget it! I was running into testing Debian 11 (bullseye) thrue "sid" tagged package repository in sources.list.d!


----------



## jukjukjuk (Apr 22, 2021)

For debian there is actually no stable obs studio with virtual camera supported - it is still in version 22.
The only way would be to install the unstable sid version of obs-studio v26.1.2. There it is enabled. My failure was to do so by adding the sid debian repository and installed it - a lot of changfe was done to the system so it was half unstable. There is also the way of compiling it from source code - but I don't know if this might not make the same half-unstable system like installing directly out of the unstable repository?
Doe's anyone have experience in that?


jukjukjuk said:


> Oh forget it! I was running into testing Debian 11 (bullseye) thrue "sid" tagged package repository in sources.list.d!


----------



## rcmorano (May 1, 2021)

liekendeeler said:


> Hi, I'm new with OBS and wanna use it together with ZOOM.
> I have the XWayland system running under Debian, where to get the v27?
> Thanks



You can find 27.0.0-rc2 ppa in this forum thread, tho it did not work for me (on ubuntu-20.10), it might work if you rebuild the package for your debian version (or just try to install latest ubuntu package available as it is; which I wouldn't recommend).


----------



## Astralix (Jun 12, 2021)

Hi!

I am stuck half way with that issue. While I had the virtual cam running in Ubuntu 20.04 I always only get one cance on Ubuntu 20.10.
So I can start the Virtual Camera only a single time after each reboot of the PC where it asks for super user login and then works fine.

When I stop the interface and start it again it just does nothing. Starting OBS by command line results in only a "remark"
warning: Failed to start virtual camera

Here is a snip of my startup

```
astralix@astralix:~$ QT_QPA_PLATFORM=xcb obs
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: AMD Ryzen 5 4600U with Radeon Graphics
info: CPU Speed: 2351.559MHz
info: Physical Cores: 6, Logical Cores: 12
info: Physical Memory: 15424MB Total, 9868MB Free
info: Kernel Version: Linux 5.11.0-18-generic
info: Distribution: "Ubuntu" "21.04"
info: Session Type: wayland
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered()
info: OBS 27.0.1 (linux)
```
Any quick solution to that issue?
(The wayland test also failed. Noch desktop sharing in Ubuntu 20.10 but that is a different thread)[/CODE]


----------



## j-maynard (Sep 13, 2021)

I can confirm the above


Astralix said:


> Hi!
> 
> I am stuck half way with that issue. While I had the virtual cam running in Ubuntu 20.04 I always only get one cance on Ubuntu 20.10.
> So I can start the Virtual Camera only a single time after each reboot of the PC where it asks for super user login and then works fine.
> ...



I can confirm the above bug in Ubuntu 21.04 and 20.04.  The `--verbose` option gives no additional information about whats going on under the hood which is a little frustrating.


----------



## j-maynard (Sep 29, 2021)

OK looks to be an issue with OBS disconnecting and unloading the v4l2loopback kernel module internally.  You can work round this by stopping the virtual camera in obs and then doing:


```
sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback
```

This reloads the module and allows obs to reconnect to the module.  This is still an issue in Obs 27.1.


----------



## jsfrerot (Oct 5, 2021)

I just updated to  version 27.1.3 and this issue is still present. Can we hope to have a it fixed in a future release ?
Thank you.


----------



## touchetd94 (Oct 15, 2021)

I was just able to figure out how to download OBS to my chromebook via Linux, however, I can’t seem to find my external webcam. Ive noticed a few people mention they were unable to find their virtual cam, and i’m not sure if this problem is connected to that issue. Can anyone help?


----------



## Tuna (Oct 15, 2021)

The problem is chromeos. It will not allow the camera to be seen by obs.

But also off topic as this thread is about virtual camera feature.


----------



## AaronD (Oct 16, 2021)

I use the snap version, which comes with a bunch of plugins pre-installed and working, including Virtual Cam, NDI, Advanced Scene Switcher, etc.








						Install OBS Studio on Linux | Snap Store
					

Get the latest version of OBS Studio for Linux - Free and open source software for live streaming and screen recording




					snapcraft.io
				




There are a bunch of copy-paste commands on that page to manually enable the connections required for all of the included functions, so I just did all of them.  My command history for that is:

```
sudo snap install obs-studio
sudo snap connect obs-studio:alsa
sudo snap connect obs-studio:audio-record
sudo snap connect obs-studio:avahi-control
sudo snap connect obs-studio:camera
sudo snap connect obs-studio:jack1
sudo snap connect obs-studio:kernel-module-observe
sudo apt install v4l2loopback-dkms v4l2loopback-utils
echo "options v4l2loopback devices=1 video_nr=63 card_label='OBS Virtual Camera'    exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback devices=63 video_nr=13 card_label='OBS Virtual Camera' exclusive_caps=1
sudo snap connect obs-studio:removable-media
sudo snap connect obs-studio:raw-usb
sudo snap connect obs-studio:joystick
```

And my OS info:

```
aaron@aaron-Lubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
aaron@aaron-Lubuntu:~$
```


----------



## NiftyNev (Feb 15, 2022)

AaronD said:


> I use the snap version, which comes with a bunch of plugins pre-installed and working, including Virtual Cam, NDI, Advanced Scene Switcher, etc.
> 
> 
> 
> ...



Thanks to *AaronD for his detail on the snap version of OBS with all the inclusions*. This solved my main problem of not having a Virtual Camera output in Obs-studio in Ubuntu 20.04, a fix for which I am very grateful. I can now use it as a reliable source for Skype in Ubuntu, rather than having to resort to my WIN 10 machine. It was a frustrating search to get to this point. More power to the Forums and knowledge sharing!


----------



## ccaprani (Feb 25, 2022)

j-maynard said:


> ```
> sudo modprobe -r v4l2loopback
> sudo modprobe v4l2loopback
> ```



This is the only thing that has worked for me - thank you, thank you, thank you!

OBS 27.2.1 & Ubuntu 21.10


----------



## Prikalel (Apr 14, 2022)

j-maynard said:


> OK looks to be an issue with OBS disconnecting and unloading the v4l2loopback kernel module internally.  You can work round this by stopping the virtual camera in obs and then doing:
> 
> 
> ```
> ...


This solution worked for me (mint, amd64, installed via apt).
I run commands and just restarted obs, - now virtual camera have started!


----------

