Hi,

Here is what we try to achieve with liquidsoap(for now at least).
We want to use two input.harbor with default stream source.
Below is our code:
.
.
.
default = amplify(0.00001, noise())
default = rewrite_metadata([("artist","Airtime"), ("title",
"offline")],default)
set("harbor.bind_addr", "0.0.0.0")
.
.
.
master_dj = ref default
dj_live = ref default

def append_master_dj_input(master_harbor_input_port,
master_harbor_input_mount_point, s) =
    if master_harbor_input_port != 0 and master_harbor_input_mount_point !=
"" then
        master_dj := input.harbor(master_harbor_input_mount_point,
port=master_harbor_input_port, auth=check_master_dj_client,
buffer=7.,max=15.)
        fallback(track_sensitive=false, [!master_dj, s])
    else
        s
    end
end

def append_dj_input(dj_harbor_input_port, dj_harbor_input_mount_point, s) =
    if dj_harbor_input_port != 0 and dj_harbor_input_mount_point != "" then
        dj_live := input.harbor(dj_harbor_input_mount_point,
port=dj_harbor_input_port, auth=check_dj_client, buffer=7.,max=15.)
        fallback(track_sensitive=false, [!dj_live, s])
    else
        s
    end
end

s = fallback(track_sensitive=false, [queue, default])
s = on_metadata(notify, s)
s = map_metadata(append_title, s)
s = append_dj_input(dj_live_stream_port, dj_live_stream_mp, s)
s = append_master_dj_input(master_live_stream_port, master_live_stream_mp,
s)
.
.
.
output.dummy(fallible=true, !master_dj)
output.dummy(fallible=true, !dj_live)


I'm doing master_dj = ref default and dj_live = ref default so I can put
them into output.dummy later on.
If I knew how to create a reference to 'source' object I would do that, but
I'm not sure. So I'm just creating dummy ref so I can use it later.

Here are my problems:

1. When input stream is connected to one of the input.harbor, I'm get about
3~4 secs of silence. This means LS is detecting the connection, but the
source is not playing right away.
I'm suspecting it's something to with buffer? How do we make it so it plays
as soon as it switch? or switch whenever it's ready to play.

2. when I restart liquidsoap, when 2 input stream is still connected, it
logs crazy amount of "Buffer overrun" message in the log file. How do you
solve this?

Thank you for the support.

-- 
James Moon
 Software Developer, Sourcefabric
[email protected]

www.sourcefabric.com | *www.sourcefabric.org*

720 Bathurst St. Suite 203
M5S 2R4, Toronto, ON, Canada
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to