hemisphere/src/muxer/main.liq

21 lines
572 B
Plaintext
Raw Normal View History

2020-05-17 02:29:43 +00:00
%include "config.liq"
def create_sources(names, prefix, port)
list.mapi(fun (i, name) ->
input.srt(id=prefix ^ "-" ^ name, port=port + i, clock_safe=false),
names)
end
dj = (mix(id="dj", create_sources(djs, "dj", 9000)):source(2,1,0))
viz = (mix(id="viz", create_sources(visualists, "viz", 9100)):source(2,1,0))
master_audio = drop_video(dj)
master_video = drop_audio(fallback([dj, viz]))
master = mksafe(mux_video(master_audio, video=master_video))
%include "rtmp.liq"
output.rtmp.multi(master, id="out-rtmp", urls=["rtmp://localhost/app/live"])