Improved Window Capture on Hardware Accelerated Windows (Auto Crop to Window for Display Capture)

Ecksters

New Member
I think this might be the most common issue newcomers to OBS Studio encounter, is the "black screen" when attempting to capture windows that use hardware acceleration.

Of course, the biggest area where you see this problem is trying to capture Chromium-based software, specifically Google Chrome or any Electron-based software (Discord, VS: Code, etc.). With Chrome the commonly recommended fix, disabling the Hardware Acceleration option, is a suboptimal solution, as it removes a very powerful feature from your browser, and a lot of newcomers aren't tech-savvy enough to realize the consequences of unchecking it, they're just happy to get it showing up in OBS.

Outside of Chromium apps, you have issues with most Windows Universal apps, obvious examples are the built-in Calculator and Groove Music programs in Windows 10.

It seems like if we had a slower, but more certain way of capturing a window, I'd love to have it as an option for dealing with these programs. Is there any specific reason why OBS Studio struggles so much with these types of windows? I'd be very happy to discover it's a configuration error on my part, but it seems like an OBS Studio limitation.

Currently my best solution is to use a Display Capture and crop it to match where the window is at, however, this means that I can't move the window or it messes up the layout. It seems like this is a fine solution, it's just too manual. Would it be possible to essentially use the Display Capture, but autocrop to follow a specific window? I'd even be fine if it required that you keep it on a specific monitor.

Of course, this also has the limitation that if any window is placed over the "captured" window, it would be captured instead, but it still seems like a relatively simple, but effective workaround.
 
Last edited:

Harold

Active Member
Problems with that thought
1> The Chromium framework, back around chrome 50-55 range, changed the way hardware accelerated rendering was shown in such a way that window captures don't work
2> UWP apps are actually actively blocked from being window captured by microsoft.
3> Most people who use window capture don't want the window in the foreground all the time, so a cropped display capture won't work for them.
 

Ecksters

New Member
Problems with that thought
1> The Chromium framework, back around chrome 50-55 range, changed the way hardware accelerated rendering was shown in such a way that window captures don't work
2> UWP apps are actually actively blocked from being window captured by microsoft.
3> Most people who use window capture don't want the window in the foreground all the time, so a cropped display capture won't work for them.


Ah, thanks for explaining 1 and 2.

As for 3, I suppose I hadn't quite considered that. I personally have 3 monitors, so I have no issue leaving everything open, but I can see where that would make this feature rather niche.

I suppose in that case probably the best solution is to have a separate Chrome profile with hardware acceleration disabled, just for Window Capture, and I think most Electron apps can have it disabled via a runtime flag.
 

Harold

Active Member
If you're not actively interacting with the webpage, you're better off using the OBS browser source than window capturing a browser.
 

Ecksters

New Member
Well, I'm thinking more along the lines of "I'm browsing various web pages and I want to pull what I'm currently looking at up in the video."
 

ByucknahTheRed

New Member
I have to say that this is by far one of the most frustrating things with OBS.

For example, a lot of people are starting to do Dungeons and Dragons streams and Roll20 is the standard for a lot of those online games. Problem is, without Hardware Acceleration it can be very VERY laggy in general to use ESPECIALLY if using Dynamic Lighting/fog of war or partical effects on Roll20. So in order to capture the window I have to have Hardware Acceleration turned off which causes some major lag based issues.

I am sure there are other websites where this is an issue as well but its just kind of a cruddy place to be in general. Either take the massive hit to performance by turning Hardware Acceleration off so you can capture/stream the footage -or- just get a black, empty, window.

There has to be a smart work around for this that isn't full monitor capture, there are a lot of windows and sources on my monitors that make Monitor Capture extremely inconvenient. I know OBS has a lot of focus in streaming games and stuff but I really would love for better web capture capabilities in some way so that when using websites like Roll20 it is not at the drastic cost of performance for people who don't have crazy beefy computers.
 

dodgepong

Administrator
Forum Admin
The newest release of OBS Studio 25 includes a new window capture method (Windows Graphics Capture) that allows you to capture hardware accelerated browsers as long as you're on a relatively recent version of Windows 10.
 

ByucknahTheRed

New Member
Oh cool! I had no idea about this new feature, thanks so much for the info Dodgepong! This is going to be a game changer for me for sure!
 

finalmakerr

New Member
The newest release of OBS Studio 25 includes a new window capture method (Windows Graphics Capture) that allows you to capture hardware accelerated browsers as long as you're on a relatively recent version of Windows 10.

There is no Windows Graphics Capture , only Windows Capture.
I am using the most recent OBS version 27.1.3 on Windows 10 LTSC version 1809.
 

dodgepong

Administrator
Forum Admin
There is no Windows Graphics Capture , only Windows Capture.
I am using the most recent OBS version 27.1.3 on Windows 10 LTSC version 1809.
The key phrase from my post was "relatively recent". 1809 is not relatively recent. You need 1903 and later for this feature.
 
Top