Window capture pixels issue

AndreiBarbu

New Member
Hello OBS community,

I am recording multiple Window captures (mostly Google Chrome, Visual Studio Code and Powerpoint Presentation). I record them from that has Display resolution set to 1920 x 1080 in Windows.
In OBS -> Settings -> Output -> Recording -> I have Rescale Output to 1920x1080 (I tried without this option also and it is the same).
In OBS -> Settings -> Video I have both Base (Canvas) Resolution and Output (Scaled) Resolution to 1920x1080.

If I add a Window capture for Chrome, it leaves 8px on the bottom and 1px on the right. Capture Method is Automatic.
If I add a Window capture for Visual Studio Code, it leaves 8px on the bottom and 8px on the right. Capture Method is Automatic.
If I add a Window capture for Powerpoint presentation, it is a perfect fit. Capture Method is Windows 10 (1903 and up). I tried this Capture Method for Chrome as well but stil I have the pixels missing.

I added screenshots for each below.

I do also have Automatic Scene Switcher with the below configuration Active (I don't know if it influences, but in any case, I am mentioning this).
1674510724226.png


I know I have the option of "Transform -> Fit to screen", but with that, the quality of the recording is worst than if I don't do any change.

The following log link was generated after I recorded my three Scenes (and Window captures) as they get default added (WITHOUT "Fit to screen" option): https://obsproject.com/logs/94Jet7SDVXs9LpBc

I am looking to understand the following:

1 - Why some Window captures get added with that missing pixels while others are perfectly matching?
2 - What can I do that when I add a Window capture (especially Chrome and Visual Studio Code), to be added as a perfect fit, as it does for the Powerpoint presentation in my example.
3 - Is it expected that if I "Fit to screen", the quality of my recording to a little bit worst (it is a little bit blurry an less clean) than if I leave the Transform without any change?

I am running on Windows 11. Below are the screenshots that indicate my issue.

Your help would be highly appreciated. Thank you very much!

1674510863419.png


1674510900663.png


1674510459426.png
 

AndreiBarbu

New Member
Also if I do "Resize output (source size)", it fits perfectly to the screen, but also changes the video resolution and results in bad quality recording (a little bit blurry).
 

AndreiBarbu

New Member
If I minimize the window (Chrome or Visual Studio Code) and then manually arrange it while checking OBS preview to make sure it covers all pixels, it is fine, and also the quality of the recording is good. But when I check the screen in Windows, it fits the screen similarly (except the fact when I minimize the corners of the window are rounded and when I maximize the corners are sharp) even if I minimize and adjust manually or maximize. What can lead to this? Thank you!
 

AndreiBarbu

New Member
@koala apologize for tagging you, but I didn't get any response and I am highly struggling with this. I was hoping you can take a moment to provide an opinion. Thank you!
 

koala

Active Member
Me? You seem to have just started with OBS and video recording and are currently exploring how all this works. You observed what everybody observes, and your issues are what everybody is dealing with.

If you capture something - an app window, the Windows desktop or some capture device - its individual video data has some resolution. It's a copy of the bitmap of that source. If you capture a windowed app, its source gets the resolution from the app window size on the desktop. It's always smaller than the desktop resolution, because apps don't cover the Windows taskbar. Only display capture sources or fullscreen capture sources include the taskbar area.

In OBS, you put all sources on a virtual canvas, arrange and overlay them. That's called compositing. You set the canvas resolution in Settings->Video and most often you set it to the desktop resolution, or 1920x1080, because that's a very common standard resolution for videos.
If you put some window capture source on that canvas, it will not cover the full height, because it lacks the area where the Windows taskbar is. That's unavoidable. There are two workarounds: use display capture and include the Windows taskbar, or scale the source up to increase its size until it has the full height of your video ("Fit source"). The price for upscaling is the loss of crispness - it will look blurry, because this is only increasing the size of the captured pixels, it doesn't make the app render a larger bitmap.
And if you want an upscaled maximized window source cover the whole canvas without black bars and without distorting, you need to make sure it has the same aspect ratio as the canvas. If you want to scale the taskbar space away, you need to make the window not maximized but slightly narrower than your desktop, so the upscale can grow to the side as well and still be visible, not only to the bottom.
Of course, a 3rd option is to just keep the area empty or put something else there. Decrease the height of your captured app, so you get more space to show something interesting there. Some people use overlays that consume that space.

Watch videos from other people on Youtube that show similar things you want to show and observe how they solved that challenge, and how different approaches have different quality and appearance.

About round and sharp corners: Windows 11 gives all windows sharp corners that were maximized/height-adjusted with the new window arranging features. Ordinary non maximized and not adjusted windows in their native size have round corners. OBS just captures that. Since OBS always captures rectangles, the actual corner of a round corner has a small unavoidable graphics glitch for these.
 

AndreiBarbu

New Member
@koala thank you very much for taking the time to write this comprehensive answer. I read it at least 5 times to make sure I clearly understand it and the conclusion is that the Windows taskbar influences the recording. I should've specified this from the beginning, I apologize I didn't, but I have the laptop + 2 external monitors. I keep my windows on one of the monitors and I removed the taskbar from the monitors by doing right click on taskbar -> Taskbar settings -> Taskbar behavior -> unchecked Show my taskbar on all displays. So that black bar or 7 pixels at the bottom for Chrome or Visual Studio Code are not for the taskbar.

The reason I am recording windows and not the entire display is because I want to keep on the same screen scripts from where to read and of course I don't want the script to appear on the recording (I don't put the script on another monitor because it would be difficult to read from one monitor and do the work on the other).

