mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Fix systemd service file
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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")"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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©=0&file=stream.m3u8"
|
||||
Reference in New Issue
Block a user