Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

DAL plugins don't work in apps with hardened runtime (e.g. in Zoom, Teams, Skype, Safari, Quicktime, Photo Booth etc) #4

Open
ChrisWeiss opened this issue Apr 2, 2020 · 185 comments

Comments

@ChrisWeiss
Copy link

I ran through the compile and everything seems to be fine, am able to run OBS from the terminal, but I'm not seeing any new video sources in Photo Both or Google Hangouts.
The console output when launching indicates that it is loading the module (though there is some warning)
Is there some other step I need to complete?

info: CPU Name: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
info: CPU Speed: 3100MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 16384MB Total
info: OS Name: Mac OS X (NSMACHOperatingSystem)
info: OS Version: Version 10.14.6 (Build 18G3020)
info: Kernel Version: 18.7.0
info: hotkeys-cocoa: Using layout 'com.apple.keylayout.US'
info: Portable mode: false
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_actionGridMode_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
info: OBS 25.0.3-10-g094edda8 (mac)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 44100
	speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter ATI Technologies Inc. AMD Radeon Pro 560 OpenGL Engine
info: OpenGL loaded successfully, version 4.1 ATI-2.11.21, shading language 4.10
info: ---------------------------------
info: video settings reset:
	base resolution:   1680x1050
	output resolution: 1120x700
	downscale filter:  Bicubic
	fps:               30/1
	format:            NV12
	YUV mode:          601/Partial
info: NV12 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
error: os_dlopen(libpython3.7m.dylib->libpython3.7m.dylib): dlopen(libpython3.7m.dylib, 257): image not found

