direttoforo/contrib/liquidsoap/http.liq
2017-06-01 17:49:19 +02:00

26 lines
711 B
Text

#!/usr/bin/env liquidsoap
# A simple script that will both record to file and expose an http server.
# The http server uses (aggressive) silence detection
set('log.file', false)
set('log.stdout', true)
audioin = in()
audioin = rewrite_metadata([("artist", "Direttoforo")], audioin)
audioin = server.rms(id="rms", audioin)
f = output.file(
id="rec",
%vorbis(quality=0.2, samplerate=44100, channels=2),
"rec/%Y/%m/rec-%Y-%m-%d_%H-%M-%S.ogg",
audioin
)
http = output.harbor(
id="http",
mount="/stream.ogg",
password="",
fallible=true,
%vorbis(quality=0.1, samplerate=44100, channels=2),
strip_blank(id="strip", max_blank=3., min_noise=0.2, track_sensitive=false, audioin)
)