set("log.level",5)

set("server.telnet",true)

set("frame.video.width",1280)
set("frame.video.height", 720)
set("gstreamer.add_borders", false)
set("clock.allow_streaming_errors", false)
set("log.file.path", "liq.log")


s = fallback([input.http("http://unia.space:8000/fb.ogg"), sine()])


# A source to dump
# s = (...)

# A function to stop
# the current dump source
stop_f = ref (fun () -> ())
# You should make sure you never
# do a start when another dump
# is running.

# Start to dump
def start_dump(file_name) =
  # We create a new file output
  # source
  s = output.file(%vorbis,
            fallible=true,
            on_start={log("Starting dump with file #{file_name}.ogg")},
            reopen_on_metadata=false,
            "#{file_name}.ogg",
            s)
  # We update the stop function
  stop_f := fun () -> source.shutdown(s)
end

# Stop dump
def stop_dump() =
  f = !stop_f
  f ()
end

# Some telnet/server command
server.register(namespace="dump",
                description="Start dumping.",
                usage="dump.start <filename>",
                "start",
                fun (s) ->  begin start_dump(s) "Done!" end)
server.register(namespace="dump",
                description="Stop dumping.",
                usage="dump.stop",
                "stop",
                fun (s) -> begin stop_dump() "Done!" end)


output.icecast(%vorbis, host="jugregator.org", port=8000, user="source", password="kerbananoos", mount="/stream.ogg", s)

Изменить пасту