warning: [Python] Could not load library: libpython3.7m.dylib
2020-04-02 16:38:30.976 obs[31358:10316186] alloc
2020-04-02 16:38:30.976 obs[31358:10316186] query 2
2020-04-02 16:38:30.976 obs[31358:10316186] release 2
2020-04-02 16:38:30.976 obs[31358:10316186] ** MyPlugInitializeWithObjectID
2020-04-02 16:38:30.976 obs[31358:10316186] init
2020-04-02 16:38:30.976 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:30.976 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:30.976 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.050 obs[31358:10316186] Trying to get Surface
2020-04-02 16:38:31.051 obs[31358:10316186] Found Surface
2020-04-02 16:38:31.051 obs[31358:10316186] Surface is the wrong size: 320 240 vs 640.000000 480.000000
2020-04-02 16:38:31.051 obs[31358:10316186] Surface is 0x0
2020-04-02 16:38:31.052 obs[31358:10316186] Driver name is 8 CamTwist
2020-04-02 16:38:31.052 obs[31358:10316186] <CMVideoFormatDescription 0x7fdda2786280 [0x7fff9a70b8e0]> {
	mediaType:'vide'
	mediaSubType:'BGRA'
	mediaSpecific: {
		codecType: 'BGRA'		dimensions: 640 x 480
	}
	extensions: {<CFBasicHash 0x7fdda2783f70 [0x7fff9a70b8e0]>{type = immutable dict, count = 4,
entries =>
	1 : <CFString 0x7fff9aade618 [0x7fff9a70b8e0]>{contents = "CVFieldCount"} = <CFNumber 0x311cba1434bdec05 [0x7fff9a70b8e0]>{value = +1, type = kCFNumberSInt64Type}
	2 : <CFString 0xa62e8a0 [0x7fff9a70b8e0]>{contents = "CVBytesPerRow"} = <CFNumber 0x311cba1434b7ed05 [0x7fff9a70b8e0]>{value = +2560, type = kCFNumberSInt64Type}
	4 : <CFString 0x7fff9a984f90 [0x7fff9a70b8e0]>{contents = "com.apple.cmio.format_extension.video.only_has_i_frames"} = <CFBoolean 0x7fff9a70bc30 [0x7fff9a70b8e0]>{value = true}
	5 : <CFString 0x7fff9a970d18 [0x7fff9a70b8e0]>{contents = "FormatName"} = <CFString 0xa62e8c0 [0x7fff9a70b8e0]>{contents = "Component Video - CCIR-601 RGB"}
}
}
}
2020-04-02 16:38:31.052 obs[31358:10316186] Name CamTwist
2020-04-02 16:38:31.078 obs[31358:10316186] alloc
2020-04-02 16:38:31.078 obs[31358:10316186] query 2
2020-04-02 16:38:31.078 obs[31358:10316186] release 2
2020-04-02 16:38:31.078 obs[31358:10316186] ** MyPlugInitializeWithObjectID
2020-04-02 16:38:31.078 obs[31358:10316186] init
2020-04-02 16:38:31.078 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.078 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.078 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.078 obs[31358:10316186] <CMVideoFormatDescription 0x7fdda789aa30 [0x7fff9a70b8e0]> {
	mediaType:'vide'
	mediaSubType:'2vuy'
	mediaSpecific: {
		codecType: '2vuy'		dimensions: 640 x 480
	}
	extensions: {<CFBasicHash 0x7fdda789c840 [0x7fff9a70b8e0]>{type = immutable dict, count = 6,
entries =>
	0 : <CFString 0x7fff9aade798 [0x7fff9a70b8e0]>{contents = "CVImageBufferYCbCrMatrix"} = <CFString 0x7fff9aade7d8 [0x7fff9a70b8e0]>{contents = "ITU_R_601_4"}
	1 : <CFString 0x7fff9aade618 [0x7fff9a70b8e0]>{contents = "CVFieldCount"} = <CFNumber 0x311cba1434bdec05 [0x7fff9a70b8e0]>{value = +1, type = kCFNumberSInt64Type}
	2 : <CFString 0x7fff9aade8f8 [0x7fff9a70b8e0]>{contents = "CVImageBufferTransferFunction"} = <CFString 0x7fff9aade7b8 [0x7fff9a70b8e0]>{contents = "ITU_R_709_2"}
	4 : <CFString 0x7fff9a984f90 [0x7fff9a70b8e0]>{contents = "com.apple.cmio.format_extension.video.only_has_i_frames"} = <CFBoolean 0x7fff9a70bc30 [0x7fff9a70b8e0]>{value = true}
	5 : <CFString 0x7fff9aade878 [0x7fff9a70b8e0]>{contents = "CVImageBufferColorPrimaries"} = <CFString 0x7fff9aade8b8 [0x7fff9a70b8e0]>{contents = "SMPTE_C"}
	6 : <CFString 0x7fff9a970d18 [0x7fff9a70b8e0]>{contents = "FormatName"} = <CFString 0xa62e920 [0x7fff9a70b8e0]>{contents = "Component Video - CCIR-601 uyvy"}
}
}
}
2020-04-02 16:38:31.142 obs[31358:10316186] Name CamTwist (2VUY)
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
info: No blackmagic support
info: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
warning: Failed to load 'en-US' text for module: 'obs-mac-virtualcam.so'
warning: Ignoring old obs-browser.so version
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-mac-virtualcam.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     mac-vth264.so
info:     mac-syphon.so
info:     mac-decklink.so
info:     mac-capture.so
info:     mac-avcapture.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info:     coreaudio-encoder.so
info: ---------------------------------
info: ==== Startup complete ===============================================
error: Service '' not found
info: All scene data cleared
info: ------------------------------------------------
info: coreaudio: device 'Built-in Microphone' initialized
info: [Media Source 'Media Source']: settings:
	input:                   /Users/cweiss/Downloads/Binary_numbers_alpha_overlay_01_Videvo.mov
	input_format:            (null)
	speed:                   100
	is_looping:              yes
	is_hw_decoding:          no
	is_clear_on_media_end:   yes
	restart_on_activate:     yes
	close_when_inactive:     no
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.471 obs[31358:10316186] enog
2020-04-02 16:38:31.471 obs[31358:10316186] bolg
2020-04-02 16:38:31.471 obs[31358:10316186] 0
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.471 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.471 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.471 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] grrf
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] grrf
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] trfn
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] trfm
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] trfn
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] DN: CamTwist
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] dulp
2020-04-02 16:38:31.472 obs[31358:10316186] tpni
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.472 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.472 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.472 obs[31358:10316186] elt 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.472 obs[31358:10316186] enog
2020-04-02 16:38:31.472 obs[31358:10316186] bolg
2020-04-02 16:38:31.472 obs[31358:10316186] 0
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.472 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectSetPropertyData
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] grrf
2020-04-02 16:38:31.473 obs[31358:10316186] bolg
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] grrf
2020-04-02 16:38:31.473 obs[31358:10316186] bolg
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] trfn
2020-04-02 16:38:31.473 obs[31358:10316186] bolg
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] trfm
2020-04-02 16:38:31.473 obs[31358:10316186] bolg
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] trfn
2020-04-02 16:38:31.473 obs[31358:10316186] bolg
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] DN: CamTwist (2VUY)
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectHasProperty
2020-04-02 16:38:31.473 obs[31358:10316186] dulp
2020-04-02 16:38:31.473 obs[31358:10316186] tpni
2020-04-02 16:38:31.473 obs[31358:10316186] 0
2020-04-02 16:38:31.473 obs[31358:10316186] MyPlugObjectGetPropertyDataSize
2020-04-02 16:38:31.473 obs[31358:10316186] sel dnwo
2020-04-02 16:38:31.473 obs[31358:10316186] scope bolg
2020-04-02 16:38:31.473 obs[31358:10316186] elt 0
info: EyeSight: Selected device 'FaceTime HD Camera'
info: EyeSight: Using preset 1280x720
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Syphon Client' (syphon-input)
info:     - source: 'Media Source' (ffmpeg_source)
info:     - source: 'EyeSight' (av_capture_input)
info:         - filter: 'Crop/Pad' (crop_filter)
info:         - filter: 'Chroma Key' (chroma_key_filter)
info: ------------------------------------------------
info: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Mic/Aux)

