-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstream.liq
32 lines (28 loc) · 860 Bytes
/
stream.liq
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
# Enable logging
settings.log.stdout.set(true)
# Function to handle the input of the dynamically updated WAV file
def start_wav_stream() =
# Use input.external.rawaudio as a fallback-safe method to read raw audio data
source = input.external.rawaudio(
buffer=2.0,
max=10.0,
restart_on_error=true,
channels=2,
samplerate=44100,
"tail -f ./saved_show.wav" # Command to continuously read the updated WAV file
)
# Wrap the source in a fail-safe fallback to handle interruptions
mksafe(source)
end
# Set up the streaming source using the defined function
radio = start_wav_stream()
# Output configuration: Stream the processed audio to Icecast
#output.ao(radio, fallible=true)
output.icecast(
%mp3(bitrate=128, samplerate=44100, stereo=true),
host="localhost",
port=8000,
password="hackme",
mount="stream",
radio
)