Skip to content

Commit

Permalink
Updated script
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur-Sebastian committed Feb 14, 2022
1 parent 73c7df2 commit 9737f5b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions audiotoolbox.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

#Audio clipping method originally by Nils Lindemann
#from superuser.com, modified to fit digital capture.

flacrip(){
artist="${1:-Unknown}"
title="${2:-Unknown}"
album="${3:-Unknown}"
filename="$artist - $title.flac"
echo -e "\e[1;30;47mFlacRip V0.2 Alpha\e[0m\n\e[1m(C) Arthur Sebastian Miller 2022\e[0m"
echo -e "\e[1;36mPlease select a capture device:\e[0m"
pactl list sources short
read deviceId;
Expand All @@ -14,7 +16,7 @@ flacrip(){
echo -e "\e[1;36mPlease wait...\e[0m"
pactl unload-module module-suspend-on-idle
sleep 1
ffmpeg -f pulse -ar 44100 -sample_fmt s16 -i $deviceId "temp.wav"
ffmpeg -hide_banner -f pulse -ar 44100 -sample_fmt s16 -i $deviceId "temp.wav"
pactl load-module module-suspend-on-idle
ffmpeg -hide_banner -i "temp.wav"\
-af silenceremove=start_periods=1:start_silence=0.1:start_threshold=0,areverse,silenceremove=start_periods=1:start_silence=0.1:start_threshold=0,areverse\
Expand Down

0 comments on commit 9737f5b

Please sign in to comment.