info: User Removed source 'Syphon Client' (syphon-input) from scene 'Scene'
info: EyeSight: Selected preset AVCaptureSessionPreset1280x720
@johnboiles
Copy link
Owner

Yeah I've been running into sporadic code signing issues. Every now and then macOS will block the plugin from loading. I haven't been able to pin down why it only happens sometimes. Do you see anything in Console.app if you search for virtualcam?

@rberenguel
Copy link

It shouldn’t be needed, but after a restart I got it (Google Meet on Chrome, but only shows sometimes on Photo Booth: this also happens with other virtual camera devices)

@johnboiles
Copy link
Owner

Did you try a Google Meet meeting and the person on the other end was able to see you? I've been having trouble with this (see #2) -- I can see my own preview fine but the person on the other end reports my video as frozen.

@rberenguel
Copy link

Yes I’ve seen your other issue. No, it was late and I just was confirming it seemed to work, this was only in the preview. The frame syncing you added didn’t fix the issue?

@ChrisWeiss
Copy link
Author

ChrisWeiss commented Apr 3, 2020

Sure enough, I get the following in Console (even after a reboot):
default 10:00:02.619975 -0700 Photo Booth Error loading /Library/

CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam, 0x0106): code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam) not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
default	10:00:02.620077 -0700	Photo Booth	Cannot find function pointer AppleCMIODPSampleVCamPlugIn for factory <CFUUID 0x6000017270c0> 35FDFF29-BFCF-4644-AB77-B759DE932ABE in CFBundle/CFPlugIn 0x7f82913134f0 </Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin> (bundle, not loaded)

FWIW - This is a corporate laptop and it's pretty locked down. (I dont think I could get away with disabling SIP to get some of the other solutions to work).

@johnboiles
Copy link
Owner

I've gotten this sometimes as well and it's baffling to me. One thing I'm trying is changing my codesigning identity to my personal developer account

