aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-05 23:39:17 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-05 23:39:17 +0200
commit239f2010f5b91117ecd485ac20c541a1e8ecd434 (patch)
treeee053a466bbe3499f0b7df17fd792d16ffb8a9de /scripts
parentcb782763f03b146df43344992a82007ad616c8b9 (diff)
Fix systemd service file
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/interactive.sh4
-rwxr-xr-xscripts/record-application-name.sh2
-rwxr-xr-xscripts/record-save-application-name.sh2
-rwxr-xr-xscripts/replay-application-name.sh2
-rwxr-xr-xscripts/start-recording.sh2
-rwxr-xr-xscripts/start-replay.sh2
-rwxr-xr-xscripts/toggle-recording-selected.sh2
-rwxr-xr-xscripts/twitch-stream-local-copy.sh2
-rwxr-xr-xscripts/twitch-stream.sh2
-rwxr-xr-xscripts/youtube-hls-stream.sh2
10 files changed, 10 insertions, 12 deletions
diff --git a/scripts/interactive.sh b/scripts/interactive.sh
index 63b0eae..bfaaae0 100755
--- a/scripts/interactive.sh
+++ b/scripts/interactive.sh
@@ -1,7 +1,5 @@
#!/bin/sh -e
-selected_audio_input="$(pactl get-default-sink).monitor"
-
echo "Select a window to record"
window_id=$(xdotool selectwindow)
@@ -14,4 +12,4 @@ read output_file_name
output_dir=$(dirname "$output_file_name")
mkdir -p "$output_dir"
-gpu-screen-recorder -w "$window_id" -c mp4 -f "$fps" -a "$selected_audio_input" -o "$output_file_name"
+gpu-screen-recorder -w "$window_id" -c mp4 -f "$fps" -a default_output -o "$output_file_name"
diff --git a/scripts/record-application-name.sh b/scripts/record-application-name.sh
index cc29255..4139c9c 100755
--- a/scripts/record-application-name.sh
+++ b/scripts/record-application-name.sh
@@ -3,4 +3,4 @@
window=$(xdotool selectwindow)
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "Game")
window_name="$(echo "$window_name" | tr '/\\' '_')"
-gpu-screen-recorder -w "$window" -f 60 -a "$(pactl get-default-sink).monitor" -o "$HOME/Videos/recording/$window_name/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
+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 46c51f0..b814809 100755
--- a/scripts/record-save-application-name.sh
+++ b/scripts/record-save-application-name.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# This script should be passed to gpu-screen-recorder with the -sc option, for example:
-# gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -r 60 -sc scripts/record-save-application-name.sh -c mp4 -o "$HOME/Videos"
+# 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")
diff --git a/scripts/replay-application-name.sh b/scripts/replay-application-name.sh
index 18df61a..9f363f7 100755
--- a/scripts/replay-application-name.sh
+++ b/scripts/replay-application-name.sh
@@ -3,4 +3,4 @@
window=$(xdotool selectwindow)
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "Game")
window_name="$(echo "$window_name" | tr '/\\' '_')"
-gpu-screen-recorder -w "$window" -f 60 -c mkv -a "$(pactl get-default-sink).monitor" -r 60 -o "$HOME/Videos/Replays/$window_name"
+gpu-screen-recorder -w "$window" -f 60 -c mkv -a default_output -r 60 -o "$HOME/Videos/Replays/$window_name"
diff --git a/scripts/start-recording.sh b/scripts/start-recording.sh
index 455065e..bf71d62 100755
--- a/scripts/start-recording.sh
+++ b/scripts/start-recording.sh
@@ -2,4 +2,4 @@
pidof -q gpu-screen-recorder && exit 1
video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
-gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -o "$video"
+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 2093c98..6c03178 100755
--- a/scripts/start-replay.sh
+++ b/scripts/start-replay.sh
@@ -3,4 +3,4 @@
pidof -q gpu-screen-recorder && exit 1
video_path="$HOME/Videos"
mkdir -p "$video_path"
-gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -c mkv -r 30 -o "$video_path"
+gpu-screen-recorder -w screen -f 60 -a default_output -c mkv -r 30 -o "$video_path"
diff --git a/scripts/toggle-recording-selected.sh b/scripts/toggle-recording-selected.sh
index 309e4d1..d4c1b38 100755
--- a/scripts/toggle-recording-selected.sh
+++ b/scripts/toggle-recording-selected.sh
@@ -2,7 +2,7 @@
killall -SIGINT gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low 'GPU Screen Recorder' 'Stopped recording' && exit 0;
window=$(xdotool selectwindow)
-active_sink="$(pactl get-default-sink).monitor"
+active_sink=default_output
mkdir -p "$HOME/Videos"
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"
diff --git a/scripts/twitch-stream-local-copy.sh b/scripts/twitch-stream-local-copy.sh
index 4a678e8..fa23cf6 100755
--- a/scripts/twitch-stream-local-copy.sh
+++ b/scripts/twitch-stream-local-copy.sh
@@ -3,5 +3,5 @@
# Stream on twitch while also saving the video to disk locally
[ "$#" -ne 4 ] && echo "usage: twitch-stream-local-copy.sh <window_id> <fps> <livestream_key> <local_file>" && exit 1
-active_sink="$(pactl get-default-sink).monitor"
+active_sink=default_output
gpu-screen-recorder -w "$1" -c flv -f "$2" -q high -a "$active_sink" | tee -- "$4" | ffmpeg -i pipe:0 -c copy -f flv -- "rtmp://live.twitch.tv/app/$3"
diff --git a/scripts/twitch-stream.sh b/scripts/twitch-stream.sh
index aaa5828..99dade8 100755
--- a/scripts/twitch-stream.sh
+++ b/scripts/twitch-stream.sh
@@ -1,5 +1,5 @@
#!/bin/sh
[ "$#" -ne 3 ] && echo "usage: twitch-stream.sh <window_id> <fps> <livestream_key>" && exit 1
-active_sink="$(pactl get-default-sink).monitor"
+active_sink=default_output
gpu-screen-recorder -w "$1" -c flv -f "$2" -q high -a "$active_sink" -o "rtmp://live.twitch.tv/app/$3"
diff --git a/scripts/youtube-hls-stream.sh b/scripts/youtube-hls-stream.sh
index 2f1659e..10fa6b2 100755
--- a/scripts/youtube-hls-stream.sh
+++ b/scripts/youtube-hls-stream.sh
@@ -1,5 +1,5 @@
#!/bin/sh
[ "$#" -ne 3 ] && echo "usage: youtube-hls-stream.sh <window_id> <fps> <livestream_key>" && exit 1
-active_sink="$(pactl get-default-sink).monitor"
+active_sink=default_output
gpu-screen-recorder -w "$1" -c hls -f "$2" -q high -a "$active_sink" -ac aac -o "https://a.upload.youtube.com/http_upload_hls?cid=$3&copy=0&file=stream.m3u8" \ No newline at end of file