Hi Romain,

I ran into another problem.
Please take a look at the log below:

2012/03/06 11:29:44 >>> LOG START
2012/03/06 11:29:44 [protocols.external:3] Didn't find "ufetch".
2012/03/06 11:29:44 [protocols.external:3] Found "/usr/bin/wget".
2012/03/06 11:29:44 [main:3] Liquidsoap 1.0.0
2012/03/06 11:29:44 [main:3] Using: graphics=[distributed with Ocaml]
pcre=6.0.1 dtools=0.2.2 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0
ogg=0.4.3 vorbis=0.6.1 mad=0.4.4 flac=0.1.0 flac.ogg=0.1.0
dynlink=[distributed with Ocaml] lame=0.3.1 alsa=0.2.1 ao=0.2.0
taglib=0.2.0 camomile=0.7.1 portaudio=0.2.0 pulseaudio=0.1.2
2012/03/06 11:29:44 [dynamic.loader:2] Could not load plugins in directory
/usr/local/lib/liquidsoap/1.0.0/plugins.
2012/03/06 11:29:44 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz
master.
2012/03/06 11:29:44 [frame:3] Frame size must be a multiple of 1764 ticks =
1764 audio samples = 1 video samples.
2012/03/06 11:29:44 [frame:3] Targetting 'frame.duration': 0.04s = 1764
audio samples = 1764 ticks.
2012/03/06 11:29:44 [frame:3] Frames last 0.04s = 1764 audio samples = 1
video samples = 1764 ticks.
2012/03/06 11:29:44 [threads:3] Created thread "generic queue #1".
2012/03/06 11:29:44 [threads:3] Created thread "generic queue #2".
2012/03/06 11:29:44 [threads:3] Created thread "non-blocking queue #1".
2012/03/06 11:29:44 [harbor:3] Adding mountpoint '/master' on port 8080
2012/03/06 11:29:44 [harbor:3] Adding mountpoint '/dj' on port 9090
2012/03/06 11:29:44 [airtime_128:3] Connecting mount airtime_128 for
[email protected]...
2012/03/06 11:29:44 [airtime_128:3] Connection setup was successful.
2012/03/06 11:29:44 [lang:3]
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect
--stream-id=1 --time=1331051384.12
2012/03/06 11:29:44 [threads:3] Created thread "wallclock_main" (1 total).
2012/03/06 11:29:44 [clock.wallclock_main:3] Streaming loop starts,
synchronized with wallclock.
2012/03/06 11:29:44 [fallback_5255:3] Switch to fallback_5250.
2012/03/06 11:29:44 [fallback_5250:3] Switch to fallback_5245.
2012/03/06 11:29:44 [fallback_5245:3] Switch to src_5202.
2012/03/06 11:29:44 [src_5202:3] Inserting missing metadata.
2012/03/06 11:29:44 [dummy(dot)1:3] Source failed (no more tracks) stopping
output...
2012/03/06 11:29:44 [dummy(dot)2:3] Source failed (no more tracks) stopping
output...
2012/03/06 11:29:44 [dummy(dot)3:3] Source failed (no more tracks) stopping
output...
2012/03/06 11:29:54 [server:3] New client: localhost.
2012/03/06 11:29:54 [decoder:3] Method "MP3" accepted
"/var/tmp/airtime/pypo/cache/scheduler/2fb0b329dddaf05662d92e19c2d3698e.mp3".
2012/03/06 11:29:54 [server:3] Client localhost disconnected.
2012/03/06 11:29:54 [queue:3] Prepared
"/var/tmp/airtime/pypo/cache/scheduler/2fb0b329dddaf05662d92e19c2d3698e.mp3"
(RID 0).
2012/03/06 11:29:54 [cue_cut_5105:3] Cueing in...
2012/03/06 11:29:54 [lang:3]
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --data='0'
--media-id=72
2012/03/06 11:29:54 [lang:3] Using stream_format 0
2012/03/06 11:29:54 [fallback_5245:3] Switch to src_5196 with transition.
2012/03/06 11:30:19 [decoder:3] Method "OGG" accepted "application/ogg".
2012/03/06 11:30:19 [threads:3] Created thread "harbor source feeding" (2
total).
2012/03/06 11:30:19 [harbor_5247:3] Decoding...
2012/03/06 11:30:29 [dummy(dot)2:3] Source failed (no more tracks) stopping
output...
2012/03/06 11:31:13 [main:3] Shutdown started!
2012/03/06 11:31:13 [main:3] Waiting for threads to terminate...
2012/03/06 11:31:13 [airtime_128:3] Closing connection...
2012/03/06 11:31:13 [clock.wallclock_main:3] Streaming loop stopped.
2012/03/06 11:31:13 [threads:3] Thread "wallclock_main" terminated (1
remaining).
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.00s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.02s.
2012/03/06 11:29:44 [harbor_5247:3] Buffer overrun: Dropping 0.0*2s.

*Here is the situation:

External stream is connected to input.harbor and while it's still
connected, I restarted liquidsoap.
When I do that, liquidsoap process is not getting terminated because it's
logging all those "Buffer overrun" messages.
Keep in mined that it's logging what has happened in the past( see the log
timestamp ).

Here is the part of code where I call input.harbor:

 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=0.5,max=15.)
        ignore(output.dummy(master_dj, fallible=true))
        stopable_master_dj = switch(track_sensitive=false,
transitions=[transition], [({!master_dj_enabled},master_dj)])
        fallback(track_sensitive=false, [stopable_master_dj, s])
    else
        s
    end
end

Am I doing something wrong?

Thank you in advance!


On Mon, Mar 5, 2012 at 10:29 PM, James Moon <[email protected]>wrote:

> Hi Romain,
>
> I solved this issue by putting default source into output.dummy.
> Thank you.
>
>
>
> On Mon, Mar 5, 2012 at 3:16 PM, James Moon <[email protected]>wrote:
>
>> Hi Romain,
>>
>> Thank you for the answer.
>> I'm trying out your suggestion, but as I'm doing it, I came up with
>> another question.
>>
>> When live dj connects to one of input.harbor, liquidsoap switches and
>> everthing, but when dj dissconnects,
>> the default source, continues playing from the point where it got
>> overridden.
>>
>> For example, default source was playing 4 mins track and like dj connect
>> to input.harbor at 2 min mark.
>> After 1 min, live dj disconnects. Liquidsoap should fall back to 3 min
>> mark on the default source, but it plays from 2 min mark.
>>
>> What should I do so it would play from 3 min mark?
>>
>> Thank you.
>>
>>
>> On Fri, Mar 2, 2012 at 10:50 PM, Romain Beauxis <[email protected]>wrote:
>>
>>> Hi James!
>>>
>>> Le 2 mars 2012 18:19, James Moon <[email protected]> a écrit :
>>> > 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)
>>>
>>> Nice idea to use low-level noise for default fallback! :-)
>>>
>>> > 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.
>>>
>>> Yeah, you might want to play with input.harbor's buffer/max
>>> paramaters. If you set buffer to a low value it should start playing
>>> right away. However, in this case you might be subject to buffer
>>> underruns in case of temporary network issues.
>>>
>>> > 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?
>>>
>>> Using output.dummy to drain input.harbor is a very good idea, however,
>>> you're doing it wrong here :-)
>>>
>>> When those lines are executed:
>>>
>>> output.dummy(fallible=true, !master_dj)
>>> output.dummy(fallible=true, !dj_live)
>>>
>>> master_dj and dj_live still reference the default source so you are
>>> only creating output.dummy(default) twice. This is because
>>> output.dummy uses the source currenty referenced and is not updated
>>> when the reference changes..
>>>
>>> What you should do instead is wrap output.dummy calls just after the
>>> input.harbor creation, using a dummy initial output (Note: this could
>>> be more elegant if there was a option type in liq, i.e. the possiblity
>>> to do x = ref nul and if !x == nul..)
>>>
>>> Here's an example:
>>>
>>> master_dj_drain = ref output.dummy(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.)
>>>
>>>         # Drain this new source
>>>        source.shutdown(!master_dj_drain)
>>>        master_dj_drain := output.dummy(master_dj, fallible=true)
>>>
>>>        fallback(track_sensitive=false, [master_dj, s])
>>>    else
>>>        s
>>>    end
>>> end
>>>
>>> That being said, if the append_master_dj_input function is meant to be
>>> called only once then you do not have to worry about memory leaks and
>>> you can do:
>>>
>>> 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.)
>>>
>>>         # Drain this new source
>>>        ignore(output.dummy(master_dj, fallible=true))
>>>
>>>        fallback(track_sensitive=false, [master_dj, s])
>>>    else
>>>        s
>>>    end
>>> end
>>>
>>> I've not tested the code above, but I believe it should be alright :-)
>>>
>>> Romain
>>>
>>
>>
>>
>> --
>> James Moon
>>   Software Developer, Sourcefabric
>> [email protected]
>>
>> www.sourcefabric.com | *www.sourcefabric.org*
>>
>> 720 Bathurst St. Suite 203
>> M5S 2R4, Toronto, ON, Canada
>>
>>
>
>
> --
> James Moon
>   Software Developer, Sourcefabric
> [email protected]
>
> www.sourcefabric.com | *www.sourcefabric.org*
>
> 720 Bathurst St. Suite 203
> M5S 2R4, Toronto, ON, Canada
>
>


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

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

720 Bathurst St. Suite 203
M5S 2R4, Toronto, ON, Canada
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to