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

Virtualcam not showing up on Universal browsers on M1 processor #239

Closed
MatteAce opened this issue Nov 25, 2020 · 12 comments
Closed

Virtualcam not showing up on Universal browsers on M1 processor #239

MatteAce opened this issue Nov 25, 2020 · 12 comments

Comments

@MatteAce
Copy link

MatteAce commented Nov 25, 2020

virtualcam is not showing up on Universal apps on Apple M1 processor/Big Sur.

It works fine on Intel packagings running via Rosetta 2 (tested successfully on Chrome-Intel and Firefox) but it won't show up on Universal packagings running natively on the M1 processor.

Tested on a Macbook Pro M1 with MacOS 11.0.1

@johnboiles
Copy link
Owner

johnboiles commented Nov 25, 2020 via email

@MatteAce
Copy link
Author

can this help? https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary

@johnboiles
Copy link
Owner

Yeah that’s great thanks. So looks like we need to build both architectures and lipo them together. This is what they have in that doc and we’ll have to adapt it to CMake. @PatTheMav do you know if any universal binary work is being done for OBS? I don’t want to blaze a trail here if someone is already working on it.

x86_app: main.c
    $(CC) main.c -o x86_app -target x86_64-apple-macos10.12
arm_app: main.c
    $(CC) main.c -o arm_app -target arm64-apple-macos11
universal_app: x86_app arm_app
    lipo -create -output universal_app x86_app arm_app

@johnboiles
Copy link
Owner

Actually, we don't need the OBS plugin to be universal, just the DAL plugin. I made the change here but I'm struggling to get the GitHub action to build it: #240

@PatTheMav
Copy link

Yeah was about to mention the same. We have an Apple Silicon branch that is being worked on, but I haven't really put in the work what would be necessary to update not only the build process but also the packaging process as OBS is made up of so many dynamic libraries/plugins that are each separate build targets.

@johnboiles
Copy link
Owner

Ok I think I've got it, but I want testers before I cut a release (since I don't have an M1 mac).

To test this, go here, and download the raw-plugins.zip artifact. And then copy raw-plugins/obs-mac-virtualcam.plugin to /Library/CoreMediaIO/Plug-Ins/DAL/. Then see if everything works as expected!

@johnboiles
Copy link
Owner

Ok we've had two testers in #240 so that's enough for me :) I've now cut a release with Apple Silicon support: https://github.com/johnboiles/obs-mac-virtualcam/releases/tag/v1.3.0

@PatTheMav I'm thinking we can probably override CMAKE_OSX_ARCHITECTURES for the DAL plugin target in the OBS build without modifying anything else in the OBS build. I might give that a try at some point.

@johnboiles
Copy link
Owner

@PatTheMav I just went ahead and tried it obsproject/obs-studio#3779

@wookayin
Copy link

I can confirm the virtual camera DAL plugin works very well on a M1 mac --- even with the current x86 OBS (26.0.2) release running on Rosetta 2! Thanks for the fast update.

@johnboiles
Copy link
Owner

@wookayin thanks for the report! Just curious what software are you using the virtual camera in and is that software running as a universal app?

@wookayin
Copy link

@johnboiles That's a good point to check. I tested with Chrome (87.0) arm64 build, and ffmpeg (ffplay) which is yet a non-universal x86 app, and both worked well without any issues.

@johnboiles
Copy link
Owner

Awesome! Glad to hear it

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

No branches or pull requests

4 participants