webcamoid / akvirtualcamera

akvirtualcamera, virtual camera for Mac and Windows
GNU General Public License v3.0
393 stars 51 forks source link

[MacOS] Virtual cameras do not appear in applications but clients appear in list #61

Open mmase opened 2 years ago

mmase commented 2 years ago

Summary

AkVCamManager clients reveals a list of clients supposedly utilizing the virtual camera. However, these clients do not list the virtual camera in their list of available cameras.

Your Environment

hipersayanX commented 2 years ago

Which programs did you tested? also, if the app is listed, it means that the plugin was loaded by the app, maybe you forgot to configure something.

ink-splatters commented 1 year ago

I second this; my environment is described below, roughly.

TL;DR it is noteworthy that OBS Studio Virtual Device is at least being shown in apps (couldn't make it work though).

Env

I use nix for most of the stuff

macOS details:

% uname -a
Darwin airstation.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:52 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8103 arm64
% uname -a
% sw_vers
ProductName:            macOS
ProductVersion:         13.5
BuildVersion:           22G74

Build


nix-shell -p darwin.apple_sdk.frameworks.CoreMediaIO stdenv cmake ninja
cd <repo>
mkdir build && cd build
cmake -G Ninja ..
ninja

Install

# sudo implied

set -e
set -o pipe fail

cmiodalroot=/Library/CoreMediaIO/Plug-Ins/DAL
daemonsroot=/Library/LaunchDaemons
name=AkVirtualCamera.plugin
svcname=org.webcamoid.cmio.AkVCam.Assistant

mkdir -p $cmiodalroot

ln -sf "<repo>/build/build/$name" $cmiodalroot/$name

cat <<EOF > $daemonsroot/$svcname.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>$svcname</string>
        <key>MachServices</key>
        <dict>
                <key>$svcname</key>
                <true/>
        </dict>
        <key>ProgramArguments</key>
        <array>
                <string>$cmiodalroot/$name/Contents/Resources/AkVCamAssistant</string>
                <string>--timeout</string>
                <string>300.0</string>
        </array>
        <key>StandardErrorPath</key>
        <string>/var/log/AkVCamAssistant.log</string>
        <key>StandardOutPath</key>
        <string>/var/log/AkVCamAssistant.log</string>
</dict>
</plist>
EOF

launchctl bootstrap system $daemonsroot/$svcname.plist
launchctl kickstart -k system/$svcname

Dumbest setup

export PATH="/Library/CoreMediaIO/Plug-Ins/DAL/AkVirtualCamera.plugin/Contents/Resources/AkVCamManager:$PATH"

% AkVCamManager add-device -i mycam mycam
Device created as mycam
% AkVCamManager devices
+--------+-------------+
| Device | Description |
+--------+-------------+
| mycam  | mycam       |
+--------+-------------+
% AkVCamManager set-picture ~/Desktop/screenshot\ 2023-07-27\ at\ 22.20.02.jpeg mycam
% AkVCamManager picture mycam
/Users/ic/Desktop/screenshot 2023-07-27 at 22.20.02.jpeg

OBS device i̶s̶ ̶s̶h̶o̶w̶n̶!̶ ̶H̶m̶.̶.̶.̶

just works fine with csrutil enable --without fs

W̶h̶i̶l̶e̶ ̶t̶r̶y̶i̶n̶g̶ ̶t̶o̶ ̶m̶a̶k̶e̶ ̶i̶t̶ ̶w̶o̶r̶k̶ ̶w̶i̶t̶h̶ ̶O̶B̶S̶ ̶(̶f̶a̶i̶l̶e̶d̶ ̶f̶o̶r̶ ̶n̶o̶w̶,̶ ̶b̶u̶t̶ ̶I̶ ̶d̶i̶d̶n̶'̶t̶ ̶s̶p̶e̶n̶d̶ ̶t̶o̶o̶ ̶m̶u̶c̶h̶ ̶t̶i̶m̶e̶)̶,̶ ̶O̶B̶S̶ ̶d̶e̶v̶i̶c̶e̶ ̶i̶s̶ ̶̶s̶h̶o̶w̶n̶̶ ̶i̶n̶ ̶a̶p̶p̶s̶ ̶(̶b̶u̶t̶ ̶d̶o̶e̶s̶n̶'̶t̶ ̶w̶o̶r̶k̶ ̶t̶h̶e̶r̶e̶)̶ ̶ ̶T̶e̶s̶t̶e̶d̶ ̶a̶s̶ ̶p̶e̶r̶ ̶O̶B̶S̶ ̶i̶n̶s̶t̶r̶u̶c̶t̶i̶o̶n̶s̶,̶ ̶w̶i̶t̶h̶ ̶r̶e̶s̶i̶g̶n̶i̶n̶g̶ ̶a̶p̶p̶s̶,̶ ̶e̶v̶e̶n̶t̶u̶a̶l̶l̶y̶ ̶e̶n̶d̶e̶d̶ ̶w̶i̶t̶h̶ ̶a̶l̶l̶ ̶t̶h̶e̶ ̶w̶a̶y̶ ̶d̶i̶s̶a̶b̶l̶i̶n̶g̶ ̶S̶I̶P̶ ̶a̶n̶d̶ ̶c̶o̶d̶e̶ ̶s̶i̶g̶n̶i̶n̶g̶ ̶c̶h̶e̶c̶k̶s̶ ̶(̶m̶a̶y̶b̶e̶ ̶n̶o̶w̶ ̶i̶t̶'̶s̶ ̶a̶ ̶p̶r̶o̶b̶l̶e̶m̶ ̶o̶n̶ ̶i̶t̶s̶ ̶o̶w̶n̶ ̶-̶ ̶I̶'̶m̶ ̶n̶o̶t̶ ̶s̶u̶r̶e̶)̶

afh commented 4 weeks ago

Any update on this? I'm running into the same issue with macOS 15.0

hipersayanX commented 3 weeks ago

@afh I have no way of testing the virtual camera in MacOs right now. Donations are welcome.