Skip to content

Commit 8f11f63

Browse files
PenwyRytoEX
authored andcommitted
checks: Fixup encoder detection
- Updated the encoder names that have since changed - Added software AV1 encoders detection - Fixed up syntax for better readability
1 parent eb6ad65 commit 8f11f63

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

checks/encoding.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def checkEncodeError(lines):
104104

105105

106106
def checkEncoding(lines):
107-
hasx264 = len(search('[x264 encoder:', lines))
108-
hasNVENC = (len(search('[jim-nvenc:', lines)) + len(search('[NVENC encoder:', lines)))
109-
hasAMD = (len(search('[AMF] [H264]', lines)) + len(search('[AMF] [H265]', lines)))
110-
hasQSV = len(search('[qsv encoder:', lines))
111-
hasAPPLE = (len(search('[VideoToolbox recording_h264:', lines)) + len(search('[VideoToolbox streaming_h264:', lines)))
107+
hasSoftware = search('[x264 encoder:', lines) or search('[AV1 encoder:', lines)
108+
hasHardware = (search('[obs-nvenc:', lines)
109+
or search('[texture-amf-', lines)
110+
or search('[qsv encoder:', lines)
111+
or searchExclude('[VideoToolbox ', lines, ["[VideoToolbox encoder]: "]))
112112
drops = search('skipped frames', lines)
113113
val = 0
114114
severity = 9000
@@ -127,13 +127,13 @@ def checkEncoding(lines):
127127
severity = LEVEL_WARNING
128128
else:
129129
severity = LEVEL_INFO
130-
if (hasx264 > 0 and (hasAMD + hasQSV + hasNVENC + hasAPPLE) > 0):
130+
if (hasSoftware and hasHardware):
131131
return [severity, "{}% Encoder Overload".format(val),
132132
"""Encoder overload may be related to your CPU or GPU being overloaded, depending on the encoder in question. If you are using a software encoder (x264) please see the <a href="https://obsproject.com/kb/encoding-performance-troubleshooting">CPU Overload Guide</a>. If you are using a hardware encoder (AMF, QSV/Quicksync, NVENC) please see the <a href="https://obsproject.com/kb/encoding-performance-troubleshooting">GPU Overload Guide</a>."""]
133-
elif (hasx264 > 0):
133+
elif hasSoftware:
134134
return [severity, "{}% CPU Encoder Overload".format(val),
135135
"""The encoder is skipping frames because of CPU overload. Read about <a href="https://obsproject.com/kb/encoding-performance-troubleshooting">General Performance and Encoding Issues</a>."""]
136-
elif ((hasNVENC + hasAMD + hasQSV + hasAPPLE) > 0):
136+
elif hasHardware:
137137
return [severity, "{}% GPU Encoder Overload".format(val),
138138
"""The encoder is skipping frames because of GPU overload. Read about troubleshooting tips in our <a href="https://obsproject.com/kb/encoding-performance-troubleshooting">GPU Overload Guide</a>."""]
139139
else:

checks/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def checkAMDdrivers(lines):
4646

4747

4848
def checkNVIDIAdrivers(lines):
49-
if (search('[jim-nvenc] Current driver version does not support this NVENC version, please upgrade your driver', lines) or search('[NVENC] Test process failed: outdated_driver', lines)):
49+
if (search('[obs-nvenc] Current driver version does not support this NVENC version, please upgrade your driver', lines) or search('[NVENC] Test process failed: outdated_driver', lines)):
5050
return [LEVEL_WARNING, "Old NVIDIA Drivers",
5151
"""The installed NVIDIA driver does not support NVENC features needed for optimized encoders. Consider updating your drivers by downloading the newest installer from <a href="https://www.nvidia.com/Download/index.aspx">NVIDIA's website</a>. """]
5252

0 commit comments

Comments
 (0)