How to Fit the Recording Area to a Captured Window in OBS Studio

To record one window with less empty space, right-click the Window Capture source in OBS Studio and choose Resize output (source size). It changes both the canvas and output resolutions. To keep a fixed size such as 1920×1080, use Transform → Fit to Screen instead.

Why a captured window has black space around it

Window Capture adds the selected window as a source. The canvas is the area for arranging sources. When the window is smaller, unused canvas can appear black in the preview. That differs from a capture in which the window itself is invisible.

OBS guide to Window Capture sources

Match the recording size to the window

  1. Stop any recording or stream and select Window Capture in Sources. Hide unneeded sources if this scene is for the window alone. If other scenes share the profile, note the current resolutions under Settings → Video.
  2. Right-click Window Capture in Sources and choose Resize output (source size).
  3. Read the message about changing the base and output resolutions, then select Yes.
  4. Check the preview and the Base (Canvas) Resolution and Output (Scaled) Resolution under Settings → Video. Record a short clip and play the actual file.

OBS rounds the source width up to a multiple of four and the height up to a multiple of two. A source measuring 1001×701 can therefore give 1004×702. Check the saved file for its actual dimensions.

OBS project source code for resizing the output

Keep a fixed resolution such as 1920×1080

Right-click the window source and choose Transform → Fit to Screen, or press Ctrl+F. This changes the placement and scale of the source. If its aspect ratio differs from the canvas, space can remain at the sides or above and below.

To reduce that space, resize the captured window to a similar aspect ratio and fit it again. Cropping is another option if you can lose part of the window. Check in the preview that all necessary content is visible.

Official OBS shortcut for fitting a source

If the command is unavailable or you need to restore the size

If the command is unavailable, check whether a recording or stream is running. If the window itself is missing, first check which window is selected in Window Capture properties.

To restore the previous dimensions, enter the original base and output resolutions separately in Settings → Video. Check how sources are positioned in other scenes too.