Taking in consideration the taskbar is not displayed on the screen where I record my windows, do you have any explanation of why there are that pixels left out that add black bars and how to adjust that without loosing quality?

Thank you for your help!
 

koala

Active Member
Sorry, but I don't have an idea why maximized windows on secondary monitors without taskbar lack a few pixels in width and height. I don't have a secondary monitor myself any more, so I'm unable to check it myself.

If you didn't resize the source manually (reset any resizing by right-click the source->Transform->Reset Transform), it can only mean the window is actually a small bit smaller than expected. May be perhaps you use some 3rd party tool that creates more space around windows, or you perhaps you increased the window border size in Windows. If you make a screenshot of that monitor and compare the screenshot with what you see as source in the preview, you should be able to figure out what is displayed in these 8, 9 or 1 pixels.
 

AndreiBarbu

New Member
Hello @koala ! Thank you for you reply. I took screenshots using ShareX for both, Window and Monitor. There is nothing there where OBS sees pixels.

I checked with a friend who has a similar setup (extra monitor). It's the same for him and no customization was done, he is using Edge in general, he just installed Chrome to test this with me.

It seems general behavior, I am hesitant to say it's a bug, but I really don't see what is wrong.

Maybe windows resized some apps in this kind of context, when added in OBS for example? But I doubt that is happening, if I add Powerpoint presentation or Outlook, it fits perfectly.

Is there a way I can show you or someone from OBS what happens to try to conclude what is going on? I can set a Teams/Zoom quick meeting. Thank you!
 

koala

Active Member
I'm sorry, I'm unable to help further. These are these small details everyone has to work out himself. Fiddling with the compositing layout is one of the major time consuming parts of OBS, if you do more than just full-screen capture something and add a webcam in a corner.
 

AndreiBarbu

New Member
@koala I definitely don't want to push someone for help, but I find this as a general behavior when adding Window captures for tools like Chrome, Visual Studio Code.

I understand everyone has to work out himself and I am struggling with this hours per day.

You said you don't have a monitor to try this, but it looks it happens on laptop screen / main screen as well.

If you would like, please give it a try. You just need to:
1 - Right click on taskbar -> Taskbar settings -> Taskbar behavior -> Automatically hide the taskbar
2 - Add a Window capture for Chrome for example. You will see the pixels left out. Then you can conclude that your screen is actually full, and if you take a screenshot or minimize and drag on the entire screen, not more, it will not have the pixels left out.

I tried on other laptops as well.

If you would like to give a 2 minutes try on your side and confirm it's the same behavior and your opinion, I would highly appreciate. Thank you very much for your help!
 

RobmOz

New Member
Thanks for this post. I am trying to do window captures as well - specifically recording dialog box interactions.

I'm still trying to get my head around why OBS does this?

Here is a scenario to use as an example.

Say I am having problems with the Zoom app and I want to capture the Zoom audio dialog box. On my PC the dialog box measures 794 x 656 pixels.

I set the video base canvas resolution and output scaled resolution to this exact value (in File->Settings->Video).

However when I click OK and view the resulting scene, OBS shows a black bar below the dialog? This seems to indicate that the dialog will end up being scaled?

The amount it would be scaled to would be the "new" canvas resolution which would be 794 x (656+taskbar height)?

Why would OBS do this?

I could understand the taskbar possibly becoming involved when doing a screen capture but not a window capture?

Looks like bug?
 

Attachments

  • black bar at bottom of window capture.png
    black bar at bottom of window capture.png
    91.2 KB · Views: 25
Last edited:

AndreiBarbu

New Member
@RobmOz I addressed this by removing the taskbar from Windows settings. For some apps, I also had some other small lines added and when not using "Client Area" option, that extra lines were not catched.
 

RobmOz

New Member
@RobmOz I addressed this by removing the taskbar from Windows settings. For some apps, I also had some other small lines added and when not using "Client Area" option, that extra lines were not catched.
Thanks for the reply. :-)

When I set the taskbar to auto-hide and do the same thing as before the black bar is still there.

Are you saying you managed to do a window capture with the canvas resolution & scaled resolution the same as the window and the black bar wasn't at the bottom of the scene?
 

Attachments

  • problem still present even with no taskbar.jpg
    problem still present even with no taskbar.jpg
    558 KB · Views: 21
Top