From 5266dc2293cebf4128c52801cf44c270d904e3f8 Mon Sep 17 00:00:00 2001 From: celso Date: Mon, 13 May 2024 03:43:56 -0300 Subject: [PATCH] changed audiorec to use a file for noise profile instead of recording 5 seconds of microphone input --- screc/audiorec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screc/audiorec.sh b/screc/audiorec.sh index 4fbd454..87cbdb3 100755 --- a/screc/audiorec.sh +++ b/screc/audiorec.sh @@ -1,3 +1,3 @@ #!/bin/bash [ ! -z "${1}" ] && filename="${1}" || read -p 'type in filename >' filename && [ -z "$filename" ] && filename="audio" -ffmpeg -threads 12 -f alsa -probesize 80M -channels 2 -sample_rate 48000 -thread_queue_size 16384 -i plughw:0,0 -c:a libvorbis -filter_complex "[0]asetpts=N/SR/TB,highpass=300,lowpass=20000,asendcmd=0.0 afftdn sn start,asendcmd=5.0 afftdn sn stop,afftdn=nr=80:tr=on:tn=on:nt=c:om=o,atrim=5,volume=2,asetpts=PTS-STARTPTS" /tmp/"${filename}".ogg +ffmpeg -hide_banner -threads 12 -i ~/Music/noise.ogg -f alsa -probesize 80M -channels 2 -sample_rate 48000 -thread_queue_size 16384 -i plughw:0,0 -c:a libvorbis -filter_complex "[1:a:0]asetpts=N/SR/TB[corrected];[0:a:0][corrected]concat=n=2:v=0:a=1[outa];[outa]highpass=300,lowpass=20000,asendcmd=0.0 afftdn sn start,asendcmd=5.0 afftdn sn stop,afftdn=nr=80:tr=on:tn=on:nt=c:om=o,atrim=5,volume=2,asetpts=PTS-STARTPTS[outb]" -map "[outb]" /tmp/"${filename}".ogg