Sub topic 7
Add a webcam and design a consistent layout
A webcam adds presence to a screencast, but it also takes screen space and adds one more thing to go wrong. This chapter covers adding a video capture device in OBS Studio, sizing and cropping it, and building a layout you can reuse in every lesson. It assumes you know how scenes and sources work, and that your canvas and output resolution are already set (earlier chapters in this tutorial).
Why layout consistency matters
Learners notice when the webcam jumps around between lessons. A fixed layout also keeps important screen content from being covered. Decide on the layout once, build it once, and reuse it.
Three decisions define the layout:
- Where the webcam sits. Pick a corner and keep it there.
- How large it is. A common range is 15 to 25 percent of the canvas width.
- Which areas stay clear. Keep the webcam away from where the lesson content appears, such as the code editor's text area or the terminal prompt.
Add the webcam as a source
The webcam is a Video Capture Device source. It lists cameras that your operating system exposes.
- Select the scene where the webcam should appear.
- In the Sources dock, click + and choose Video Capture Device (on macOS the entry is the same name, and OBS may ask for camera permission).
- Name it clearly, for example
Webcam, and click OK. - In the properties window, choose your camera in Device.
- Set Resolution/FPS Type to Custom and choose a resolution and frame rate. Leave the rest at defaults until you see a problem.
A 1280x720 camera feed at 30 fps is enough for a small webcam overlay. Higher resolutions use more USB bandwidth and CPU without being visible at overlay size.
The common errors at this step:
- Black or empty preview. Another program (a video call app, a browser tab) may have the camera open. Close it. On macOS and Windows, check that the operating system's camera privacy setting allows OBS.
- Stuttering or low frame rate. Some cameras drop to a low frame rate in dim light because they lengthen the exposure. Add light or turn off the camera's auto-exposure frame rate reduction if its software allows it.
- Wrong format. If the image has odd colors or high latency, try a different Video Format in the properties, such as NV12 or MJPEG.
Size, position, and crop
Once the source exists, it appears in the preview with a red bounding box. Drag the corner handles to resize. Hold Shift while dragging to change the aspect ratio, and hold Alt to crop. Plain dragging a corner scales the source while keeping its proportions.
For precision, right-click the source and choose Transform > Edit Transform. This opens exact fields for position, size, and crop. Typing numbers gives you the same result every time, which is the point of a consistent layout.
For a 1920x1080 canvas, a webcam in the lower right with a 24-pixel margin could use values like these:
| Field | Value |
|---|---|
| Position X | 1496 |
| Position Y | 756 |
| Size width | 400 |
| Size height | 300 |
| Bounding box type | Scale to inner bounds |
Check the arithmetic: 1496 + 400 = 1896, which is 24 pixels from the right edge of 1920. 756 + 300 = 1056, which is 24 pixels from the bottom edge of 1080.
Fix the aspect ratio with cropping
A 16:9 camera feed in a 4:3 box would stretch if you forced it. Crop instead. In Edit Transform, use the Crop Left and Crop Right fields to trim the sides until the picture fills the box. Cropping removes pixels without distorting the face. Never fix a mismatch by stretching the source, because a stretched face looks wrong.
Lock the source
After placing the webcam, click the lock icon next to it in the Sources dock. A locked source cannot be moved by an accidental click in the preview. You can still edit its transform from the context menu after unlocking.
Clean up the picture
OBS gives you filters on any video source. Right-click the webcam, choose Filters, and use the section called Effect Filters.
- Color Correction adjusts gamma, brightness, and saturation when the camera image looks washed out.
- Sharpen can help a soft image, but keep it low. Strong sharpening adds visible edges around the face.
- Image Mask/Blend can round the corners of the webcam box using a mask image. This is optional styling.
- Chroma Key removes a green or blue background if you have a solid backdrop. It needs even lighting to look clean.
Filters run on every frame, so each one adds a small load. Add only what makes a visible improvement.
Reuse the webcam across scenes
Most lessons use more than one scene, for example a full-screen demo scene and a talking-head intro. You do not want to rebuild the webcam in each one. There are two ways to share it.
- Add an existing source. In another scene, click + > Add Existing > Webcam. Both scenes then refer to the same source. Filters are shared, but the position and size are stored per scene, so you can place it differently in each.
- Nest a scene. Build a scene named
Webcam Overlaythat contains only the webcam. Add that scene as a source in other scenes. Changing the overlay scene updates every scene that uses it, including the position.
Nesting is the better choice for a layout that must stay identical everywhere. Adding the existing source is better when you want a large webcam in the intro scene and a small one in the demo scene.
A caution on shared camera sources: if you add the same device as a new source in two scenes (rather than adding the existing source), some operating systems let only one source open the camera at a time. The second source then shows black. Always use Add Existing for the same device.
A layout that works
The diagram shows the scene structure that keeps a lesson organized.
With this structure, one change to the overlay scene moves the webcam in both the demo and the intro.
Guides for the layout
OBS has a few built-in aids to keep placement accurate.
- Turn on Edit > Preview Snapping options (snap to screen edges, snap to other sources, and a snapping sensitivity setting) in Settings > General.
- Use the Edit Transform fields for exact values and write them down in your lesson plan.
- Use Edit > Transform > Center to screen or Fit to screen for sources that must fill the canvas.
For text and screen content, keep important elements inside the title-safe area, roughly 5 percent in from each edge. Learners often watch on small windows, and edge details get lost.
Audio and the webcam microphone
Many webcams have a built-in microphone. The mixer lists it only if you add it as an audio source or if OBS adds the device's audio automatically. If you use a separate microphone, make sure the webcam's microphone is not also active, or you will record the same voice twice with a slight delay, which sounds like an echo. Mute or remove the webcam audio in the mixer and in Settings > Audio.
Lip sync
A webcam often delivers video slightly later than the microphone audio, so the voice can seem to run ahead of the lips. To correct it:
- Open Advanced Audio Properties from the gear menu in the mixer.
- Find your microphone and enter a value in Sync Offset (in milliseconds) to delay the audio.
- Record a short test with a clap, then check in a player whether the sound lines up with the visible hand movement. Adjust and repeat.
A typical offset is 50 to 200 ms, but it depends on the camera, so measure yours.
Privacy and the cut-off check
Before each recording, look at what the webcam shows behind you. Windows, papers, and whiteboards can reveal private information. If you present on a shared screen, also check the preview for notifications that could cover the webcam area.
Save the layout for reuse
Once the layout is correct, protect it. Use a Scene Collection (Scene Collection menu) for the complete set of scenes and a Profile for the video and output settings. Duplicate the collection before experimenting. A later chapter covers these in detail.
Exercise
You added the same webcam as a new Video Capture Device source in your Intro scene, and it now shows black in the Demo scene preview, although it worked before. What is the likely cause, and how do you fix it?
Show answer
Two separate sources are trying to open the same camera, and the operating system allows only one at a time. Delete the duplicate source and add the camera to the second scene with Add Existing, or nest a Webcam Overlay scene in both scenes.
Exercise
Your webcam box is 400x300 (4:3), but the camera outputs 16:9. How do you fill the box without distorting the face, and what do you check afterward?
Show answer
Crop the left and right sides in Edit Transform until the 16:9 image fills the 4:3 box, instead of stretching it. Afterward, check the position values so the box still sits 24 pixels from the edges, and lock the source.