Preview: Crop Capture Area to 16:9

Beast96GT

Member
I chatted with few of you and Jim on IRC Friday night about a new feature I'm implementing, and as promised, I've got a preview for progress and feedback.

Feature: Crop Capture Area to 16:9
Why: Monitor aspect ratios that are wider than 16:9 (21:9 Ultra-Wide Monitors, Nvidia Surround, AMD Eyefinity, etc.) are impacted performance-wise because pixels outside the 16:9 area are captured and processed even if you crop them out. For example: I play Battlefield 1 at a resolution of 6000x1080 (50:9). To stream, I need to crop the game to 16:9 for viewers to see it at 1080p on Twitch or YouTube. Essentially, I'm cropping out 2/3 of the screen to do this. Since it requires a LOT of horsepower to not only capture and process large resolutions, but to also to play the game at the same time, why even capture those pixels to begin with? As Ultra-Wide monitors become more and more mainstream, I see this issue becoming larger.
Fix: Add an option to the 'Game Capture' properties (off by default) that will tell the C++ game capture classes (D3D11-capture.cpp, etc.) to only copy the needed pixels for 16:9 from the backbuffer.

Current Status:
1) I've added the option to the menu for game capture. It was originally to be more configurable, but Jim requested something more simple and I agree--plus it saved me a lot of work fighting with Qt.

cf4df77798.png


2) The feature currently works in DX11, now seemingly bug-free. The performance difference is very noticeable. If you look at the screenshot below, you'll notice that I'm playing in Surround mode locally, but only the middle 16:9 area (1920x1080) is being captured to OBS:

vlcsnap_2016_10_23_11h29m43s681.png


3) I've implemented it in DX10, since the code is almost identical to DX11, but I need to test it. DX9 is fixed-function and I haven't looked into any differences and OpenGL will be a completely different beast.


Some of my questions to OBS contributors:
1) What do you think of the wording of the feature?
2) Do I need to support all graphic APIs before adding it? and if not, should that be listed in properties as well?
3) I've only used Subversion, TFS, Perforce--Git very little (using GitKraken right now). How does a pull request work and what's the best way to start it?

Thanks, and I'm open to any other feedback, just please be constructive. :)

-Chris
 
Top