aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/replay-application-name.sh2
-rwxr-xr-xscripts/start-replay.sh2
-rwxr-xr-xscripts/toggle-recording.sh6
3 files changed, 8 insertions, 2 deletions
diff --git a/scripts/replay-application-name.sh b/scripts/replay-application-name.sh
index 2a651bb..3c3f8c5 100755
--- a/scripts/replay-application-name.sh
+++ b/scripts/replay-application-name.sh
@@ -3,4 +3,4 @@
window=$(xdotool selectwindow)
window_name=$(xdotool getwindowname "$window" || xdotool getwindowclassname "$window" || echo "Game")
window_name="$(echo "$window_name" | tr '/\\' '_')"
-gpu-screen-recorder -w "$window" -f 60 -c mkv -a default_output -r 60 -o "$HOME/Videos/Replays/$window_name"
+gpu-screen-recorder -w "$window" -f 60 -c mkv -a default_output -bm cbr -q 40000 -r 60 -o "$HOME/Videos/Replays/$window_name"
diff --git a/scripts/start-replay.sh b/scripts/start-replay.sh
index 860f2ce..d47a614 100755
--- a/scripts/start-replay.sh
+++ b/scripts/start-replay.sh
@@ -3,4 +3,4 @@
pidof -q gpu-screen-recorder && exit 0
video_path="$HOME/Videos"
mkdir -p "$video_path"
-gpu-screen-recorder -w screen -f 60 -a default_output -c mkv -r 30 -o "$video_path"
+gpu-screen-recorder -w screen -f 60 -a default_output -c mkv -bm cbr -q 40000 -r 30 -o "$video_path"
diff --git a/scripts/toggle-recording.sh b/scripts/toggle-recording.sh
new file mode 100755
index 0000000..b353dc9
--- /dev/null
+++ b/scripts/toggle-recording.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+killall -SIGINT gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low 'GPU Screen Recorder' 'Stopped recording' && exit 0;
+video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
+notify-send -t 1500 -u low 'GPU Screen Recorder' "Started recording video to $video"
+gpu-screen-recorder -w screen -f 60 -a "default_output" -o "$video"