You are not logged in.
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 camerav4l2loopback 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/video1The 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
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
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
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?
Last edited by andmars (2025-05-03 09:08:03)
Offline
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
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