diff --git a/checks/encoding.py b/checks/encoding.py index c6ea7bd..bbbdbca 100644 --- a/checks/encoding.py +++ b/checks/encoding.py @@ -104,11 +104,11 @@ def checkEncodeError(lines): def checkEncoding(lines): - hasx264 = len(search('[x264 encoder:', lines)) - hasNVENC = (len(search('[jim-nvenc:', lines)) + len(search('[NVENC encoder:', lines))) - hasAMD = (len(search('[AMF] [H264]', lines)) + len(search('[AMF] [H265]', lines))) - hasQSV = len(search('[qsv encoder:', lines)) - hasAPPLE = (len(search('[VideoToolbox recording_h264:', lines)) + len(search('[VideoToolbox streaming_h264:', lines))) + hasSoftware = search('[x264 encoder:', lines) or search('[AV1 encoder:', lines) + hasHardware = (search('[obs-nvenc:', lines) + or search('[texture-amf-', lines) + or search('[qsv encoder:', lines) + or searchExclude('[VideoToolbox ', lines, ["[VideoToolbox encoder]: "])) drops = search('skipped frames', lines) val = 0 severity = 9000 @@ -127,13 +127,13 @@ def checkEncoding(lines): severity = LEVEL_WARNING else: severity = LEVEL_INFO - if (hasx264 > 0 and (hasAMD + hasQSV + hasNVENC + hasAPPLE) > 0): + if (hasSoftware and hasHardware): return [severity, "{}% Encoder Overload".format(val), """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 CPU Overload Guide. If you are using a hardware encoder (AMF, QSV/Quicksync, NVENC) please see the GPU Overload Guide."""] - elif (hasx264 > 0): + elif hasSoftware: return [severity, "{}% CPU Encoder Overload".format(val), """The encoder is skipping frames because of CPU overload. Read about General Performance and Encoding Issues."""] - elif ((hasNVENC + hasAMD + hasQSV + hasAPPLE) > 0): + elif hasHardware: return [severity, "{}% GPU Encoder Overload".format(val), """The encoder is skipping frames because of GPU overload. Read about troubleshooting tips in our GPU Overload Guide."""] else: diff --git a/checks/graphics.py b/checks/graphics.py index 2600027..15a731c 100644 --- a/checks/graphics.py +++ b/checks/graphics.py @@ -46,7 +46,7 @@ def checkAMDdrivers(lines): def checkNVIDIAdrivers(lines): - 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)): + 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)): return [LEVEL_WARNING, "Old NVIDIA Drivers", """The installed NVIDIA driver does not support NVENC features needed for optimized encoders. Consider updating your drivers by downloading the newest installer from NVIDIA's website. """] diff --git a/setup.cfg b/setup.cfg index 5ed199d..3d8a101 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [pycodestyle] -ignore = E501, E722 -exclude = __init__, venv, env, .venv, ENV, __pycache__ \ No newline at end of file +ignore = E501, E722, W503 +exclude = __init__, venv, env, .venv, ENV, __pycache__