diff --git a/src/dal-plugin/CMakeLists.txt b/src/dal-plugin/CMakeLists.txt
index c354f13c..a358bfc1 100644
--- a/src/dal-plugin/CMakeLists.txt
+++ b/src/dal-plugin/CMakeLists.txt
@@ -155,6 +155,6 @@ add_custom_command(TARGET dal-plugin

 add_custom_command(TARGET dal-plugin
        POST_BUILD
-       COMMAND /usr/bin/codesign --force --deep --sign - --timestamp=none ${TARGET_DIR}/obs-mac-virtualcam.plugin
+       COMMAND /usr/bin/codesign --force --deep --sign [my 40 char codesign identity] --timestamp=none ${TARGET_DIR}/obs-mac-virtualcam.plugin
        COMMENT "Codesign plugin"
 )

Then that assigns a Team ID during codesigning. But it doesn't explain why it sometimes works without a team id.

@ChrisWeiss does your locked down corporate laptop have Carbon Black on it? Mine does and I always give that thing a suspicious look when spooky system things like this happen.

@gxalpha
Copy link
Collaborator

gxalpha commented Apr 3, 2020

On this issue: I was only able to get video in quicktime. While in other apps like photo booth and discord i can select the virtualcam, it won't give output.
For discord the preview shows a black screen, and the actual video shows that it is loading all the time; and for photo booth when i select the virtualcam, the picture of the facetime camera i had before just freezes.
I know we're probably not at this point yet, but I just wanted to inform you about the issue. Also rebooting didn't help.

@johnboiles
Copy link
Owner

Thanks for the additional info @gxalpha! Every bit is helpful to try to understand what is happening!

@spenserpothier
Copy link

I am experiencing this issue as well. I was able to get this plugin working on my employer laptop (which I believe is Mojave) but not on my personal computer which is on Catalina.
I am able to see the virtual camera in Hangouts and Quicktime, but not Zoom or Photobooth.
I tried to get a list of available input devices and got the following which makes me think that this is onto something:

$ system_profiler SPCameraDataType

2020-04-04 17:21:25.454 system_profiler[884:23513] Error loading /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam, 0x0106): code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam) not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
Camera:

    FaceTime HD Camera (Built-in):

      Model ID: UVC Camera VendorID_1452 ProductID_34304
      Unique ID: 0x[redacted]8600

    HD Pro Webcam C920:

      Model ID: UVC Camera VendorID_1133 ProductID_2093
      Unique ID: 0x[redacted]082d

Hope this helps narrow it down, when this is working it's great!

@cgudea
Copy link

cgudea commented Apr 5, 2020

I have intermittent functionality after reboots, recompiles, etc

right now Im getting

$ system_profiler SPCameraDataType
2020-04-04 19:55:21.258 system_profiler[8078:40898] Error loading /Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam, 0x0106): code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam) not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
2020-04-04 19:55:21.258 system_profiler[8078:40898] Cannot find function pointer AppleCMIODPSampleVCamPlugIn for factory 35FDFF29-BFCF-4644-AB77-B759DE932ABE in CFBundle/CFPlugIn 0x7fa31722cbc0 </Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin> (bundle, not loaded)
Camera:

    FaceTime HD Camera:

      Model ID: Apple Camera VendorID_0x106B ProductID_0x1570
      Unique ID: …

@ChrisWeiss
Copy link
Author

No Carbon Black, we do have other security tools installed that I can't disclose :) I'll try doing the build on my personal Mac.

Any other information I can provide to help?

@johnboiles
Copy link
Owner

The inconsistency is super frustrating to me -- sometimes macOS allows it to run and sometimes it doesn't. I haven't been able to find a pattern.

I think this will be solved once we make a distribution package of this with a real production code signature. If anyone wants to help get a release infrastructure up and running here that'd be great!

For now, my hack above seems to be working ok when I get into this state where it won't run. To make/retrieve your codesigning identity

  1. Make sure you're logged into Xcode with your Apple ID (Xcode->Preferences->Accounts)
  2. security find-identity -v -p codesigning to see the available codesigning identities and the associated 40 character hex identifier.
  3. Change the CMakeLists.txt file for dal-plugin to use codesign --sign [your 40 char id] instead of codesign --sign -
diff --git a/src/dal-plugin/CMakeLists.txt b/src/dal-plugin/CMakeLists.txt
index c354f13c..a358bfc1 100644
--- a/src/dal-plugin/CMakeLists.txt
+++ b/src/dal-plugin/CMakeLists.txt
@@ -155,6 +155,6 @@ add_custom_command(TARGET dal-plugin

 add_custom_command(TARGET dal-plugin
        POST_BUILD
-       COMMAND /usr/bin/codesign --force --deep --sign - --timestamp=none ${TARGET_DIR}/obs-mac-virtualcam.plugin
+       COMMAND /usr/bin/codesign --force --deep --sign [my 40 char codesign identity] --timestamp=none ${TARGET_DIR}/obs-mac-virtualcam.plugin
        COMMENT "Codesign plugin"
 )

@johnboiles johnboiles added the bug Something isn't working label Apr 6, 2020
@anoldguy
Copy link

anoldguy commented Apr 8, 2020

Another data point here.

  • Catalina 10.15.4
  • Xcode 11.4
  • Homebrew other bits
  • No special security software
  • security fin... returns a valid identifier from xcode for my account
  • I get the same error whether I use ad-hoc (-) or my hex identifier

code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam) not valid for use in process: mapping process is a platform binary, but mapped file is not

