How to do Window capture on multi-monitor system?

OBStinate

New Member
I am attempting to do Window Capture . As I understand, this should capture a video of a region of one monitor, which is a Windows window. I cannot find any documentation on how to do this.
2
This is being done on a 4-monitor system, arranged as 1 4 3. All monitors are identical, resolution 3840 x 2160 Windows Scale 150%.

I have created an entry under Sources called Window Capture, with the default properties. I clicked Window Capture, and selected a window on monitor 1. OBS shows the complete screen of monitor 1 with red lines correctly delimiting the window I want to record, so everything looks correct.
I then click Start Recording, change some things in the widow being recorded, and click Stop Recording.

The file which is created, 2023-06-07 09-54-34.mkv, shows not just the window being recorded, but also the contents of monitor 2, in a strange way. The video has the size of a full screen, showing the contents of monitor 2, with a partial image of the window being recorded at the upper left. The image being recorded has black borders at top and bottom, which look like they correspond to the non-client area of the window being recorded. Within the top black border, the window's icon appears at the upper left. I have attached an image from the VLC playback of the .mkv file.

I have these issues:
1) I need to produce a recording of just a single window.
2) I need the entire contents of that window, not just the client area.
3) I need the recorded image to look identical to the original when played back using VLC or Windows Media Player.
How can I do this? References to documentation would also be helpful.

Windows 11, 64-bit. OBS Studio 29.1.2 (64-bit).
 

Attachments

  • OBS1.png
    OBS1.png
    881.7 KB · Views: 63

R1CH

Forum Admin
Developer
 

OBStinate

New Member
I'm attaching the log file, which I believe shows several attempts over the last few days. The recorded file I cited was created 6/7/23 0954.
 

Attachments

  • 2023-06-07 09-51-46.txt
    15.2 KB · Views: 19

AaronD

Active Member
For me, the Window Capture is connected to *the window*, not an area of the screen, so as I move and resize that window, the capture follows automatically. It also still works when another window is covering the one that I capture, and I use *that* a LOT!

I'm entirely on Linux now, but I'm pretty sure I had a rig on Windows 10 that worked that way too. Did Windows 11 break it?
 

R1CH

Forum Admin
Developer
09:51:50.487: Loaded scenes:
09:51:50.487: - scene 'Scene':
09:51:50.487: - source: ' test' (monitor_capture)
09:51:50.487: - source: 'Display Capture' (monitor_capture)
09:51:50.487: - source: 'Window Capture' (window_capture)

It looks like you have two display capture sources also in your scene, which are likely responsible for showing the non-window contents. If you want the non-client area to be included, try using WGC capture instead of BitBlt.
 

OBStinate

New Member
For me, the Window Capture is connected to *the window*, not an area of the screen, so as I move and resize that window, the capture follows automatically. It also still works when another window is covering the one that I capture, and I use *that* a LOT!

I'm entirely on Linux now, but I'm pretty sure I had a rig on Windows 10 that worked that way too. Did Windows 11 break it?
Never used OBS before now, so I can't say how it behaved on W10.
 

OBStinate

New Member
09:51:50.487: Loaded scenes:
09:51:50.487: - scene 'Scene':
09:51:50.487: - source: ' test' (monitor_capture)
09:51:50.487: - source: 'Display Capture' (monitor_capture)
09:51:50.487: - source: 'Window Capture' (window_capture)

It looks like you have two display capture sources also in your scene, which are likely responsible for showing the non-window contents. If you want the non-client area to be included, try using WGC capture instead of BitBlt.
Thanks for your prompt reply. Two display sources would explain the weird image I'm getting. How do I shut off or disable the display capture?
And what is "WGC", and how do I use that (or where is it documented)?
 

R1CH

Forum Admin
Developer
Remove the "test" and "Display Capture" sources from the list. WGC is a newer capture method available on Windows 10+, you can select it in the Window Capture properties.
 

OBStinate

New Member
As it turns out, Capture Window doesn't work for me, because it requires that the window title remain the same (the alternate "any window from same .exe" doesn't work when there is more than one window). Also, I need to see a modeless dialog (another window) which is on top of the window being observed.

I switched to Display Capture, which is inadequate because the resulting image is too large, and when played back in VLC the text is aliased so it's not legible. This seems to be the same in either auto mode or W10 mode.

Is there any way to capture a fixed area on a monitor, bit for bit, exactly as a user would see? I am trying to make instructional videos for sw.
 

AaronD

Active Member
As it turns out, Capture Window doesn't work for me, because it requires that the window title remain the same (the alternate "any window from same .exe" doesn't work when there is more than one window).
Ah! Yes, that's true. The initial assignment is based on the title, and then it tracks that window even if the title changes. I often start a web browser with a different URL and then window-capture that behind others, and I do have to manually reconnect it for each different URL, because it becomes part of the window title.

Also, I need to see a modeless dialog (another window) which is on top of the window being observed.
Yeah, that dialog is a different window, and therefore ignored in favor of the assigned window under it. You probably do want a display capture then.

I switched to Display Capture, which is inadequate because the resulting image is too large, and when played back in VLC the text is aliased so it's not legible. This seems to be the same in either auto mode or W10 mode.


Is there any way to capture a fixed area on a monitor, bit for bit, exactly as a user would see? I am trying to make instructional videos for sw.
Capture the entire display, 'cause that's all that the display capture can do, and then crop it in OBS. Keep it pixel-for-pixel - don't resize *anywhere* in the chain - and then it should stay clear.

Generally though, the mindset for video is that individual pixels don't matter. You're not looking at it as closely as you do a computer program. So single-pixel text is indeed a problem. If there's some detail that you really want people to see, you might zoom in on that detail for a second or two so that it uses more pixels. It'll take some more work, probably in post-production with a standalone video editor, but I think it'll work better.

But again, if you don't allow ANY part of the process to scale, resize, rotate, or move by partial pixels, then what goes into the encoder will be *exactly* what's on the screen. The problem then is limited to what the encoder does. You might need a massive file to keep that much detail, but if you're editing later anyway, that's probably what you want anyway.
 

MichelPostma

New Member
I am having a similar issue, where I can capture windows on my primary display, they'll continue to be captured if I move them to a secondary display, but then when I change scene they disappear. After that, I have no hope of capturing that window from the 2nd display. Restarting, adjusting displays, running OBS as Admin, nor changing capture method works to fix it at all
 

AaronD

Active Member
I am having a similar issue, where I can capture windows on my primary display, they'll continue to be captured if I move them to a secondary display, but then when I change scene they disappear. After that, I have no hope of capturing that window from the 2nd display. Restarting, adjusting displays, running OBS as Admin, nor changing capture method works to fix it at all
The Window Capture disconnects from its assigned window when its scene is no longer active? Never seen that before. Can you upload a recording somewhere that shows the problem, and then link to that recording here?

If you can get OBS to record it, that would of course be better quality, but with a multi-monitor setup and changing scenes, a phone on a tripod might show it better. (try to avoid the "potato cam" effect of not holding it steady...)
 
Top