Skip to content

Instantly share code, notes, and snippets.

@aidswidjaja
Last active July 24, 2021 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aidswidjaja/261ab936dbebe7d8b7bde91635fc833f to your computer and use it in GitHub Desktop.
Save aidswidjaja/261ab936dbebe7d8b7bde91635fc833f to your computer and use it in GitHub Desktop.
CoreMediaIO DAL Virtual Camera Guide for macOS

CoreMediaIO DAL Virtual Camera Guide for macOS

Use virtual camera devices with Discord, Zoom and Microsoft Teams on macOS devices (Intel 80386-style and Apple Silicon).

Disclaimer

This guide is designed to be a basic quick start guide with CoreMediaIO DAL Virtual Camera Guides for those who are proficient with computing systems. It's not comprehensive and support is not guaranteed. Really, it's just to help my friend get VTuber running on his Microsoft Teams classes.

This information is supplied by volunteers in good faith. However, we are not responsible if it doesn’t work, your computer sets on fire, or you start the next nuclear war. We do our best to make sure the information here is safe for you and your computer, but you proceed at your own risk.

License

FreeBSD Documentation License Copyright (c) aidswidjaja 2021


Installation

So you're trying to get Vtuber running on your Microsoft Teams classes, huh? alright then...

Firstly, download the latest version of either program for your respective platforms:

  • OBS with obs-mac-virtualcam
  • Webcamoid with AkVirtualCamera

OBS offers more option and granularity while Webcamoid is convenient for those who only need a basic virtual camera setup. The Virtual Camera feature is only available in newer versions of OBS, so if you're running an older version of OBS you should update.

Note: You may need to Right Click > Open for Webcamoid in order to bypass the security warning, as it is not code-signed.

Setup

OBS

Create a scene with OBS, add a source input (e.g to record osu!, use Window Capture and select the osu! window - which must be on your current desktop) and then click the Start Virtual Camera option on the right-hand control pane.

Webcamoid

Configure a source in the Sources area, then in Settings enable the Virtual Camera. Add a virtual camera in Settings > Output by enabling the checkbox, then in the Devices box click Add. You can name your new virtual camera before enabling it in the dropdown menu.

Code-signing

WARNING: There are security implications to removing code-signed signatures. Furthermore, stuffing something up may cause something to go very, very wrong (although this is quite unlikely) and I'm not responsible if that happens. Make a backup of any program you code-sign and don't type any command you don't understand or fully trust.

With your virtual camera device enabled, they can now be used with applications like Discord, Google Meet, Microsoft Teams, Skype, Cisco Webex, Zoom, and more!

However, due to increased security limitations of DAL plugins on macOS, some applications may need additional steps to work. You could sign the with an Apple Developer ID plugin, but that costs money and I'm saving up for a truck-kun.

On Microsoft Teams, virtual cameras work out of the box. Head to Microsoft Teams > Settings > Devices and under video options, select the OBS Virtual Camera or your named Webcamoid virtual camera device in the dropdown.

On other applications like Zoom and Discord, you need to run the following command:

sudo codesign --remove-signature "/Applications/Your Application.app"

where /Applications/Your Application.app is the path to your application. If the command fails, install Xcode Developer Command Line tools with this command:

sudo xcode-select --install

uhh.. sudo??

sudo is a command that is placed before any command you run to run as root. With macOS sudo prompts, you'll be asked with a

Password:

input, and you'll be able to enter your password there before hitting Return. You won't be able to see any of the characters you typed, however.

Still not working?

You might also need to run this command for helper programs and dependencies. For example in Discord:

sudo codesign --remove-signature "/Applications/Discord.app/Contents/Frameworks/Discord Helper (Renderer).app" 

Useful links


Troubleshooting

Verify your drivers are correctly enabled by running the system_profiler SPCameraDataType command in Terminal.

You may receive output such as the one below:

2021-07-24 18:45:57.453 system_profiler[34156:1595697] Error loading /Library/CoreMediaIO/Plug-Ins/DAL/AkVirtualCamera.plugin/Contents/MacOS/AkVirtualCamera:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/AkVirtualCamera.plugin/Contents/MacOS/AkVirtualCamera, 0x0109): code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/AkVirtualCamera.plugin/Contents/MacOS/AkVirtualCamera) not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
2021-07-24 18:45:57.473 system_profiler[34156:1595697] 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: mapping process is a platform binary, but mapped file is not
Camera:

    FaceTime HD Camera:

      Model ID: Apple Camera VendorID_0x106B ProductID_0x1570
      Unique ID: CC28021D29RGJJM1N

On most systems, you may receive a not valid for use in process: mapping process is a platform binary, but mapped file is not (OBS) or not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. (Webcamoid). These errors refer to code-signing which is explained in the main section of this guide.

On Apple Silicon systems, you may receive an incompatible architecture or bad arch error - this is safe to ignore.

Often times, this will be the best way to troubleshoot whether your virtual camera is working or not - however sometimes the error messages can be deceptive. If you're still experiencing issues with it, ask a question or check for threads with similar errenous behaviour on the OBS forums.


Useful links

Possible use cases

  • Join your Microsoft Teams computer science class as Hatsune Miku
  • Impress (or shock) your grandma with Snapchat filters during a Cisco Webex call
  • Cosplay with filters in your roleplay Discord server

Other notes

Roy's our boy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment