-
Notifications
You must be signed in to change notification settings - Fork 0
/
envmic.sh
64 lines (63 loc) · 2.26 KB
/
envmic.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#/bin/bash
SOURCE="/tmp/virtmic"
echo "----------------------------------------"
echo "!Please select your audio from the list!"
echo "----------------------------------------"
echo ""
files=$(ls ~/bin/envmic/audio/*.mp3)
i=1
for j in $files
do
echo "$i.$j"
file[i]=$j
i=$(( i + 1 ))
done
echo "----------------------------------------"
echo "!Exit with.............................!"
echo "! >> Strg c << BEFORE..................!"
echo "!you enter a number....................!"
echo "!......................................!"
echo "!Restart wit...........................!"
echo "! >> Strg c << AFTER...................!"
echo "!you enter a number....................!"
echo "----------------------------------------"
echo ""
echo "----------------------------------------"
echo "!Make sure to disable the mic..........!"
echo "!before selecting a new audio..........!"
echo "----------------------------------------"
echo ""
echo "----------------------------------------"
echo "!Type in the number of the audio.......!"
echo "----------------------------------------"
echo ""
read input
echo "----------------------------------------"
echo "!You select the audio..................!"
echo ">> ${file[$input]} <<"
echo "----------------------------------------"
echo ""
echo "----------------------------------------"
echo "!Broadcasting.(maybe use firefox)......!"
echo "----------------------------------------"
echo ""
echo "would you use your envmic and start streaming your selected audio?"
echo "normal (n) | soft (s) | half (h) | loud (l) | no (o)"
read -n 1 -p "" ans;
case $ans in
n|normal|N|0)
ffmpeg -re -i ${file[$input]} -f s16le -ar 16000 -ac 1 -filter:a loudnorm - > /tmp/virtmic;;
s|soft|S|1)
ffmpeg -re -i ${file[$input]} -f s16le -ar 16000 -ac 1 -filter:a "volume=0.10" - > /tmp/virtmic;;
h|half|H|2)
ffmpeg -re -i ${file[$input]} -f s16le -ar 16000 -ac 1 -filter:a "volume=0.5" - > /tmp/virtmic;;
l|loud|L|3)
ffmpeg -re -i ${file[$input]} -f s16le -ar 16000 -ac 1 -filter:a "volume=1.5" - > /tmp/virtmic;;
o|no|N|4)
echo " > thank you for using envmic :)"; exit;;
esac
echo "----------------------------------------"
echo "!feel free to restart the script.......!"
echo "----------------------------------------"
echo ""
./envmic.sh