Sub topic 4
Capture your screen or a single window
This chapter assumes you have installed OBS Studio and know what a scene and a source are. It also assumes you have set the canvas and output resolution from the previous chapter. Here you will choose the right capture source for your operating system, decide between capturing a whole display and a single window, and handle the cases where the capture comes out black or the wrong size.
The capture source types
OBS does not have one "screen capture" source. It has several, and which ones you see depends on your operating system. Each one asks the operating system for pixels in a different way, and that choice decides what it can see and how much it costs your computer.
| Platform | Source | What it captures | Notes |
|---|---|---|---|
| Windows | Display Capture | An entire monitor | Simple and reliable for most desktop work |
| Windows | Window Capture | One application window | Can keep recording when the window is covered by others |
| Windows | Game Capture | A full-screen or windowed game or GPU-rendered app | Hooks into the graphics API. Rarely needed for lessons |
| macOS | macOS Screen Capture | A display, a window, or an application | One source type with a "Method" setting |
| Linux (X11) | Screen Capture (XSHM) | A whole X screen | Window Capture (Xcomposite) captures one window |
| Linux (Wayland) | Screen Capture (PipeWire) | A display or window you pick in a system dialog | Requires the desktop portal |
The exact names can change between OBS versions. If a source in this table is missing, check your version and your operating system's permissions before assuming something is broken.
Display capture or window capture
The choice between a display and a window is a layout decision first and a technical one second.
- Display capture shows everything on one monitor. It is the safest choice when your lesson moves between several applications, such as a terminal, a browser, and an editor. Whatever appears on that monitor is recorded, including notifications.
- Window capture shows only one application. It keeps unrelated content out of the recording and lets you crop the frame to exactly the part the learner needs. It follows the window if you move it, but it can misbehave when the window resizes, minimizes, or opens a child dialog.
A practical rule: use window capture for a lesson about one tool, and display capture for a lesson that spans several tools. For privacy, window capture is the safer default, because a stray chat notification on another part of the screen will not be recorded.
Add a capture source step by step
The steps below use the Windows names. On other platforms the flow is the same, with that platform's source type.
- In the Scenes dock, select the scene you want to build, for example "Lesson main".
- In the Sources dock, click + and choose Display Capture or Window Capture.
- Name the source clearly, such as "Screen" or "Editor window". Clear names matter once a scene has five or six sources.
- In the properties dialog, pick the display or window. For window capture, choose the window from the list, which shows entries in the form
[process.exe]: Window title. - Decide whether to Capture Cursor. For lessons, leave it on so learners can follow your mouse.
- Click OK and check the preview.
The window list is built from windows that exist at that moment. If the application is not listed, open it first, then reopen the source properties. Window titles often include a file name or a page title, so the entry can change when you open another file. Window capture has a Window Match Priority setting for this. Choosing to match the executable name keeps the source attached to the application even when its title changes.
Fit the capture to the canvas
A source rarely matches the canvas exactly. A 2560×1440 display on a 1920×1080 canvas will be larger than the frame, and OBS will show only the top-left part of it. There are two ways to fix this, and they have different costs.
- Scale the source to fit the canvas. Select the source and press
Ctrl+F(Windows and Linux) orCmd+F(macOS) to fit it to the screen. OBS rescales it. Text can look slightly soft if the scaling ratio is not clean. - Change your screen resolution to match the canvas. At 1920×1080 on both the display and the canvas, there is no scaling at all, so text is sharpest. The cost is that your working screen becomes less spacious.
For code and terminal lessons, sharp text matters more than almost anything else. If you must scale, prefer an even ratio such as 2:1 over an odd one. Also consider increasing the font size in your editor, so the text stays readable once a learner watches the video in a small player.
Cropping a source
To show only part of a source, hold Alt and drag a handle on the source in the preview. This crops the source without changing the underlying capture. You can also right-click the source, choose Transform, then Edit Transform, and enter exact crop values in pixels. Exact values are useful because you can reuse them for every lesson and get the same framing each time.
# Compute crop values to take a 1280x720 region from a 1920x1080 capture,
# keeping the region centered. Enter the results in Edit Transform.
capture_w, capture_h = 1920, 1080
region_w, region_h = 1280, 720
left = (capture_w - region_w) // 2
right = capture_w - region_w - left
top = (capture_h - region_h) // 2
bottom = capture_h - region_h - top
print(f"Crop left={left} right={right} top={top} bottom={bottom}")Running this prints Crop left=320 right=320 top=180 bottom=180. After cropping, scale the source back up so it fills the canvas. A 1280×720 region scaled to 1920×1080 is a 1.5× enlargement, so text will look slightly soft.
Multiple monitors and DPI scaling
With more than one monitor, Display Capture has a Display dropdown. Monitors are numbered by the operating system, and the numbers do not always match the order you expect. Pick one and check the preview.
High-DPI displays add another wrinkle. If your operating system scales the interface to 150% or 200%, the capture still contains the full physical pixel count. A laptop with a 3840×2160 panel at 200% scaling feels like 1920×1080, but OBS captures 3840×2160. Scaling that down to a 1080p canvas is a clean 2:1 ratio, which is fine. A panel at 150% scaling gives an odd ratio, and the result can look softer.
When the capture is black
A black preview is the most common capture problem. The cause depends on the platform and the source.
| Symptom | Likely cause | Fix |
|---|---|---|
| Black screen on macOS | OBS lacks the Screen Recording permission | Open System Settings, then Privacy & Security, then Screen Recording. Enable OBS, then restart OBS |
| Black window on Windows, other windows work | The app uses hardware acceleration or a protected surface | Try a different **Capture Method** in the source properties, or turn off hardware acceleration in that app |
| Black display on a laptop with two GPUs | OBS and the display run on different graphics adapters | Set OBS to use the same GPU as the display in the operating system's graphics settings |
| Black capture on Wayland | The portal request was dismissed or denied | Remove the source, add it again, and approve the system dialog |
| Protected video (streaming service) is black | DRM-protected content cannot be captured | This is by design. Use content you have the right to record |
On Windows, Window Capture offers capture methods such as Automatic, Windows 10 (1903 and up), and BitBlt. If the preview is black or frozen, switch the method and watch the preview. Browsers and some Electron apps often need the Windows 10 method. Older apps often work with BitBlt.
Performance costs
Capture is not free. Each source asks the system for frames at your output frame rate, and a high-resolution display capture at 60 fps uses real CPU and GPU time. Several habits keep this under control.
- Use one capture source per scene when you can. Two overlapping full-screen captures double the work.
- Keep unused sources hidden rather than active. A hidden source in a scene still exists, but OBS stops rendering it unless the source is set to show while hidden.
- Lessons on text and slides rarely need 60 fps. A frame rate of 30 is enough for most screencasts and lowers the load.
- If frames are dropping, check the Stats dock before changing anything else. Later chapters cover that diagnosis in detail.
Mermaid overview of the decision
The diagram summarizes how to choose a capture source.
A pre-recording checklist
Before you press record, run a short check on every lesson. It takes under a minute and prevents re-recording.
- The preview shows the right display or window, not black.
- The capture fills the canvas with no gaps or cut-off edges.
- The cursor is visible and notifications are silenced.
- Text in the editor or terminal is large enough to read in the preview at half size.
- The Stats dock shows no dropped frames over a ten-second test recording.
Exercise
You are recording a lesson on a 2560×1440 display with a 1920×1080 canvas. After you add Display Capture, you see only the top-left part of your screen in the preview. Name two ways to fix it, and say which gives sharper text.
Show answer
First, select the source and use Fit to Screen (Ctrl+F or Cmd+F) to scale the display down to the canvas. Second, change the display resolution to 1920×1080 so no scaling is needed. The second gives sharper text, because the capture is already the same size as the canvas. The first rescales by a ratio of 0.75, which can soften text.
Exercise
A Window Capture source for your code editor works until you open a different file, and then the preview freezes or the source disappears. What setting should you change?
Show answer
Change Window Match Priority so that OBS matches the window by its executable name instead of its title. The editor's title changes with each file, so a title-based match loses the window.