You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error attempting to open more then 16 video devices #5422
The red text is the logging I added. The device number continues to increment. (the leak seems to be happening)
OBS Studio Crash Log URL
No response
Expected Behavior
Regardless of the number of video devices, and even if an error occurs, it should be ignored and work fine.
Current Behavior
If there is a video device that is un-normal camera device (can't get parameters normally?),
If click the device list on the v4l2 settings page, or click an un-normal device,
After that, v4l2 no longer works.
There are currently 9 v4l2 devices, some may not get the parameters properly. (Not sure.)
Steps to Reproduce
Create a V4L2 input.
Enter V4L2 settings.
(It is still normal.)
Select an un-normal device.
After that, v4l2 no longer works.
Anything else we should know?
A device expressed as an un-normal device is a v4l2-m2m codec device.
Activity
jclab-joseph commentedon Oct 17, 2021
obs-studio/plugins/linux-v4l2/v4l2-input.c
Line 696 in 8f1d245
I found a leak in this part. But if I fix this part, I get an infinite loop now.
Log: https://gist.github.com/jclab-joseph/1db7cfe71b4c48b6d8391fd0fd6f9215
kkartaltepe commentedon Oct 17, 2021
Im not convinced this is a sign of a leak. Instead a new device id is likely chosen every time you open a new device.
The proposed change seems good if you want to submit a PR for it.
If you find yourself in a infinite loop consider rebuilding at head now that 08d4456 is applied and see if that fixes the loop issue for your device.
v4l2: fix handle leak
jclab-joseph commentedon Oct 17, 2021
Applying the latest commits has the same problem.
When entering the settings page, input_selected is called infinitely.
Log : https://gist.github.com/jclab-joseph/b4ac47a6f8d3b166282d442e72f32aa3
Branch : https://github.com/jclab-joseph/obs-studio/tree/fix/v4l2-leak
kkartaltepe commentedon Oct 18, 2021
Hmmm I think i can replicate this by just returning false in
input_selectedwith a c920.jclab-joseph commentedon Oct 18, 2021
https://gist.github.com/jclab-joseph/cac9faa679164a8a365c432ac730262a
Four obs_property_modified above causes infinity. Can you tell me who triggers obs_property_modified?
I'm debugging to fix this issue.
gruzilla commentedon Jun 22, 2022
I just experienced the same problem on a raspberry pi 4.
as a workaround i
rmmod bcm2835_ispandrmmod bcm2835_v4l2to reduce the amount of v4l2 devices and it worked around.ethagnawl commentedon Jan 22, 2024
@gruzilla's workaround worked for me on a Pi 4 B, too.
vicary commentedon Feb 2, 2024
The workaround doesn't work for Raspberry Pi 5, I guess the latest OS is not using these mods?
mh5 commentedon Jan 3, 2026
On my Raspberry Pi 5, a driver named
pisp_beis responsible for several/dev/video*files.My understanding is that those files are for the camera modules that attach through the IO ports, which are different from USB cameras.
I unloaded the module, and that resolved the camera problems with OBS.
This command does not persist after reboot.