OBS Virtual Camera Enable

I’m new to silverblue and I tried installing both rpm-ostree version and flathub version. Both of them do not show virtual camera option. I think it has something to do with v4l2loopback but I don’t know how to modprobe it or install it properly. If it is something else, please do help me with it. I would prefer entire command lines if any, because I’m new to linux.

I found the solution:

sudo -s
cd /etc/yum.repos.d/
wget *link* (get the repo from here https://copr.fedorainfracloud.org/coprs/sentry/v4l2loopback/)
rpm-ostree install v4l2loopback ffmpeg

then reboot twice to get it working.

An alternative, if you don’t want to overlay software from third party repos.

v4l2loopback is really easy to compile, it takes just few seconds and you can use it without installing it.

On the positive side: you will have a clean boot process and will load the loopback driver only when you need it, and you don’t need a reboot.

Negative: You need to recompile it whenever there are kernel upgrades. If you forget to do it, it does not matter - on loading you will get an error and then it is just a few seconds to recompile it.

Download source from git:

mkdir -p ~/sources
cd ~/sources
git clone https://github.com/umlaeute/v4l2loopback.git

Compile (needed on first run, and after a kernel-relate upgrade):

cd ~/sources/v4l2loopback
make clean

Load the module before starting OBS with the options you need (I use a script for this that looks like this):

echo Removing module in case it's there and you need a new version ...
sudo rmmod -v -f v4l2loopback
echo Loading v4l2loopback module with needed params ...
sudo insmod ~/sources/v4l2loopback/v4l2loopback.ko video_nr=11,12 max_buffers=2 exclusive_caps=1 card_label=vcam_OBS,vcam_Effects
echo Loaded.
ls /dev/video*

If the last line lists /dev/video11 and /dev/video12 than it’s loaded.

Then you can use OBS from flatpak and it will find the virtual camera without issues.

Regarding ffmpeg. I don’t think you need to overlay it. In case you need it, you can just download it from the official website as a static executable build and put it in /usr/local/bin (or ~/.local/bin which you put in your users PATH). This what I do when I need it.