dotfiles/bin/record.sh
Petar Kapriš 9d963b922a Add /bin
2025-12-16 21:42:18 +01:00

18 lines
468 B
Bash
Executable file

#!/bin/sh
while true; do
date=`date +"%Y-%m-%d"`
file_stub="/home/kappa/media/hacks-recordings/$date-rec-"
file_num="01"
while [ -e "$file_stub$file_num.mkv" ] ; do
file_num=`printf "%02d" $(($file_num + 1))`
done
file_name="$file_stub$file_num.mkv"
read -p "Start recording to file: $file_name? [y/N] " yn
if [ "$yn" != "${yn#[Yy]}" ] ; then # IF answer DOES start with y or Y
wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -f "$file_name"
fi
done