Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions checks/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,28 @@ def checkStreamDelay(lines):
if (len(delayLines) > 0):
return [LEVEL_INFO, "Stream Delay", "Stream Delay may currently be active. This means that your stream is being delayed by a certain number of seconds. If this is not what you intended, please disable it in Settings -> Advanced -> Stream Delay."]
return None


def checkServiceRecommendations(lines):
maxBitrate = None
for i, line in enumerate(lines):
if "User is ignoring service bitrate limits." in line:
for j in range(i + 1, len(lines)):
if "video bitrate:" in lines[j]:
maxBitrateMatch = re.search(r'video bitrate:\s+(\d+)', lines[j])
if maxBitrateMatch:
maxBitrate = int(maxBitrateMatch.group(1))
break
break

if maxBitrate is not None:
for i, line in enumerate(lines):
if "bitrate:" in line and "video bitrate:" not in line:
currentBitrateMatch = re.search(r'bitrate:\s+(\d+)', line)
if currentBitrateMatch:
currentBitrate = int(currentBitrateMatch.group(1))
if currentBitrate > maxBitrate:
return [LEVEL_WARNING, "Max Video Bitrate Limit Exceeded",
f"Current bitrate {currentBitrate}kbps exceeds max video bitrate limit {maxBitrate}kbps. "
"This may result in the streaming service not displaying the video from your stream or rejecting it entirely."]
return None
3 changes: 2 additions & 1 deletion loganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def doAnalysis(url=None, filename=None):
checkDesktopEnvironment(logLines),
checkMissingModules(logLines),
checkLinuxVCam(logLines),
checkMacPermissions(logLines)
checkMacPermissions(logLines),
checkServiceRecommendations(logLines)
])
messages.extend(checkVideoSettings(logLines))
m = parseScenes(logLines)
Expand Down