diff options
Diffstat (limited to 'scripts/scripts/record')
-rwxr-xr-x | scripts/scripts/record | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/scripts/record b/scripts/scripts/record new file mode 100755 index 0000000..bc59fb7 --- /dev/null +++ b/scripts/scripts/record | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/bash | ||
2 | slop=$(slop -f "%x %y %w %h %g %i") || exit 1 | ||
3 | read -r X Y W H G ID < <(echo $slop) | ||
4 | ffmpeg \ | ||
5 | -f x11grab \ | ||
6 | -s "$W"x"$H" \ | ||
7 | -i :0.0+$X,$Y \ | ||
8 | -f alsa \ | ||
9 | -thread_queue_size 512 \ | ||
10 | -ac 2 \ | ||
11 | -ar 48000 \ | ||
12 | -i hw:0 \ | ||
13 | -framerate 60 \ | ||
14 | -vcodec libx264 \ | ||
15 | -threads 4 \ | ||
16 | -y \ | ||
17 | "$HOME"/tmp/x.mkv | ||
18 | |||
19 | ffmpeg \ | ||
20 | -i "$HOME"/tmp/x.mkv \ | ||
21 | -pix_fmt yuv420p \ | ||
22 | -vf scale=-2:1080 \ | ||
23 | "/home/np/vids/rec/$1" | ||