From a15bd6539153dcf690f724a946afb671a0ff121e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 27 Jan 2024 11:34:04 -0600 Subject: [PATCH] Adjust default CPU thread count to 2 It's a tiny reduction of encoding quality for a major increase in performance --- docs/source/about/advanced_usage.rst | 6 +++--- src/config.cpp | 2 +- src_assets/common/assets/web/config.html | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index 975e88076..fe603e381 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -975,19 +975,19 @@ keybindings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **Description** - Minimum number of threads used for software encoding. + Minimum number of CPU threads used for encoding. .. note:: Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your desired streaming settings on your hardware. **Default** - ``1`` + ``2`` **Example** .. code-block:: text - min_threads = 1 + min_threads = 2 `hevc_mode `__ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/config.cpp b/src/config.cpp index 7418fc0c1..2bdc0e4e9 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -320,7 +320,7 @@ namespace config { 0, // hevc_mode 0, // av1_mode - 1, // min_threads + 2, // min_threads { "superfast"s, // preset "zerolatency"s, // tune diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index a6a26670c..e9d866dde 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -761,8 +761,8 @@
- - + +
Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually
worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest
@@ -1266,7 +1266,7 @@ "channels": 1, "fec_percentage": 20, "qp": 28, - "min_threads": 1, + "min_threads": 2, "hevc_mode": 0, "av1_mode": 0, "capture": "",