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

Attempt building for macOS 10.14 Mojave #94

Merged
merged 3 commits into from May 14, 2020

Conversation

jasongrout
Copy link
Contributor

This is a bit of a shot in the dark, but it may be that we just need to set an environment variable to configure building for an older version of macOS. See #85 (comment)

@johnboiles
Copy link
Owner

johnboiles commented May 13, 2020

Can't hurt to try the simple thing first!

But it looks like the build is using the 10.15 SDK.

I think that SO post you found is very promising. Probably we will need a build step to download and unzip the older SDK from here (let's start with 10.14 before trying 10.13).

If you are able to keep jamming on this, maybe make a new step in the build.yml that downloads and unzips the 10.14 SDK then does a ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs to confirm that it's in place. Maybe also do a ls before putting the SDK in place; who knows maybe GitHub's action VM already has this in place.

@johnboiles
Copy link
Owner

johnboiles commented May 14, 2020

I also saw this. Not sure if we'll need to do it

image

@jasongrout
Copy link
Contributor Author

Yes, I was thinking the same thing. Interestingly, I only seem to have the 10.15 sdk on my 10.14 computer, though (apparently xcode 11.3 only comes with the 10.15 sdk?). Reading this made me hopeful that perhaps it might work to set the minimum version and use the 10.15 sdk.

I couldn't find an official place to download the 10.14 sdk - that's why I thought I'd try just the environment variable first.

@johnboiles
Copy link
Owner

Oh very interesting that you can build on your 10.14 machine with only the 10.15 SDK! I totally get your line of reasoning in that case. Maybe these artifacts you're generating will just work 🤞

@jasongrout
Copy link
Contributor Author

If you are able to keep jamming on this, maybe make a new step in the build.yml that downloads and unzips the 10.14 SDK then does a ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs to confirm that it's in place. Maybe also do a ls before putting the SDK in place; who knows maybe GitHub's action VM already has this in place.

Plus add that sdk to a cache so that we don't have to download it each time a PR comes in :).

@johnboiles
Copy link
Owner

johnboiles commented May 14, 2020

Plus add that sdk to a cache

😄 yes please!

Edit: I should probably cache the entire OBS build. No reason that needs to happen every time.

@jasongrout
Copy link
Contributor Author

Oh very interesting that you can build on your 10.14 machine with only the 10.15 SDK!

(Really, I don't know what I'm doing here, so take everything I say with a huge boulder of salt)

@johnboiles
Copy link
Owner

So if you ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs on your machine you see only the 10.15 SDK?

I'm def guessing here too. I've dealt with version compatibility on iOS in the past, but that was just clicking some things in Xcode so I have no idea what it was doing under the hood.

@jasongrout
Copy link
Contributor Author

How exactly do I install the plugin artifacts into my stock install of OBS? I see the .plugin directory goes in /Library/CoreMediaIO/Plug-Ins/DAL. Where does the .so go?

@jasongrout
Copy link
Contributor Author

% ls -las /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
0 drwxr-xr-x  5 root  wheel  160 Jan 13 20:33 ./
0 drwxr-xr-x  6 root  wheel  192 Jan 13 20:33 ../
0 drwxr-xr-x  4 root  wheel  128 Jan 13 20:32 DriverKit19.0.sdk/
0 drwxr-xr-x  8 root  wheel  256 Jan 13 20:33 MacOSX.sdk/
0 lrwxr-xr-x  1 root  wheel   10 Sep 26  2019 MacOSX10.15.sdk@ -> MacOSX.sdk

@johnboiles
Copy link
Owner

johnboiles commented May 14, 2020

By default it's in /Library/Application Support/obs-studio/plugins. So you can

sudo mkdir -p /Library/Application\ Support/obs-studio/plugins/obs-mac-virtualcam/bin/
sudo cp obs-mac-virtualcam.so /Library/Application\ Support/obs-studio/plugins/obs-mac-virtualcam/bin/obs-mac-virtualcam.so

If that has problems running because it isn't signed, we've found that we can just dump the .so into application bundle plugins dir and it seems to just work without needing codesigning. sudo cp obs-mac-virtualcam.so /Applications/OBS.app/Contents/PlugIns/

@jasongrout
Copy link
Contributor Author

Thanks. It works!!! I used the plugin artifacts generated in this build workflow, copied them to the locations you said, and it works as well as it did when I compiled myself.

@jasongrout
Copy link
Contributor Author

(which for me means that Chrome was able to see the virtual camera and the content of it, and quicktime was able to see the virtual camera, but only displayed the test card, not the actual content)

cmake -DLIBOBS_INCLUDE_DIR:STRING=$GITHUB_WORKSPACE/obs-studio/libobs \
-DLIBOBS_LIB:STRING=$GITHUB_WORKSPACE/obs-studio/build/libobs/libobs.dylib \
-DOBS_FRONTEND_LIB:STRING=$GITHUB_WORKSPACE/obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib \
-DQTDIR:STRING=/usr/local/opt/qt ..
make -j

- name: Fix runtime QT deps
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine leaving this. Probably useful to be able to test PRs

@johnboiles
Copy link
Owner

Hey that's awesome! So this fully works with Chrome? Can you see if you can find a Console.app log for QuickTime. Maybe it's a codesigning thing for Quicktime and it will just work when we sign this with a production cert.

@jasongrout
Copy link
Contributor Author

Here's the relevant part from the quicktime log when I switch to the virtual camera:

2020-05-13 17:40:38.286 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:38.287 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:38.287 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:38.287 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.548 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.548 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.549 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyHogMode self=0x10eba4590 settable=0
2020-05-13 17:40:39.549 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyExcludeNonDALAccess self=0x10eba4590 settable=1
2020-05-13 17:40:39.549 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyExcludeNonDALAccess self=0x10eba4590 settable=1
2020-05-13 17:40:39.549 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIODevicePropertyExcludeNonDALAccess self=0x10eba4590 data(int)=1
2020-05-13 17:40:39.549 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.551 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.551 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.551 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.552 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLocation
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 data(int)=66110
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: Stream unhandled isPropertySettableWithAddress for kCMIOStreamPropertyFormatDescription
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Stream(45) kCMIOStreamPropertyFormatDescription self=0x10eba4590 settable=0
2020-05-13 17:40:39.762 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 data(int)=-1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 data(int)=66110
2020-05-13 17:40:39.763 QuickTime Player[66110:541977] OBSDAL: Stream unhandled isPropertySettableWithAddress for kCMIOStreamPropertyFrameRate
2020-05-13 17:40:39.764 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Stream(45) kCMIOStreamPropertyFrameRate self=0x10eba4590 settable=0
2020-05-13 17:40:39.764 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.764 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.764 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectIsPropertySettable Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 settable=1
2020-05-13 17:40:39.764 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIODevicePropertyDeviceMaster self=0x10eba4590 data(int)=-1
2020-05-13 17:40:39.835 QuickTime Player[66110:541977] OBSDAL: Device unhandled hasPropertyWithAddress for kCMIODevicePropertyLinkedAndSyncedCoreAudioDeviceUID
2020-05-13 17:40:39.836 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_ObjectSetPropertyData Device(44) kCMIOObjectPropertyListenerAdded self=0x10eba4590 data(int)=1818850926
2020-05-13 17:40:39.836 QuickTime Player[66110:541977] OBSDAL: Device unhandled setPropertyDataWithAddress for kCMIOObjectPropertyListenerAdded
2020-05-13 17:40:39.846 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_StreamCopyBufferQueue <Stream: 0x7fe6abc90c80> (id=45) self=0x10eba4590 queue=<CMSimpleQueue 0x7fe6ad8a08d0 retainCount: 2 allocator: 0x7fffaeeec8e0
	capacity = 30
	count = 1
	readIndex = 28
	writeIndex = 29
	elements[readIndex..(writeIndex-1) %% (capacity+1)] = {
		0x7fe6ad92c840}
>
2020-05-13 17:40:39.846 QuickTime Player[66110:541977] OBSDAL: HardwarePlugIn_DeviceStartStream self=0x10eba4590 device=44 stream=45
2020-05-13 17:40:39.846 QuickTime Player[66110:541977] OBSDAL: -[PlugIn startStream] 
2020-05-13 17:40:39.847 QuickTime Player[66110:542181] OBSDAL: -[Stream startServingDefaultFrames] 
2020-05-13 17:40:39.847 QuickTime Player[66110:542181] OBSDAL: Server is not available
GVA encoder info: recomputed for fps: 30.000000, gop size in pics: 30, gop size in sec: 1.000000 
2020-05-13 17:40:40.134 QuickTime Player[66110:542048] OBSDAL: Server is not available
2020-05-13 17:40:41.134 QuickTime Player[66110:542683] OBSDAL: Server is not available
2020-05-13 17:40:42.133 QuickTime Player[66110:542181] OBSDAL: Server is not available
2020-05-13 17:40:43.133 QuickTime Player[66110:542048] OBSDAL: Server is not available
2020-05-13 17:40:44.133 QuickTime Player[66110:542179] OBSDAL: Server is not available
2020-05-13 17:40:45.134 QuickTime Player[66110:542684] OBSDAL: Server is not available
2020-05-13 17:40:46.134 QuickTime Player[66110:542682] OBSDAL: Server is not available
2020-05-13 17:40:47.133 QuickTime Player[66110:542048] OBSDAL: Server is not available

Then it just keeps repeating that last line about once a second.

@jasongrout
Copy link
Contributor Author

So this fully works with Chrome?

Yes, it appears to work just fine with Chrome for me.

@johnboiles
Copy link
Owner

Very interesting. I wonder if there's some differences in QuickTime's ability to reach OBS over mach ipc in 10.14

@johnboiles johnboiles merged commit 09a3abf into johnboiles:master May 14, 2020
@johnboiles
Copy link
Owner

This will have the pkg when its done https://github.com/johnboiles/obs-mac-virtualcam/actions/runs/104162509

@Mesihas
Copy link

Mesihas commented May 14, 2020

Works !!! on my mojave. Cheers!!

@jasongrout
Copy link
Contributor Author

That pkg also works for me. Thanks again!

@johnboiles
Copy link
Owner

Thata's awesome!! I wonder if we can just dial this down to 10.13 for the high sierra people.

I'll cut a 1.1.0 release from this when i get a chance!!

@denwald
Copy link

denwald commented May 14, 2020

This will have the pkg when its done https://github.com/johnboiles/obs-mac-virtualcam/actions/runs/104162509

This works for me on Mojave with Quicktime as the video-sink as well! First it only showed the test screen. But after a reboot I can see live video in Quicktime. Maybe that's because I had the Catalina pkg already installed and then used the Mojave installer to replace the plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants