From cc0ba8f0c760856d8ed05f95b8bb130985ff04aa Mon Sep 17 00:00:00 2001 From: Cameron Smith <114649266+smathles@users.noreply.github.com> Date: Mon, 16 Sep 2024 08:27:26 +1000 Subject: [PATCH] Enable screen recorder to use CPU encoder (#259) --- services/screen_record.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/screen_record.sh b/services/screen_record.sh index 87544e1..9289523 100755 --- a/services/screen_record.sh +++ b/services/screen_record.sh @@ -26,8 +26,10 @@ startRecording() { echo "Usage: $0 start screen [screen_name]" exit 1 fi + + GPU_TYPE=$(lspci | grep -E 'VGA|3D' | grep -Ev '00:02.0|Integrated' > /dev/null && echo "" || echo "-encoder cpu") - gpu-screen-recorder -w "$target" -f 60 -a "$(pactl get-default-sink).monitor" -o "$outputPath" & + gpu-screen-recorder -w "$target" -f 60 -a "$(pactl get-default-sink).monitor" -o "$outputPath" $GPU_TYPE & echo "Recording started. Output will be saved to $outputPath" }