28.0.1-5 OBS causes uvcvideo to blank cameras after exiting and loads the wrong default properties
Operating System Info
Other
Other OS
reproducable, 2 different devices: 1.Desktop PC Arch Linux (x86) 2. Arch Linux (m1 arm64)
OBS Studio Version
Git
OBS Studio Version (Other)
28.0.1-5 (GIT)
OBS Studio Log URL
https://obsproject.com/logs/XkrZjuTzTkl4HhhW
OBS Studio (partial) blank/failing camera log
https://obsproject.com/logs/-YZjqDIYbvAXPq5a
Expected Behavior
- When OBS exits, and then when it is launched again, all webcams are still shown
- Default value of 'Zoom, Continuous', 'Pan Speed', 'Tilt Speed' is set to the minimum value upon creating new camera and loading it
Current Behavior
- When OBS exits, and then when it is launched again, some webcams are blank or not loaded at all
- Default value of 'Zoom, Continuous', 'Pan Speed', 'Tilt Speed' is set to the maximum value and my PTZ cameras go crazy
Steps to Reproduce
- Add webcam: NexiGo N970P to OBS. Exit OBS and Open OBS again ...
- Create a new cam and load the N970P camera. Look at the values 'Zoom, Continuous', 'Pan Speed', 'Tilt Speed' is set to the maximum value
Anything else we should know?
This camera is having Flash Memory to retain its settings and takes ~1 second to initialize. I use up to 4 of them at a time. But the problems relating blanking out also happen with only 1 camera connected. This issue is only existing on Linux. It doesnt matter which kernel or Device I use. It happens on any machine.
As a workaround, it helps to issue 'sudo rmmod uvcvideo; sudo modprobe uvcvideo'
That problem is not present in 'cheese' or 'guvcview', Zoom or any other application!
The issue regarding zooming and panning like crazy when a settings dialog is opened or OBS has been started are only happening on newly created cameras with the said values and the default values of '3' loaded, which is the maximum. Changing it afterwards to the minimum value fixes the issue.
This issue is no more present under Windows, after Hotfix 28.0.1. It was present in 28.0.0
I am in contact with the manufacturer and we found out that those problems are exclusive to ArchLinux / Linux.
This issue is no more present under Windows, after Hotfix 28.0.1. It was present in 28.0.0
This sounds like on Windows, this was fixed by https://github.com/obsproject/obs-studio/commit/bfa2053b083e36952fc182957ddc0ca035d59dd6 (the revert of #5480). I'm not sure what in the linux-v4l2 code would cause this on Linux.
This issue is no more present under Windows, after Hotfix 28.0.1. It was present in 28.0.0
This sounds like on Windows, this was fixed by bfa2053 (the revert of #5480). I'm not sure what in the linux-v4l2 code would cause this on Linux.
You mean the issue with OBS loading the max. values of 'Zoom, Continuous', 'Pan Speed', 'Tilt Speed' , right? That one got fixed under Windows with the hotfix, but still present under Linux. Under Windows those properties are not even available, only Linux. But yet they were set for some reason.
The blanking of the cams upon re-entering OBS (after exit) is another mentioned issue.
Just to clarify, the Windows and Linux video capture device sources are entirely separate, and do not share code so these issues might be somewhat similar in the end result, but are not related.
I have wrote a workaround script that https://termbin.com/gq6v
-
allows virtual cameras before start and reloads uvcvideo 3 seconds after it has exited.
-
adds a delay to execute the script before executing the uvcvideo reload. Otherwise, the workaround doesnt seem to work consistently.
-
I have set 'Zoom, Continuous', 'Pan Speed', 'Tilt Speed' to -3 so my cameras won't go crazy cause right now theres a issue with camera firmware. The other issue listed is camera independent.
-
And I have turned buffering to disabled on all cameras so it wont be laggy.
Without the script: 1x launch obs= cams working then exiting 1x launch obs= cams not working then exiting Launch OBS again, cams working
I think its OBS not waiting long enough or so
1x launch obs= cams working then exiting 1x launch obs= cams not working then exiting Launch OBS again, cams working
I get this exact behaviour. The workaround does not work for me. Also manually tried various longer sleep lengths between obs exit -> unload uvcvideo -> load uvcvideo. No difference. Lenovo Legion 5 Pro (2021) - AMD Ryzen 7 5800H Built-in webcam Arch Linux
1x launch obs= cams working then exiting 1x launch obs= cams not working then exiting Launch OBS again, cams working
I get this exact behaviour. The workaround does not work for me. Also manually tried various longer sleep lengths between obs exit -> unload uvcvideo -> load uvcvideo. No difference. Lenovo Legion 5 Pro (2021) - AMD Ryzen 7 5800H Built-in webcam Arch Linux
Today I made a service that disables uvcvideo by default and I had to improve my workaround. Can you try to only launch through the command line, issueing obs with the updated function? The service to disable uvcvideo by default, I made for my own privacy / interest. Completely optional.
You might want to delete the last line sh -c "obs || sleep 3; sudo rmod uvcvideo" Why? Cause it unloads all cameras when obs is closed. Perhaps you don't want this. But for me, who is only using the cameras when OBS is running, this is wanted.
https://termbin.com/w91s
Suddenly my lenovo laptop camera works fine all the time, without any workaround. Restarted obs many times without any issue. It could be that the obs-studio package on Arch was updated to 28.0.2-2.
After testing the workaround above, and then discover it was no longer needed in my case, I did the following setup:
/etc/modules-load.d/obs-cam.conf
v4l2loopback
/etc/modprobe.d/obs-cam.conf
options v4l2loopback devices=1
options v4l2loopback video_nr=10
options v4l2loopback card_label="OBS-Cam"
options v4l2loopback exclusive_caps=1
Updated to the most recent package, 28.0.2-2. Negative. With multiple webcams like I have, the issue is present as before
** Not fixed.**
Still an issue. Using 28.10 Beta
Literally have to reload uvcvideo. By the way, heres my updated function/workaround. https://termbin.com/th83c
New log: https://obsproject.com/logs/AUmEPf4kGpr_vnCU