From 011fc516e06a892507f7697f8b9afe03d280ccec Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Tue, 24 Dec 2024 09:11:42 +0300 Subject: [PATCH] Sway: Limit screen rec cpu usage to half the cores. --- home/file/sway/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/file/sway/default.nix b/home/file/sway/default.nix index 0950f14b..2c7e2782 100644 --- a/home/file/sway/default.nix +++ b/home/file/sway/default.nix @@ -102,6 +102,7 @@ let --framerate ${toString framerate} \ --file "''${scrFile}" \ --pixel-format "${pixfmt}" \ + --codec-param "lp=$(($(cat /proc/cpuinfo | grep ^processor | wc -l) / 2))" \ --geometry "''${scrSelection}" ''; @@ -112,6 +113,7 @@ let -c:v ${codec} \ -pix_fmt ${pixfmt} \ -f ${container} \ + -svtav1-params "lp=$(($(cat /proc/cpuinfo | grep ^processor | wc -l) / 2))" \ "''${scrFile}_" \ && mv "''${scrFile}_" "''${scrFile}" \ || rm "''${scrFile}_"