18 lines
344 B
Bash
Executable File
18 lines
344 B
Bash
Executable File
#!/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 \
|
|
-y recording.mkv >/dev/null 2>&1 &
|
|
}
|
|
|
|
if test "$1" = start; then
|
|
fish -ic 'set -U AUDIO record'
|
|
record &
|
|
else
|
|
fish -ic 'set -U AUDIO'
|
|
pkill ffmpeg
|
|
fi
|