How to use macOS Background Replacement with OBS


If you want to use chroma key effect in a streaming or video conference app, but you can’t get a physical green screen background in place, you can fake it. All by using Background Replacement in macOS.

Whether it is streaming gameplay to Twitch or improving your Zoom calls, sometimes you want to replace the background with something else. It’s unprofessional to have a background that includes piles of dirty clothes, random dinner plates, and other unsightly items.

When it comes to using tools like Zoom or FaceTime, you can get around that by blurring the background, or even replace the background with a picture.

However, not every program that accepts a webcam feed will deal with this in an intelligent way.

The problem this time is the free OBS (Open Broadcaster Software), a tool for compiling sophisticated graphical setups for streams. Chiefly, this is used for game streams, such as those on Twitch, but it can also be used as a virtual webcam for other software, like Zoom.

While OBS does have a green screen effect, it’s the previously established chroma key effect. It’s not the modern background replacement of FaceTime and Zoom, but it can be used to great effect.

That is, if you have a green screen available, or if you have one, you have the physical space to pull the effect off properly.

You can work around the limitations of OBS and physical space, by combining the two systems together.

Chroma key

The two techniques that we will use here fundamentally work in completely different ways. But one can be used in the service of the other.

Chroma key is an old technique, best known to people who have seen a weather report or a behind-the-scenes video of a Hollywood movie. In short, it is the removal of a specific color, or a range of colors, from a video and replacing them with blank pixels.

This is keying-out the color, giving chroma key its name.

Person adjusting a bright studio light against a solid green screen background, with a blurred monitor in the foreground showing an indistinct figure

Chroma Key removes a green background, so you can create a composite of a subject with a different background – Image Credit Lisha Dunlap/Pexels

A person walking in front of a green screen background would result in a video of them walking in a black void. Unless that footage is overlaid on top of another image, in which case the background would change behind the subject.

This has been an effective technique for quite some time, and has been used to great effect by game streamers. Using a green screen, they can appear on screen with the game in the background, but with no real-world objects appearing behind the streamer’s head.

However, to use chroma key, you do need a background. This could be a simple green sheet, or you could invest in a pop-up chroma background that tensions the surface flat.

By the way, while chroma key usually deals with a bright green background or sometimes a blue as an alternate, you can use other colors as well. Just don’t use a color that is too close to your skin tone, otherwise you may go partially invisible on stream.

If you have a background, the next step is to light the background, as well as yourself. This can be hard, as ideally, you need sufficient space between you and the background so that you don’t cast shadows onto it.

Shadows are tough to key out, so you want to avoid them.

Ideally, you should evenly light the chroma background, so that there’s only one small range of green that needs to be keyed invisible.

The reality of the situation is that there will be things getting in the way of you creating a perfect key. If you don’t have enough lighting or enough physical space, you’ll find it difficult to get the screen up and lit without shadows, while also lighting yourself up properly.

In my case, while I have the lights and the backgrounds in various forms, I do not have enough physical space behind my chair to set it all up. I could move my entire computing setup across a bit and free some space, but a combination of electrical cable lengths and a hint of laziness makes that a non-starter.

Background replacement

The other technique, background replacement, is what users of Zoom and FaceTime will be familiar with. It’s a computer-driven method of keying out the background with different imagery, like a beach scene.

However, instead of keying out a color, it’s a system that relies on detecting the subject of the video feed. Everything that is not the subject in the middle of the video is replaced by a chosen background.

It is by no means a perfect cut-out. The edges of your hair or your body could be cropped a bit too closely, and sometimes things could pop in and out of view if they are moved suddenly.

Mac desktop showing OBS Studio with a webcam preview of a bearded person against a bright green chroma key background and settings panel for portrait, lighting, reactions, and background options

Using macOS Background Replacement to make a fake green screen source.

If you have small animals that like to jump onto your lap, viewers may see them suddenly appear out of nowhere.

But if you’re using it for a small webcam image in the corner of a game stream or for an impromptu effect, it works pretty well.

It’s a feature that Mac users have had for some time. With the introduction of macOS Sequoia, Apple introduced Presenter View as well as Background Replacements.

When you activate a webcam in macOS, you can access a green camera icon in the menu that includes various options, including setting the Portrait background blur effect, studio lighting, reactions, and microphone modes.

There’s also an option for Backgrounds, which triggers Background Replace. Selecting it instantly forces the Mac to work out what the background elements are of your webcam view, and immediately changes them over to a background image.

All together now

You are able to get the benefits of using the green screen background-free Background Replace in macOS in OBS. The key (pun not really intended) is to use them in concert.

Screen capture of streaming software showing a bearded man in a Yeah Man T-shirt on a desert landscape background, with settings panel open for adjusting video filters and effects

Applying the Chroma Key effect to the fake green screen feed.

The way to do it is to create a fake green screen background in Background Replace. That webcam feed, which appears to be you in front of a green background, is then ingested by OBS

OBS, not knowing the truth, then keys out what it thinks is a green screen background, resulting in a chroma key effect and an invisible background for your webcam footage.

Yes, we are using a background replacement tool in macOS to fool a background replacement tool in OBS.