Rebooting and/or re-signing does not change this. No action/response needed, I'll keep following this issue on my own. Thanks for digging into this feature so quickly!

@johnboiles
Copy link
Owner

@anoldguy Thanks for the data point! What software are you using to try to view the webcam stream? I think one part of this is that some software seems more sensitive than others

@johnboiles johnboiles changed the title Not seeing new video source available in apps DAL plugin unable to run because of codesigning issues Apr 8, 2020
@anoldguy
Copy link

anoldguy commented Apr 8, 2020

Anything. PhotoBooth, Hangouts, Meet, Zoom, Whereby, Quicktime.

@spenserpothier
Copy link

Just one more piece of info, as of the latest update to zoom it is not working in either Mojave or Catalina.

Still showing up in quicktime and hangouts for me though.

@hkatzdev
Copy link

hkatzdev commented Apr 10, 2020

Could it be unable to run even if signed due to Library Validation?
https://developer.apple.com/documentation/security/hardened_runtime
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation

Judging from https://nvd.nist.gov/vuln/detail/CVE-2020-11470, it appears that Zoom removed the entitlement in version 4.6.8, which could explain why it works for some people but not others.

I might try installing https://github.com/mologie/macos-disable-library-validation tomorrow in order to see if this is truly the issue.

Since installing the above requires disabling SIP, I just downgraded Zoom.us to 4.6.8. If any of you also want to do so for testing purposes, you can run brew cask install hkatzdev/cask-zoomus-vc/zoomus if you use Homebrew or just download it from https://zoom.us/client/4.6.19178.0323/Zoom.pkg. After downgrading, I was able to use the OBS Virtual Camera. Additionally, another app called CamTwist, which similarly stopped working in later versions of Zoom.us, started working again in the older version.

Therefore, I'm pretty sure it was to do with Library Validation. Unfortunately, I can't think of a good solution that doesn't involve disabling SIP unless Zoom signs the plugin, which would only fix it for Zoom.

@hkatzdev
Copy link

hkatzdev commented Apr 10, 2020

For Zoom at least, it is possible to get this to work by resigning it with the Disable Library Validation Entitlement. I signed the latest zoom with sudo codesign --entitlements entitlements.xml -f -s - /Applications/zoom.us.app and have not noticed any issues yet. Perhaps there could be a script that automates this for apps of your choosing?

Edit: Adding the Disable Library Validation Entitlement doesn't appear to be necessary, although if I had to guess that has to do with it not being signed with a certificate (although if zoom.us and the plugin were signed with the same certificate I believe it still wouldn't be necessary). This is definitely not optimal for security reasons but it works.

@johnboiles
Copy link
Owner

johnboiles commented Apr 10, 2020

@hkatzdev Thank you for all the info about library validation and the workarounds! The Snap Camera docs also talk about how Zoom 4.6.9+ are not supported.

So here are the codesigning issues we know about:

  • Some apps (Zoom, Slack) cannot any DAL plugins that are not signed with the same code signature as the application.
  • Adhoc codesigning (codesign --sign -) only sometimes works (Console.app shows mapped file has no Team ID and is not a platform binary in the console). This will probably cease to be an issue once we make production certificate codesigned releases.
  • System applications (Safari, FaceTime, PhotoBooth) cannot load DAL Plugins (Console.app shows not valid for use in process: mapping process is a platform binary, but mapped file is not) (reported by @anoldguy)
    • Why this happens: Seems to be a macOS security feature to prevent arbitrary code from loading in macOS.
    • Workaround: None so far. 3rd party webcams seem to work though. Is that because the driver for those comes from Apple (for UVC cameras). If we went deeper and emulated hardware could we make it work?

@johnboiles
Copy link
Owner

johnboiles commented Apr 10, 2020

