OBS virtual cam on Linux.

jukjukjuk

New Member
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?
Oh forget it! I was running into testing Debian 11 (bullseye) thrue "sid" tagged package repository in sources.list.d!
 

jukjukjuk

New Member
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?
Oh forget it! I was running into testing Debian 11 (bullseye) thrue "sid" tagged package repository in sources.list.d!
 

rcmorano

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

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

New Member
I can confirm the above
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
Code:
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]

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

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

Code:
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

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

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

Member
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

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

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:
Bash:
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:
Code:
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

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

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:
Bash:
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:
Code:
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:~$

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!
 

Prikalel

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

Code:
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.
This solution worked for me (mint, amd64, installed via apt).
I run commands and just restarted obs, - now virtual camera have started!
 

MrGamy

New Member
[...]
Code:
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
[...]
Can confirm that when installing v4l2loopback manually these are the important steps. The two modprobe echo commands will start v4l2loopback at boot with the correct options. Therefore removing the need to run OBS as root / with privileges (sudo) to enable v4l2loopback (virtual camera).

the modprobes at the end are only required for the current session. A reboot would do the same. ("modprobe -r" unloads v4l2loopback if it was loaded before; the second one loads it with the correct parameters given)

Thank you AaronD!
 

Jigs

New Member
I was able to get the VirtualCamera to work on Fedora 37 using help from this blog.

Notice that the below line in the blog post uses version 34 of fedora I believe, so try replacing the 34 from `rpmfusion-free-release-34` with with your version of fedora for my case I use version 37 so it works like so `rpmfusion-free-release-37`.
Bash:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-34.noarch.rpm

I'm basically quoting the whole blog post here for good measure, it says:
By default on Fedora, when you install the package obs-studio you might not see the “Start virtual camera” button.

The reason is that OBS is expecting a v4l2loopback module to be loaded.

Installation​

In order to do so, you will need to enable rpmfusion repositories and install the package “v4l2loopback”:

Bash:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-34.noarch.rpm
Bash:
sudo dnf install v4l2loopback kmod-v4l2loopback
Then insert the module:

Bash:
sudo modprobe v4l2loopback devices=1 max_buffers=2 exclusive_caps=1 card_label="VirtualCam"
If modprobe fails try this before rerunning the modprobe command:

Bash:
sudo depmod
You can configure some settings for your new virtual camera with v4l2loopback-ctl.

OBS Studio​

Now, start OBS Studio and you should see the “Start virtual camera” menu in the lower right corner.

The virtual camera allows you to inject pictures, logos, text, video streams (using VLC), etc. in your original webcam stream.

When in Zoom, Google Meet, Webex or others, simply choose the virtual camera as your video input device, and your audience should whatever you added in OBS Studio.

Have fun!
 

johajoghurtman

New Member
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?
As of 05.07.2023, I'm using OBS Studio 27.2.3+dfsg1-1 on Linux Mint 21.
In the bottom right corner of OBS Studio, I got an option called "Start Virtual Camera"
Pressing this button will enable a virtual camera without installing any new software or plugins.

1688574931963.png
 
Top