From a20068e23ca6e6d5834b1ce50aba34f405facd15 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 20 Jun 2023 00:26:28 +0200 Subject: [PATCH] Do not automatically install coolbits --- README.md | 2 +- TODO | 4 +++- build.sh | 5 +++-- install.sh | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f107aae..f9df263 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ It is recommended to save the video to a SSD because of the large file size, whi Note that if you have a very powerful CPU and a not so powerful GPU and play a game that is bottlenecked by your GPU and barely uses your CPU then a CPU based screen recording (such as OBS with libx264 instead of nvenc) might perform slightly better than GPU Screen Recorder. At least on NVIDIA. ## Note about optimal performance on NVIDIA NVIDIA driver has a "feature" (read: bug) where it will downclock memory transfer rate when a program uses cuda (or nvenc, which uses cuda), such as GPU Screen Recorder. To work around this bug, GPU Screen Recorder can overclock your GPU memory transfer rate to it's normal optimal level.\ -To enable overclocking for optimal performance use the `-oc` option when running GPU Screen Recorder. You also need to have "Coolbits" NVIDIA X setting set to "12" to enable overclocking. You can automatically add this option if you run `sudo install_coolbits.sh` and then reboot your computer. This script is automatically run if you are using NVIDIA and run `install.sh`.\ +To enable overclocking for optimal performance use the `-oc` option when running GPU Screen Recorder. You also need to have "Coolbits" NVIDIA X setting set to "12" to enable overclocking. You can automatically add this option if you run `sudo install_coolbits.sh` and then reboot your computer.\ Note that this only works when Xorg server is running as root, and using this option will only give you a performance boost if the game you are recording is bottlenecked by your GPU.\ Note! use at your own risk! ## Note about optimal performance on AMD/Intel diff --git a/TODO b/TODO index 76ff4b8..d37df12 100644 --- a/TODO +++ b/TODO @@ -67,4 +67,6 @@ Support vp8/vp9/av1. This is especially important on amd which on some distros ( Support screen (all monitors) capture on amd/intel when no combined plane is found. Use separate plane (which has offset and pitch) from combined plane instead of the combined plane. -Both twitch and youtube support variable bitrate but twitch recommends constant bitrate to reduce stream buffering/dropped frames when going from low motion to high motion: https://help.twitch.tv/s/article/broadcasting-guidelines?language=en_US. Info for youtube: https://support.google.com/youtube/answer/2853702?hl=en#zippy=%2Cvariable-bitrate-with-custom-stream-keys-in-live-control-room%2Ck-p-fps%2Cp-fps. \ No newline at end of file +Both twitch and youtube support variable bitrate but twitch recommends constant bitrate to reduce stream buffering/dropped frames when going from low motion to high motion: https://help.twitch.tv/s/article/broadcasting-guidelines?language=en_US. Info for youtube: https://support.google.com/youtube/answer/2853702?hl=en#zippy=%2Cvariable-bitrate-with-custom-stream-keys-in-live-control-room%2Ck-p-fps%2Cp-fps. + +Limit fps recording with x damage. This is good when running replay mode 24/7 and being afk or when not much is happening on the screen. \ No newline at end of file diff --git a/build.sh b/build.sh index 51bb745..caa3176 100755 --- a/build.sh +++ b/build.sh @@ -7,11 +7,12 @@ opts="-O2 -g0 -DNDEBUG -Wall -Wextra" [ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra"; build_gsr_kms_server() { + extra_opts="-fstack-protector-all -fcf-protection=full" dependencies="libdrm" includes="$(pkg-config --cflags $dependencies)" libs="$(pkg-config --libs $dependencies) -ldl" - $CC -c kms/server/kms_server.c $opts $includes - $CC -o gsr-kms-server -O2 kms_server.o $libs $opts + $CC -c kms/server/kms_server.c $opts $extra_opts $includes + $CC -o gsr-kms-server -O2 kms_server.o $libs $opts $extra_opts } build_gsr() { diff --git a/install.sh b/install.sh index 563a3b6..c10392c 100755 --- a/install.sh +++ b/install.sh @@ -12,5 +12,4 @@ rm -f "/usr/local/bin/gpu-screen-recorder" install -Dm755 "gsr-kms-server" "/usr/bin/gsr-kms-server" install -Dm755 "gpu-screen-recorder" "/usr/bin/gpu-screen-recorder" -[ -f "/proc/driver/nvidia/version" ] && ./install_coolbits.sh echo "Successfully installed gpu-screen-recorder"