mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Add example scripts to save recording in application specific directory
This commit is contained in:
5
scripts/record-application-name.sh
Executable file
5
scripts/record-application-name.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
window=$(xdotool selectwindow)
|
||||
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game")
|
||||
gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -o "$HOME/Videos/recording/$window_name/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
|
||||
5
scripts/replay-application-name.sh
Executable file
5
scripts/replay-application-name.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
window=$(xdotool selectwindow)
|
||||
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "game")
|
||||
gpu-screen-recorder -w screen -f 60 -c mkv -a "$(pactl get-default-sink).monitor" -r 60 -o "$HOME/Videos/replay/$window_name"
|
||||
@@ -3,4 +3,4 @@
|
||||
[ "$#" -ne 4 ] && echo "usage: replay.sh <window_id> <fps> <replay_time_sec> <output_directory>" && exit 1
|
||||
active_sink="$(pactl get-default-sink).monitor"
|
||||
mkdir -p "$4"
|
||||
gpu-screen-recorder -w "$1" -c mp4 -f "$2" -a "$active_sink" -r "$3" -o "$4"
|
||||
gpu-screen-recorder -w "$1" -c mkv -f "$2" -a "$active_sink" -r "$3" -o "$4"
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
video_path="$HOME/Videos"
|
||||
mkdir -p "$video_path"
|
||||
gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -c mp4 -r 30 -o "$video_path"
|
||||
gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -c mkv -r 30 -o "$video_path"
|
||||
|
||||
Reference in New Issue
Block a user