@anoldguy can you double check that when using your own signing identity, and trying to open the source in QuickTime and Chrome you get the same not valid for use in process: mapping process is a platform binary, but mapped file is not message?

I want to make sure you didn't copy/paste that log from a system application (like Facetime) and got a different error from other applications (QuickTime, Chrome) that are working for some of us on Catalina.

@anoldguy
Copy link

Clean built the project. Current state:

Quicktime: Works
Browser based: Safari, no camera. Firefox, camera, but no video.
OS (Facetime/Photobooth): No camera.

@johnboiles
Copy link
Owner

@anoldguy and do you get that same platform binary error message when using QuickTime/Firefox? Or only for Safari/Facetime/Photobooth?

@yasushisakai
Copy link

Thank you all for the effort!! This helps a lot.

I confirm @hkatzdev's comment works for the latest zoom! For documentation sake, I wasn't familiar with PropertyLists, but I made it work having the below content for entitlements.xml

<?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>com.apple.security.cs.disable-library-validation</key>
	<true/>
</dict>
</plist>

@jmb
Copy link

jmb commented Apr 11, 2020

Thanks @yasushisakai and @hkatzdev this works fine for me and Zoom 4.6.10 (20041.0408)

@Jacob-Dyer
Copy link

Yeah thanks @hkatzdev and @yasushisakai, your solution fixed it for me too, Zoom 4.6.10 on Catalina 10.15.3. I can access my Blackmagic capture device again from within Zoom. Cheers!

@jimmydigital
Copy link

jimmydigital commented Apr 11, 2020 via email

@hkatzdev
Copy link

hkatzdev commented Apr 12, 2020

Unfortunately, I made a mistake with the code I posted earlier. While resigning the code as I mentioned above works, it also completely removes the hardened runtime, which is not great for security. Instead, here is some very poorly written code that should do the following.

  1. Get the entitlements as xml
  2. Parse it using xml2
  3. Add the Disable Library Validation Entitlement to the list
  4. Turn it back into an xml file with 2xml and save it as an xml file
  5. Using the preserve-metadata option, attempt to change the least amount of things when resigning (including keeping hardened mode on if it was enabled before) while adding the new entitlement.

I tested the below command on Zoom.us, and now I have obs-mac-virtualcam working with Zoom.us's hardened mode enabled.

APPLICATION=/Applications/zoom.us.app && codesign -d --entitlements :- $APPLICATION | { xml2; echo "/plist/dict/key=com.apple.security.cs.disable-library-validation"; echo "/plist/dict/true"; } | 2xml > entitlements.xml && sudo codesign --sign - $APPLICATION --force --preserve-metadata=identifier,resource-rules,flags --entitlements=entitlements.xml && rm entitlements.xml

@jburbs
Copy link

jburbs commented Jul 14, 2020

@inickt:

Tried it with OBS Studio 25.0.8 and OBS shows up as a source, but FaceTime only gives a test pattern (OBS logo inside a square inside a circle on a blue background).

Has anyone else gotten this to work?

@kenlowrie
Copy link

@inickt:

Tried it with OBS Studio 25.0.8 and OBS shows up as a source, but FaceTime only gives a test pattern (OBS logo inside a square inside a circle on a blue background).

Has anyone else gotten this to work?

If you see the logo, sounds like maybe you didn't start the camera. OBS|Tools|Start Virtual Camera.

@jburbs
Copy link

jburbs commented Jul 15, 2020 via email

@gxalpha
Copy link
Collaborator

gxalpha commented Jul 15, 2020

Could you please attach a screenshot?

@jburbs
Copy link

jburbs commented Jul 15, 2020

Executing the csrutil command generates a warning:

IMG_8057

FaceTime then allows OBS Virtual Camera as a source. However, it doesn't pass video through:

OBS FaceTime Shot

@richardbrockie
Copy link

richardbrockie commented Jul 15, 2020

@jburbs: You're seeing the central part of the OBS virtual camera test card (before the virtual camera is started in the Tools menu as suggested by @kenlowrie).

FaceTime uses a portrait rather than landscape format - here's the full card taken from the preview when connecting using an old version of Webex that can use virtual cameras:

image

@jburbs
Copy link

jburbs commented Jul 15, 2020

@richardbrockie

Yes. I get it, read my previous comments. The camera was started, I use it regularly for Zoom, so I am familiar with the process!

