Thursday, April 30, 2020

Use OBS with Zoom on a Mac

We've been running weekly assemblies in the Junior School using Zoom Webinars. Attendance is high, about 500 participants per assembly. We're using Zoom Webinars since it doesn't involve any extra tech (software or hardware) and there's little training needed since the camera and audio feeds switch automatically. We just need to be careful on our scripting and intros and outros to avoid talking over one another.

The lack of switching control makes it difficult for us to control what the participants see, and all graphics or chyrons must be pre-installed on every participant's computer. We use Zoom's screen share to show videos or graphics and while it serves its purpose I wanted a bit more control over everything.

The first thing to do was to setup the OBS output as a virtual camera. Easy enough on Windows since there's a popular plugin for it, but the Mac plugin is a bit trickier. It's straightforward enough to clone it from Github and install it using Homebrew. You must install OBS first since the following script clones it and packages it with the plugin. Note that Zoom has now pushed out version 5 which may break the virtual camera detection. You may need to unsign Zoom to get it to recognize the virtualcam:
codesign --remove-signature /Applications/zoom.us.app/
We need to have OBS recognize the audio input from Zoom and mix it with input from OBSHost's microphone so an audio mixer like iShowU would work. Thankfully there are quite a few streamers on Youtube that have walked through the process they use to be pro streamers. Apple has also a support document to combine multiple audio interfaces (called an Aggregate Device).

Once you have the cloned OBS running you can start the virtual camera in OBS and use it as a camera source in your meeting software. We use Zoom and Google Meet and both work well. However, only Zoom has a "mirror camera" setting so you'll need to horizontally flip the output if you're using Google Meet.

I didn't want to drop into Terminal everytime I wanted to run OBS so I wrote a shell script that launched it. Unfortunately, you can't add scripts to the dockbar in MacOS so you can use Applescript to package it as an app:
tell application "Terminal"
  if not (exists window 1) then reopen
  do script "cd /Users/USER/obs-studio/build/rundir/RelWithDebInfo/bin/" in window 1
  do script "./obs" in window 1
end tell
Add your favourite icon file and drop it into your dock!

So now that you have full creative control in OBS you'll need to get your workflow straight. Everyone joins the Zoom Webinar as a panelist, including the OBSHost. The Webinar settings are set so the OBSHost is pinned in speaker view as the only speaker. OBSHost is using the OBS output so all attendees only see the mixed video output complete with chyrons. OBSHost has already set multiple scenes and pre-loaded video or graphic clips to cut to on the fly. OBSHost has also imported every panelist and cropped out extraneous information. OBSHost now has complete editing and mixer control!

An alternative would be to have OBSHost as the only panelist in the Zoom Webinar. This guarantees the view will only be the OBS output with no automatic switching. All panelists would need to connect to OBSHost using another meeting program, like Google Meet, because Zoom only allows participation in one meeting at a time.