2020-07-22 14:43:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
record() {
|
|
|
|
sleep 2
|
|
|
|
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 -f alsa -i recorder \
|
|
|
|
-c:v libx264 -preset ultrafast \
|
|
|
|
-c:a libopus -b:a 96k -ac 2 -ar 48000 \
|
2021-01-04 12:45:36 +01:00
|
|
|
-y recording.mkv >/dev/null 2>&1 &
|
2020-07-22 14:43:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if test "$1" = start; then
|
|
|
|
fish -ic 'set -U AUDIO record'
|
|
|
|
record &
|
|
|
|
else
|
|
|
|
fish -ic 'set -U AUDIO'
|
|
|
|
pkill ffmpeg
|
|
|
|
fi
|