How to use macOS Background Replace with OBS for a clean chroma key effect

  • Open OBS and add a webcam feed to your scene.
  • Create an image of a solid green square in an image editing program. Alternatively, you can search Google Images for a more correct chroma green image that does the same thing.
  • In the macOS menu, select the green or purple icon to show the webcam settings options.
  • Select the webcam, then the Background circle icon to enable it.
  • Select the rectangle to the right of Background to bring up the Background image picker. Select the third tab and click the Plus icon to add a custom background.
  • Add the created or downloaded green screen, and then select it in the Background image picker.
  • Back in OBS, select your webcam, right-click it, and select Filters.
  • Under Effect Filters, click the plus and select Chroma Key.
  • Use the settings to select the Green key, or whatever color your Background Replacement is using. You can adjust the Similarity, Smoothness, and Key Color Spill Reduction to make the key better.
  • Once happy, select Close.

At this point, you will have a webcam view of yourself with clear pixels around you. Place a background behind the resulting image, and you’ll see the key in action.

Be advised that this relies on computer vision analyzing a flat image instead of something with a depth map, and therefore, it’s not going to be perfect. But, if it’s a short-term solution or one where you simply can’t go down the proper chroma key route, this is a good alternative to get the same effect.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Most Mac users see Apple Preview as only an app to view images, PDFs, and other documents. That’s it. If that sounds like you, you are leaving a lot on the table, because Preview has quietly grown into one of the most capable apps on macOS, and it’s available for free.

I use the app daily to edit images, markup and sign PDFs, redact information, and so much more. So let me walk you through seven things you probably didn’t know Apple Preview could handle.

You can rearrange, combine, and pull out PDF pages

If you regularly work with PDFs, this one will save you a ton of time. Preview lets you easily rearrange pages in PDFs, combine multiple PDFs into one, and even extract specific pages from a PDF. 

To perform any of these actions, first you have to enable the thumbnail view. To do this, open a PDF file in Preview and go to View → Thumbnails or hit the keyboard shortcut ⌥⌘2 to reveal the sidebar. From here, you can click and drag pages to rearrange them in any order you like.

You can also drag a selected page out of the sidebar directly onto your desktop, and it will save those pages as a new PDF. No need for any extra software. 

You can also drag a PDF document or pages from other PDFs inside another PDF to merge them

Stop people from snooping on your PDFs

If you are sharing a sensitive PDF with someone and you don’t want anyone else to read it, you can lock it using Preview so only people with the correct password can open it. 

To do this, open your PDF, click the info button in the toolbar, find the security lock icon under Permissions, and click the Edit button. 

Now, check the box to require a password to open the document, set your password, and save the changes. You can even control what others can do without the password, like allowing them to print the file, but nothing else.

Another way to hide information is by redacting it. It permanently obscures the information so no one can read it. Note that once you save a redacted document, even you won’t be able to get the information back so ensure to create a copy of the original document before redacting it. 

To redact a document, open the Markup toolbar and click on the Redact tool. Now, you can highlight any text or just select an area to redact it. 

Read PDFs at night without burning your eyes

This one is a recent addition and an incredibly useful one. If you use your Mac in dark mode, Preview now has an option to match that for your PDFs. Go to View → Use Dark Appearance for PDF, and the blinding white background flips to a dark background that’s much easier on the eyes. Just keep in mind that this option only shows up when your Mac is already set to dark mode.

Remove image backgrounds without a third-party app

Preview also offers several image editing tools. Out of all the editing tools, my favorite is the one that lets me remove an image’s background. Yes, you don’t need Affinity or Photoshop to remove a background from an image

Preview can do it. Open an image, go to Tools → Remove Background, or hit the keyboard shortcut ⌘⇧K. As you can see in the image below, Preview has done a great job of removing the background and cutting out the subject. 

Open any image you just copied

Here is a little trick I use all the time. If you copy an image to your clipboard, you don’t need to paste it into a photo editing app to save it. Just open Preview and go to File → New from Clipboard or hit the keyboard shortcut ⌘N. Your copied image opens instantly, ready for you to edit, resize, or export.

Mark up screenshots and PDFs like a pro

The markup toolbar in Preview is genuinely great for quick edits. You can draw circles or rectangles to highlight something, add text, draw arrows, and even drop in your signature. 

While CleanShot X handles all my screenshot annotation needs, Preview is the app I use to markup my PDFs. And if you don’t deal with dozens of screenshots every day, Preview’s built-in functionality will be more than enough for you. 

Bonus tip: extract high-quality app icons

I don’t know who will need this feature, but I use it regularly, so I am sharing this as a bonus. Sometimes I need to use app icons to create images (like the one you see at the top of this article). 

If you have the app already installed on your Mac, you don’t need to hunt for the icon image on the web. Just go to the Application folder in Finder, select the app, and copy it. 

Now, launch Preview and use the “New from Clipboard” option, or use the ⌘N keyboard shortcut to open the app icon as an image in Preview. Now, use the ⌘S shortcut to save it to your desktop. 

Apple Preview is more than just a viewer

The point is that Apple Preview is genuinely powerful, and it’s sitting right there on your Mac, completely free. Whether you are managing PDFs, editing images, or trying to keep a late-night reading session from blinding you, Preview has you covered. Give it a proper chance, and I think it will earn a permanent spot in your workflow.



Source link