icytv-liq/liq/view.liq

42 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-12-18 17:38:18 +00:00
%include "config.liq"
%include "protocols.liq"
%include "rtmp.liq"
%include "utils.liq"
2019-01-11 17:36:58 +00:00
%include "metadata.liq"
2018-12-18 17:38:18 +00:00
set("server.telnet", true)
set("server.telnet.bind_addr", confstr("control.host", "0.0.0.0"))
set("server.telnet.port", confint("control.port", 7004))
set("frame.video.width",confint("liquidsoap.output.width", 1280))
set("frame.video.height",confint("liquidsoap.output.height", 720))
set("frame.video.samplerate",confint("liquidsoap.output.samplerate", 25))
2018-12-18 17:38:18 +00:00
2019-01-11 11:36:49 +00:00
# Schedule image
2019-01-11 13:17:02 +00:00
video_no_queue = mksafe(playlist(confstr("liquidsoap.fallback",""),conservative=true,reload_mode="watch"))
2018-12-18 17:38:18 +00:00
2019-01-11 11:36:49 +00:00
image_schedule = playlist("schedule.pls",reload_mode="watch")
image_schedule = mux_audio(audio=blank(),image_schedule)
video_base = add([video_no_queue,image_schedule])
# Queue
2018-12-18 17:38:18 +00:00
queue1 = request.equeue(id="queue", conservative=true, length=60., timeout=1000.)
add_skip_command(command="queue.skip", queue1)
2019-01-11 11:36:49 +00:00
# Fallback to queue
2018-12-18 17:38:18 +00:00
source = fallback([queue1, video_base],track_sensitive=false)
add_skip_command(command="skip", source)
2019-01-11 11:36:49 +00:00
# Add file cleanup
2018-12-18 17:38:18 +00:00
source = on_end(delay=0., file_end_cleanup, source)
2019-01-11 17:36:58 +00:00
source = on_metadata(update_nowplaying, source)
2018-12-18 17:38:18 +00:00
2019-01-11 11:36:49 +00:00
# Output to RTMP
2018-12-18 17:38:18 +00:00
output.rtmp.live(
key=confstr("rtmp.key",""),
url=confstr("rtmp.url","rtmp://localhost/live"),
video_bitrate=confint("liquidsoap.output.bitrate", 2000),
2018-12-18 17:38:18 +00:00
source)