diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/record-application-name.sh | 2 | ||||
-rwxr-xr-x | scripts/record-save-application-name.sh | 2 | ||||
-rwxr-xr-x | scripts/replay-application-name.sh | 4 | ||||
-rwxr-xr-x | scripts/start-recording.sh | 2 | ||||
-rwxr-xr-x | scripts/start-replay.sh | 4 | ||||
-rwxr-xr-x | scripts/start-stop-recording.sh | 10 | ||||
-rwxr-xr-x | scripts/toggle-recording.sh | 6 |
7 files changed, 23 insertions, 7 deletions
diff --git a/scripts/record-application-name.sh b/scripts/record-application-name.sh index 4139c9c..f8c9b0d 100755 --- a/scripts/record-application-name.sh +++ b/scripts/record-application-name.sh @@ -1,6 +1,6 @@ #!/bin/sh window=$(xdotool selectwindow) -window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "Game") +window_name=$(xdotool getwindowname "$window" || xdotool getwindowclassname "$window" || echo "Game") window_name="$(echo "$window_name" | tr '/\\' '_')" gpu-screen-recorder -w "$window" -f 60 -a default_output -o "$HOME/Videos/recording/$window_name/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")" diff --git a/scripts/record-save-application-name.sh b/scripts/record-save-application-name.sh index b814809..c95f398 100755 --- a/scripts/record-save-application-name.sh +++ b/scripts/record-save-application-name.sh @@ -4,7 +4,7 @@ # gpu-screen-recorder -w screen -f 60 -a default_output -r 60 -sc scripts/record-save-application-name.sh -c mp4 -o "$HOME/Videos" window=$(xdotool getwindowfocus) -window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "Game") +window_name=$(xdotool getwindowname "$window" || xdotool getwindowclassname "$window" || echo "Game") window_name="$(echo "$window_name" | tr '/\\' '_')" video_dir="$HOME/Videos/Replays/$window_name" diff --git a/scripts/replay-application-name.sh b/scripts/replay-application-name.sh index 9f363f7..3c3f8c5 100755 --- a/scripts/replay-application-name.sh +++ b/scripts/replay-application-name.sh @@ -1,6 +1,6 @@ #!/bin/sh window=$(xdotool selectwindow) -window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "Game") +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-recording.sh b/scripts/start-recording.sh index bf71d62..03fda73 100755 --- a/scripts/start-recording.sh +++ b/scripts/start-recording.sh @@ -1,5 +1,5 @@ #!/bin/sh -pidof -q gpu-screen-recorder && exit 1 +pidof -q gpu-screen-recorder && exit 0 video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")" gpu-screen-recorder -w screen -f 60 -a default_output -o "$video" diff --git a/scripts/start-replay.sh b/scripts/start-replay.sh index 6c03178..d47a614 100755 --- a/scripts/start-replay.sh +++ b/scripts/start-replay.sh @@ -1,6 +1,6 @@ #!/bin/sh -pidof -q gpu-screen-recorder && exit 1 +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/start-stop-recording.sh b/scripts/start-stop-recording.sh new file mode 100755 index 0000000..775a829 --- /dev/null +++ b/scripts/start-stop-recording.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Simple script to start recording if it's not recording and stop recording +# if it's already recording. This script can be bound to a single hotkey +# to start/stop recording with a single hotkey. + +killall -SIGINT -q gpu-screen-recorder && exit 0 +video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")" +gpu-screen-recorder -w screen -f 60 -a default_output -o "$video" +notify-send -t 2000 -u low "GPU Screen Recorder" "Video saved to $video" 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" |