Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

OBS Screen Scaling Calculator

This is for getting the dimension to set an input source that's scaled down a little on one dimension.

Code

import math 

source_w = 3840
source_h = 2160
h_padding = 80

new_h = source_h - h_padding
new_w = (source_w / source_h) * new_h 

print(f"Height: {new_h}")
print(f"Width: {math.floor(new_w)}")

Results

Height: 2080
Width: 3697