contrib/http

This commit is contained in:
boyska 2017-06-01 11:41:50 +02:00
parent 3879f1c41b
commit bbb8ee601e

View file

@ -0,0 +1,25 @@
#!/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",
%vorbis(quality=0.2, samplerate=44100, channels=2),
#strip_blank(id="strip", max_blank=3., min_noise=0.2, track_sensitive=false, audioin)
audioin
)