You are not logged in.

#1 2025-04-25 09:53:01

PeerK
Member
Registered: 2020-06-24
Posts: 45

Anyone else with an "v4l2loopback/virtual camera" issue (obs)

Hi,

Some weeks ago I posted an issue with v4l2loopback (https://bbs.archlinux.org/viewtopic.php?id=304292) when I try to start a virtual camera in obs.

Since there were issues in the v4l2loopback kerne module (https://github.com/obsproject/obs-studio/pull/11906), I thought, the problem will go away in a future version of v4l2loopback. But it is still there:

v4l2loopback loads perfectly without an error message. But when I try to start "virtual camera" in all my 3 arch linux PCs (Ryzen 5900HX+RX6600M, 2x Ryzen 8840) pop up this error message from obs

Failed to start the output. Please check the log file for details.
Note: If you are using the NVENC or AMD encoders, make sure that your graphics drivers are up-to-date.

In the logging, I just see

error: Failed to start streaming on '/dev/video0' (the argument is invalid)
error: Failed to start streaming on '/dev/video1' (the argument is invalid)
warning: Failed to start virtual camera

v4l2loopback is loaded on boot:

/etc/modprobe.d/v4l2loopback_options.conf

options v4l2loopback devices=2 max_buffers=4 video_nr=0,1 card_label='P30','VirtualCam' exclusive_caps=1,1
$ls -la /dev/video*
crw-rw----+ root video 0 B Fri Apr 25 11:15:40 2025  /dev/video0
crw-rw----+ root video 0 B Fri Apr 25 11:15:40 2025  /dev/video1

The issue in the kernel module seems to be fixed in the current version and I wonder, if anyone else has this obs/v4l2-problem or maybe a solution/workaround?

Kind regards,
Peer

(Since I dont want to necropost, I opened this new posting)

Offline

#2 2025-04-25 10:27:46

Schlaefer01
Member
Registered: 2024-01-12
Posts: 14

Re: Anyone else with an "v4l2loopback/virtual camera" issue (obs)

The issue is with OBS, so you have to wait for the next OBS release. Or roll back v4l2loopback to be compatible with current OBS.

Offline

#3 2025-04-25 11:18:45

PeerK
Member
Registered: 2020-06-24
Posts: 45

Re: Anyone else with an "v4l2loopback/virtual camera" issue (obs)

Schlaefer01 wrote:

The issue is with OBS, so you have to wait for the next OBS release. Or roll back v4l2loopback to be compatible with current OBS.

Great! I did not realize, that it was an obs issue and thought, that I had to configure v4l2loopback in a different way ..

Just for those, who stumble on the same issue (I am using yay. If you don't use droidcam, you may leave it ..):

# Install downgrade package
yay -S  downgrade

# remove v4l2loopback kernel module
sudo modprobe -r v4l2loopback

# uninstall v4l2loopback (and optional dependent packages) 
sudo pacman -R v4l2loopback-dkms v4l2loopback-utils droidcam

# downgrade to prior v4l2loopback
# - downgrade asks for the exact version
# - downgrade asks to pin the package in /etc/pacman.conf, key "IgnorePkg"
sudo downgrade v4l2loopback-dkms v4l2loopback-utils

# to see the pinning
less /etc/pacman.conf

# Load kernel module
sudo modprobe v4l2loopback

# check, if it is loaded
lsmod | grep v4l2

.. and run obs. Works for me :-)

Thanks!

Last edited by PeerK (2025-04-25 11:19:14)

Offline

#4 2025-05-03 09:06:15

andmars
Member
Registered: 2012-03-13
Posts: 583

Re: Anyone else with an "v4l2loopback/virtual camera" issue (obs)

Hi,
I tried nearly everything, obs-studio from [extra], obs-studio-git, even the flatpack. And with v4l2loopback-dkms I tried current 0.14.0-1 and downgraded to 0.13.2-1. But as soon as I hit the "start virtual camera" button it freezes and closes after a few seconds. Any idea of what else I could try?


20250503-11h06m44s-grim.png

Last edited by andmars (2025-05-03 09:08:03)

Offline

#5 2025-05-03 16:43:12

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: Anyone else with an "v4l2loopback/virtual camera" issue (obs)

Did you ensure to reboot or force unload/reload the module between versions? Did you downgrade v4l2loopback-utils as PeerK also noted?

If yes, test with other applications per ArchWiki. If OBS still has issues, I'd open a bug report with them.

Offline

#6 2025-07-10 06:34:48

ticpu
Member
Registered: 2013-02-25
Posts: 4

Re: Anyone else with an "v4l2loopback/virtual camera" issue (obs)

Since obs-studio isn't in a hurry to update things, I decided to create a v4l2loopback-obs-dkms package to make it work on Kernel 6.16, the latest working version now fails to compile with that new kernel.

Offline

Board footer

Powered by FluxBB