Track and Mask Moving Objects in OBS Studio

This article provides a step-by-step guide on how to install, configure, and use the Dynamic Mask filter plugin in OBS Studio to track and mask moving objects. By the end of this guide, you will know how to dynamically isolate moving subjects, such as presenters or specific screen elements, and apply real-time masking effects to your live streams or recordings.

Step 1: Install the Dynamic Mask Plugin

Before starting, you must install the Dynamic Mask plugin for OBS Studio. 1. Download the plugin from the official OBS Resources forum. 2. Extract the downloaded zip file. 3. Copy the data and obs-plugins folders and paste them into your main OBS Studio installation directory (typically C:\Program Files\obs-studio on Windows). 4. Restart OBS Studio to load the plugin.

Step 2: Set Up Your Sources

To use the dynamic mask effectively, you need a source to apply the mask to and, optionally, a secondary source to act as the mask definition. 1. Open OBS Studio and go to your active Scene. 2. Under the Sources dock, click the + icon and add your primary video source (e.g., Video Capture Device or Media Source). 3. (Optional) Add a secondary source that will define the shape of your mask, such as an image, a color source, or a secondary video loop.

Step 3: Apply the Dynamic Mask Filter

Once your sources are ready, apply the filter to your main video source. 1. Right-click your primary video source in the Sources list and select Filters. 2. Click the + icon under the Effect Filters section. 3. Select Dynamic Mask from the dropdown menu, name the filter, and click OK.

Step 4: Configure the Filter Settings

In the Dynamic Mask properties window, configure the tracking and masking parameters to match your moving object: * Mask Source: Select the source you want to use as the mask template. If you want the mask to generate dynamically based on motion or color, select your primary camera source here. * Input Type: Choose how the plugin reads the mask. Alpha Channel is best for transparent PNGs, while Luminance or Color Channels work best for isolating bright objects or specific colors. * Mask Type: Choose whether to Apply Mask (show only the masked area) or Invert Mask (hide the masked area).

Step 5: Adjust Tracking and Fine-Tune

To make the mask dynamic and follow movement, adjust the behavior sliders: * Threshold / Cutoff: Adjust these sliders to define the sensitivity of the mask. Higher thresholds will limit the mask to highly defined edges of your moving object. * Feathering / Blur: Increase this value to soften the edges of the mask, creating a seamless blend between the moving object and the background. * Movement/Offset: Use the X and Y offset controls if you need to manually shift the mask’s position relative to the tracked motion.

Click Close once the preview window shows the moving object successfully isolated and masked.