From 56474822f708db1b763f89a7c91230b07f1d8892 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 8 Sep 2023 00:59:33 -0500 Subject: [PATCH] Don't scale bitrate linearly with frame rate beyond 60 FPS --- app/settings/streamingpreferences.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/settings/streamingpreferences.cpp b/app/settings/streamingpreferences.cpp index cf802552..1970f9cd 100644 --- a/app/settings/streamingpreferences.cpp +++ b/app/settings/streamingpreferences.cpp @@ -298,9 +298,9 @@ void StreamingPreferences::save() int StreamingPreferences::getDefaultBitrate(int width, int height, int fps) { - // Don't scale bitrate further beyond 90 FPS. It's definitely not a linear + // Don't scale bitrate linearly beyond 60 FPS. It's definitely not a linear // bitrate increase for frame rate once we get to values that high. - float frameRateFactor = qMin(90, fps) / 30.f; + float frameRateFactor = (fps <= 60 ? fps : (sqrt(fps / 60.f) * 60.f)) / 30.f; // This table prefers 16:10 resolutions because they are // only slightly more pixels than the 16:9 equivalents, so