You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converting a string to float/int will raise an exception if said string
is not a valid float/int. This makes sure such exceptions are caught
and do not interrupt the rest of the analysis.
res.append([LEVEL_WARNING, "Wrong YUV Color Range",
72
+
"""Having the YUV Color range set to "Full" will cause playback issues in certain browsers and on various video platforms. Shadows, highlights and color will look off. In OBS, go to "Settings -> Advanced" and set "YUV Color Range" back to "Limited"."""])
73
+
if (fmt!='NV12'andfmt!='P010'):
74
+
res.append([LEVEL_CRITICAL, "Wrong Color Format",
75
+
"Color Formats other than NV12 and P010 are primarily intended for recording, and are not recommended when streaming. Streaming may incur increased CPU usage due to color format conversion. You can change your Color Format in Settings -> Advanced."])
"Almost all modern streaming services and video platforms expect video in 16:9 aspect ratio. OBS is currently configured to record in an aspect ratio that differs from that. You (or your viewers) will see black bars during playback. Go to Settings -> Video and change your Canvas Resolution to one that is 16:9."])
76
-
if (fmt!='NV12'andfmt!='P010'):
77
-
res.append([LEVEL_CRITICAL, "Wrong Color Format",
78
-
"Color Formats other than NV12 and P010 are primarily intended for recording, and are not recommended when streaming. Streaming may incur increased CPU usage due to color format conversion. You can change your Color Format in Settings -> Advanced."])
"Framerates other than 30fps or 60fps may lead to playback issues like stuttering or screen tearing. Stick to either of these for better compatibility with video players. You can change your OBS frame rate in Settings -> Video."])
82
93
if (fps>=144):
83
94
res.append([LEVEL_WARNING, "Excessively High Framerate",
84
95
"Recording at a tremendously high framerate will not give you higher quality recordings. Usually quite the opposite. Most computers cannot handle encoding at high framerates. You can change your OBS frame rate in Settings -> Video."])
85
-
if'Full'inyuv:
86
-
res.append([LEVEL_WARNING, "Wrong YUV Color Range",
87
-
"""Having the YUV Color range set to "Full" will cause playback issues in certain browsers and on various video platforms. Shadows, highlights and color will look off. In OBS, go to "Settings -> Advanced" and set "YUV Color Range" back to "Limited"."""])
msg="You are running %s %s, which is multiple versions out of date and no longer supported by Apple or recent OBS versions. We recommend updating to the latest macOS release to ensure continued security, functionality and compatibility."% (mv, html.escape(verinfo["name"]))
52
-
mv+=" (EOL)"
53
-
return [LEVEL_WARNING, mv, msg]
50
+
try:
51
+
if (int(verinfo["major"]) <=10and"max"inverinfo):
52
+
msg="You are running %s %s, which is multiple versions out of date and no longer supported by Apple or recent OBS versions. We recommend updating to the latest macOS release to ensure continued security, functionality and compatibility."% (mv, html.escape(verinfo["name"]))
53
+
mv+=" (EOL)"
54
+
return [LEVEL_WARNING, mv, msg]
55
+
except (ValueError, OverflowError):
56
+
pass
54
57
55
58
if"latest"inverinfo:
56
59
msg="You are running %s %s, which is currently supported by Apple and the most recent version of OBS."% (mv, html.escape(verinfo["name"]))
Copy file name to clipboardExpand all lines: checks/network.py
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,11 @@ def checkDrop(lines):
9
9
val=0
10
10
severity=9000
11
11
fordropindrops:
12
-
v=float(drop[drop.find("(") +1: drop.find(")")
13
-
].strip('%').replace(",", "."))
12
+
try:
13
+
v=float(drop[drop.find("(") +1: drop.find(")")
14
+
].strip('%').replace(",", "."))
15
+
except (ValueError, OverflowError):
16
+
v=0
14
17
if (v>val):
15
18
val=v
16
19
if (val!=0):
@@ -58,10 +61,13 @@ def checkNICSpeed(lines):
58
61
m=nicspeed_re.search(i)
59
62
ifm:
60
63
nic=m.group("nicname")
61
-
ifm.group("speed"):
62
-
speed=int(m.group("speed"))
63
-
elifm.group("upspeed"):
64
-
speed=int(m.group("upspeed"))
64
+
try:
65
+
ifm.group("speed"):
66
+
speed=int(m.group("speed"))
67
+
elifm.group("upspeed"):
68
+
speed=int(m.group("upspeed"))
69
+
except (ValueError, OverflowError):
70
+
speed=1000
65
71
ifspeed<1000:
66
72
if'GbE'innicor'Gigabit'innic:
67
73
return [LEVEL_WARNING, "Slow Network Connection", "Your gigabit-capable network card is only connecting at 100mbps. This may indicate a bad network cable or outdated router / switch which could be impacting network performance."]
0 commit comments