Commit cdd53062 authored by ale's avatar ale
Browse files

Take mean of channels when converting to mono

parent 2b360ee1
......@@ -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}}",
Supports Markdown
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