aboutsummaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/gpu-screen-recorder.env9
-rw-r--r--extra/gpu-screen-recorder.service23
-rw-r--r--extra/gsr-nvidia.conf1
-rwxr-xr-xextra/install_preserve_video_memory.sh8
4 files changed, 41 insertions, 0 deletions
diff --git a/extra/gpu-screen-recorder.env b/extra/gpu-screen-recorder.env
new file mode 100644
index 0000000..c4728cc
--- /dev/null
+++ b/extra/gpu-screen-recorder.env
@@ -0,0 +1,9 @@
+WINDOW=screen
+CONTAINER=mp4
+QUALITY=very_high
+CODEC=hevc
+AUDIO_CODEC=opus
+AUDIO_DEVICE=alsa_output.pci-0000_0a_00.4.iec958-stereo.monitor
+FRAMERATE=60
+REPLAYDURATION=60
+OUTPUTDIR=/run/media/dec05eba/SSD1TB/Videos/aaaa \ No newline at end of file
diff --git a/extra/gpu-screen-recorder.service b/extra/gpu-screen-recorder.service
new file mode 100644
index 0000000..0ba621b
--- /dev/null
+++ b/extra/gpu-screen-recorder.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=GPU Screen Recorder Service
+
+[Service]
+EnvironmentFile=-%h/.config/gpu-screen-recorder.env
+Environment=WINDOW=screen
+Environment=CONTAINER=mp4
+Environment=QUALITY=very_high
+Environment=CODEC=auto
+Environment=AUDIO_CODEC=opus
+Environment=AUDIO_DEVICE=
+Environment=FRAMERATE=60
+Environment=REPLAYDURATION=30
+Environment=OUTPUTDIR=%h/Videos
+Environment=MAKEFOLDERS=no
+Environment=COLOR_RANGE=limited
+ExecStart=/bin/sh -c 'AUDIO="${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" -mf $MAKEFOLDERS $ADDITIONAL_ARGS -cr $COLOR_RANGE'
+KillSignal=SIGINT
+Restart=on-failure
+RestartSec=5s
+
+[Install]
+WantedBy=default.target
diff --git a/extra/gsr-nvidia.conf b/extra/gsr-nvidia.conf
new file mode 100644
index 0000000..10cbf7d
--- /dev/null
+++ b/extra/gsr-nvidia.conf
@@ -0,0 +1 @@
+options nvidia NVreg_PreserveVideoMemoryAllocations=1
diff --git a/extra/install_preserve_video_memory.sh b/extra/install_preserve_video_memory.sh
new file mode 100755
index 0000000..c5cf658
--- /dev/null
+++ b/extra/install_preserve_video_memory.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+script_dir=$(dirname "$0")
+cd "$script_dir"
+
+[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1
+
+install -Dm644 gsr-nvidia.conf /etc/modprobe.d/gsr-nvidia.conf