Add script to record the selected window (with the active audio device)

This commit is contained in:
dec05eba
2022-03-22 13:04:08 +01:00
parent f81bdfb29e
commit d4bc7b420e
3 changed files with 10 additions and 1 deletions

8
record-selected.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh -e
window=$(xdotool selectwindow)
active_sink="$(pactl get-default-sink).monitor"
mkdir -p "$HOME/Videos"
video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
gpu-screen-recorder -w "$window" -c mp4 -f 60 -a "${active_sink}.monitor" -o "$video"
notify-send "GPU Screen Recorder" "Saved video to $video"