Multi-DJ livestream toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
572 B

2 years ago
  1. %include "config.liq"
  2. def create_sources(names, prefix, port)
  3. list.mapi(fun (i, name) ->
  4. input.srt(id=prefix ^ "-" ^ name, port=port + i, clock_safe=false),
  5. names)
  6. end
  7. dj = (mix(id="dj", create_sources(djs, "dj", 9000)):source(2,1,0))
  8. viz = (mix(id="viz", create_sources(visualists, "viz", 9100)):source(2,1,0))
  9. master_audio = drop_video(dj)
  10. master_video = drop_audio(fallback([dj, viz]))
  11. master = mksafe(mux_video(master_audio, video=master_video))
  12. %include "rtmp.liq"
  13. output.rtmp.multi(master, id="out-rtmp", urls=["rtmp://localhost/app/live"])