aboutsummaryrefslogtreecommitdiff
path: root/scripts/interactive.sh
blob: 63b0eaea22c899572a3da08b2659c6b364a84bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

selected_audio_input="$(pactl get-default-sink).monitor"

echo "Select a window to record"
window_id=$(xdotool selectwindow)

echo -n "Enter video fps: "
read fps

echo -n "Enter output file name: "
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"