From 945ce74d5ce9ec00ff67cdd354f4e1973dff0b0c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 8 Aug 2022 11:22:49 +0800 Subject: [PATCH] feat: record audio only --- bin/sc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/sc b/bin/sc index 7cbcfaa..db087a0 100755 --- a/bin/sc +++ b/bin/sc @@ -31,6 +31,20 @@ function _start -a x y w h fps echo $outfile end +set --append subcmds audio +set audio_help '' 'record audio only' +function audio + set outfile "$HOME/recording/audio-"(date '+%y%m%d-%H%M-%S')".aac" + touch /tmp/recording.pid + sleep 1 + ffmpeg \ + -f alsa -i default \ + -c:a aac \ + $outfile > /dev/null 2>&1 /tmp/recording.pid + echo $outfile +end + set --append subcmds prepare set prepare_help '[w=1920] [h=1080]' 'create virtual monotors if physical size is higher than specified'