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
16 changes: 8 additions & 8 deletions checks/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <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>."""]
elif (hasx264 > 0):
elif hasSoftware:
return [severity, "{}% CPU Encoder Overload".format(val),
"""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>."""]
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 <a href="https://obsproject.com/kb/encoding-performance-troubleshooting">GPU Overload Guide</a>."""]
else:
Expand Down
2 changes: 1 addition & 1 deletion checks/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://www.nvidia.com/Download/index.aspx">NVIDIA's website</a>. """]

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[pycodestyle]
ignore = E501, E722
exclude = __init__, venv, env, .venv, ENV, __pycache__
ignore = E501, E722, W503
exclude = __init__, venv, env, .venv, ENV, __pycache__