Commit cdd53062 authored by ale's avatar ale

Take mean of channels when converting to mono

parent 2b360ee1
Pipeline #1388 failed with stages
in 1 minute and 22 seconds
......@@ -24,6 +24,7 @@ set("log.stdout", true)
set("log.unix_timestamps", false)
upstream = mksafe(input.http("{{.SourceURL}}", buffer=5.0))
{{if eq .Channels 1}}upstream = mean(upstream){{end}}
output.icecast(%{{.Format}}(samplerate={{.SampleRate}}, {{if gt .BitRate 0}}bitrate={{.BitRate}}, {{end}}{{if gt .Quality -1.0}}quality={{.Quality}}, {{end}}{{if .StereoMode}}stereo_mode="{{.StereoMode}}", {{end}}{{if eq .Channels 2}}stereo{{else}}mono{{end}}),
mount="{{.TargetMount}}", host="{{.TargetIP}}", port={{.TargetPort}}, user="{{.TargetUsername}}", password="{{.TargetPassword}}",
upstream)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment