-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontend: Log streaming service recommended maximums #11733
base: master
Are you sure you want to change the base?
Conversation
81d15e2
to
fa436f5
Compare
Log the maximum recommended audio and video bitrate when the user ticks the "Ignore streaming service setting recommendations" box.
fa436f5
to
49a1380
Compare
@PatTheMav updated according to your review comments. FYI I have gotten slightly mixed messages around some of this from comments on the previous PR that was approved but your suggestions all made sense. |
No worries, we're in a transitory phase away from "prior art" and towards "new rules", particularly with the frontend refactor PR merged that aims to establish some of those rules. It'll be a bit like pulling teeth for the foreseeable future to get rid of old habits among contributors. 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a question about the approach here.
std::string videoBitRateLogString = maxVideoBitrate > 0 ? std::to_string(maxVideoBitrate) | ||
: "None"; | ||
std::string audioBitRateLogString = maxAudioBitrate > 0 ? std::to_string(maxAudioBitrate) | ||
: "None"; | ||
|
||
blog(LOG_INFO, | ||
"User is ignoring service bitrate limits.\n" | ||
"Service Recommendations:\n" | ||
"\tvideo bitrate: %s\n" | ||
"\taudio bitrate: %s", | ||
videoBitRateLogString.c_str(), audioBitRateLogString.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder a bit if we're not overcomplicating this. We could instead:
blog(LOG_INFO,
"User is ignoring service bitrate limits.\n"
"Service Recommendations:\n"
"\tvideo bitrate: %d\n"
"\taudio bitrate: %d",
maxVideoBitrate, maxAudioBitrate);
Or are maxVideoBitrate
and maxAudioBitrate
not guaranteed to be zero if no value is specified? Is there value in distinguishing 0
from None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had originally done it this way actually but to me it seemed to read a little more awkward/unclear if we were to log a max value as 0 when it is actually meant that there is no max recommended value at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to wait a bit for a other opinions. It just jumped out to me at first glance that it seemed like extra work here, and I wasn't sure how much extra clarity it granted. cc @Warchamp7
Description
Log the maximum recommended audio and video bitrate when the user ticks the "Ignore streaming service setting recommendations" box.
Remake of #10917 because I broke something when rebasing and the commit new commit is not showing.
Motivation and Context
Mentioned by @Warchamp7 that we should warn when a user is going above the recommended bitrate in the loganalyzer, this logging is a requirement to make that happen.
How Has This Been Tested?
Tested Twitch and Youtube in both simple and advanced output mode, both showed the correct values.
Tested with "Custom" to confirm it is showing "None" for audio and video bitrate maximums when those values are returning 0.
https://obsproject.com/logs/ZuadI85OgoP0Yjjj
Types of changes
Checklist: