OBS Screen Scaling Calculator

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

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)}")
Height: 2080
Width: 3697
  • I run this directly in my grimoire. So, it's not yet something that's executable here, but it'll show you the formula I use