Has anyone actually gotten this to work with FaceTime? @inickt only said it worked with EpocCam...

@inickt
Copy link

inickt commented Jul 15, 2020

Yeah I wonder if its something with the communication between the DAL plugin and OBS itself. Obviously EpocCam is different but I thought it would have the same application here.

@richardbrockie
Copy link

@richardbrockie

Yes. I get it, read my previous comments. The camera was started, I use it regularly for Zoom, so I am familiar with the process!

@jburbs - sorry for missing that. I've learned something!

@jburbs
Copy link

jburbs commented Jul 16, 2020

@richardbrockie NP, it happens to the best of us ;-)

@richardbrockie
Copy link

richardbrockie commented Aug 8, 2020

@richardbrockie - then you may want to inform your IT to keep it that way 😅

@budisangithub The buggers updated us to 40.7.6.10 today at work - they broke my virtual camera on the desktop app. I'll lodge a complaint with IT - maybe some feedback will get through to Cisco from a reasonably large customer?

@Raj123456788
Copy link

Guys, what I have read so far: even if plugin is properly signed and notarized it won't work with latest builds of zoom & teams? This will happen with all the plugins. Can some one please confirm?

@NReilingh
Copy link

Guys, what I have read so far: even if plugin is properly signed and notarized it won't work with latest builds of zoom & teams? This will happen with all the plugins. Can some one please confirm?

@Raj123456788 I just updated to the latest Zoom version and everything still works without any fancy workarounds.

@Raj123456788
Copy link

Raj123456788 commented Sep 11, 2020

@NReilingh but I am seeing issues with Teams sorry did not test on zoom but saw a thread complaining about it. Can you confirm version number for zoom?

@gxalpha
Copy link
Collaborator

gxalpha commented Sep 11, 2020

@Raj123456788 @NReilingh see the documentation on compatibility here.
Zoom works on the latest version, Skype and Teams need workarounds

@akrizs
Copy link

akrizs commented Oct 8, 2020

i'm having kinda similar issues as have been explained above... in mac os catalina 10.15.6, when i start teams or discord or any other app that wants to load the DAL plugins i get from the application:
Cannot find function pointer PlugInMain for factory <CFUUID 0x600001058840> 35FDFF29-BFCF-4644-AB77-B759DE932ABE in CFBundle/CFPlugIn 0x7fcd8c57afc0 </Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin> (bundle, not loaded)

from the other DAL plugins (SnapCamera & NDIVirtualInput) i get from kernel:
Library Validation failed: Rejecting '/Library/CoreMediaIO/Plug-Ins/DAL/NDIVirtualCamera.plugin/Contents/MacOS/NDIVirtualCamera' (Team ID: W8U66ET244, platform: no) for process 'Discord(2081)' (Team ID: 53Q6R32WPB, platform: no), reason: mapping process and mapped file (non-platform) have different Team IDs

allthou i have not found this particular error for virtualcam plugin...

edit:
found it as well from the OBS-mac-virtualcam
Library Validation failed: Rejecting '/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin/Contents/MacOS/obs-mac-virtualcam' (Team ID: 62G85M9ZN5, platform: no) for process 'Teams(1922)' (Team ID: UBF8T346G9, platform: no), reason: mapping process and mapped file (non-platform) have different Team IDs

the same error from all the programs (Discord, MS Teams)

@gxalpha
Copy link
Collaborator

gxalpha commented Oct 10, 2020

for discord, see here: https://github.com/johnboiles/obs-mac-virtualcam/wiki
teams is kind of weird

@johnboiles johnboiles changed the title DAL plugin codesigning issues (e.g. in Zoom) DAL plugin not working in apps with hardened runtime (e.g. in Zoom, Teams, Skype, Safari, Quicktime, Photo Booth etc) Dec 14, 2020
@johnboiles johnboiles added workaround and removed bug Something isn't working labels Dec 14, 2020
@johnboiles johnboiles changed the title DAL plugin not working in apps with hardened runtime (e.g. in Zoom, Teams, Skype, Safari, Quicktime, Photo Booth etc) DAL plugins don't work in apps with hardened runtime (e.g. in Zoom, Teams, Skype, Safari, Quicktime, Photo Booth etc) Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests