Sway: Limit screen rec cpu usage to half the cores.
This commit is contained in:
parent
7e1502dae3
commit
011fc516e0
|
@ -102,6 +102,7 @@ let
|
||||||
--framerate ${toString framerate} \
|
--framerate ${toString framerate} \
|
||||||
--file "''${scrFile}" \
|
--file "''${scrFile}" \
|
||||||
--pixel-format "${pixfmt}" \
|
--pixel-format "${pixfmt}" \
|
||||||
|
--codec-param "lp=$(($(cat /proc/cpuinfo | grep ^processor | wc -l) / 2))" \
|
||||||
--geometry "''${scrSelection}"
|
--geometry "''${scrSelection}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -112,6 +113,7 @@ let
|
||||||
-c:v ${codec} \
|
-c:v ${codec} \
|
||||||
-pix_fmt ${pixfmt} \
|
-pix_fmt ${pixfmt} \
|
||||||
-f ${container} \
|
-f ${container} \
|
||||||
|
-svtav1-params "lp=$(($(cat /proc/cpuinfo | grep ^processor | wc -l) / 2))" \
|
||||||
"''${scrFile}_" \
|
"''${scrFile}_" \
|
||||||
&& mv "''${scrFile}_" "''${scrFile}" \
|
&& mv "''${scrFile}_" "''${scrFile}" \
|
||||||
|| rm "''${scrFile}_"
|
|| rm "''${scrFile}_"
|
||||||
|
|
Loading…
Reference in a new issue