-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exclusive_caps limits loopback device to a single producer open (e.g. with OBS) #442
Comments
This is a duplicate of #404. |
after reading both #404 and this issue, they are different issues, one is getting no output, this guy just cant restart virtual cam after closing OBS without a reboot, an issue that I also have on Pop OS 22.04 System config
The possible solution but not ideal and would be a pain to implement across DE's either way I don't think this is an issue for the v4l2Loopback devs as this should be something that OBS could add to the .desktop file as part of installation... opinion? |
The solution is to FWIW: I'm currently reviewing this kernel driver together with a few others and we already found further issues (currently preparing PRs downstream). |
sorry i didn't answer on #470 yet, my time is limited (and developing |
Step 2: Environment:
v4l2loopback
version: 0.12.5 (via v4l2loopback-dkms package)Step 3: Describe the problem:
When using exclusive_caps=1, the loopback device can only be opened once by a producer. If the producer closes the device, it's no longer available to be opened by a subsequent producer.
This is being observed by multiple people in e.g. obsproject/obs-studio#4808 ... once a Virtual Camera is started and stopped, it's not possible to re-start a virtual camera without removing and reloading the v4l2loopback device.
Steps to reproduce:
Exiting OBS and removing/reloading the v4l2loopback module (via rmmod and modprobe) re-enables the virtual camera setting for another single instance.
Observed Results:
In more detail, here's the output of v4l2-ctl for a loopback device created without "exclusive_caps=1":
This remains the same before, during, and after Virtual Camera output in OBS. As a result, OBS is able to start/stop/re-start the virtual camera an unlimited number of times. However, Chrome will not find the device as a valid video input (thus the reason for wanting exclusive_caps=1).
With exclusive_caps=1, the device starts out with:
Once "Start Virtual Camera" is used in OBS, the device switches to:
At this point consumers such as Chrome can see the device and receive the video stream.
When "Stop Virtual Camera" is selected in OBS, the device switches to:
At this point the device is no longer available to be used by OBS or other producers for output (advertises neither OUTPUT nor CAPTURE capabilities). Subsequent attempts to "Start Virtual Camera" in OBS fail. The only mechanism found so far is to reboot or "rmmod v4l2loopback / modprobe v4l2loopback" to restart another loopback device.
Expected Results:
The text was updated successfully, but these errors were encountered: