Skip to content

Commit

Permalink
linux: Detect unavailable Virtual Cam
Browse files Browse the repository at this point in the history
  • Loading branch information
mihawk90 committed Nov 21, 2024
1 parent 6d62736 commit 823e84b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions checks/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,19 @@ def checkMissingModules(lines):

return [LEVEL_INFO, "Missing Modules (" + str(len(modulesMissingList)) + ")",
"""You are missing the following default modules:<br><ul><li>""" + modulesMissingString + "</li></ul>"]


def checkLinuxVCam(lines):
isDistroNix = search('Distribution:', lines)

if (len(isDistroNix) <= 0):
return

hasV4L2Module = search('v4l2loopback not installed', lines)

if len(hasV4L2Module) > 0:
return [LEVEL_INFO, "VCam not available",
"""Using the Virtual Camera requires the <code>v4l2loopback</code> kernel module to be installed.<br>
If required, please refer to our <a href="https://github.com/obsproject/obs-studio/wiki/install-instructions#prerequisites-for-all-versions">Install Instructions</a> on how to install this on your distribution.<br>
If the module was not already loaded OBS will normally ask you for permission to load it when required. This requires a working <code>polkit</code> setup.<br>
You can also load the module manually using <code>modprobe v4l2loopback exclusive_caps=1 card_label='OBS Virtual Camera'</code>."""]
1 change: 1 addition & 0 deletions loganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def doAnalysis(url=None, filename=None):
checkX11(logLines),
checkDesktopEnvironment(logLines),
checkMissingModules(logLines),
checkLinuxVCam(logLines),
checkMacPermissions(logLines)
])
messages.extend(checkVideoSettings(logLines))
Expand Down

0 comments on commit 823e84b

Please sign in to comment.