[Savonet-users] crossfade and liq_fade_out

2008-05-16 Thread bede
Hi,

I need to insert commercials in a playlist.
To get tracks i use an external script to read next file from a playlist 
and return metadata according to track type :
nofade for jingles/commercials and fade for songs. I send 
liq_fade_in and liq_fade_out too.

My response from bash script (get.next.track.sh) is :
-
...
# for jingles
META=annotate:type=\nofade\,liq_fade_in=\0.1\,liq_fade_out=\0.1\,display_title=\TITLE\:/path/to/file.mp3
 

...
# for songs
META=annotate:type=\fade\,liq_fade_in=\0.1\,liq_fade_out=\3.\,display_title=\TITLE\:/path/to/file.mp3
 

...
# return response
echo ${META}
-

i use a crossfade function from examples:

def crossfade(~start_next,~fade_in,~fade_out,s)
 s = fade.in(duration=fade_in,s)
 s = fade.out(duration=fade_out,s)
 fader = fun (a,b) - add(normalize=false,[b,a])
 cross(fader,s)
end

radio = crossfade(start_next=1., fade_out=1., fade_in=1., radio)

==
Problem ONE

Now, at first impression, liq_fade_out is not correct. In almost all 
cases, some 4-5 seconds overlap i hear.
But i tested intensively and is not from incorrect liq_fade_out handling.

In crossfade function, start_next parameter IS NOT USED !
And, in cross() function, duration is 5 seconds default.

If i add liq_start_next parameter to META (annotate), all is ok.

In this case, in examples, need to replace

cross(fader,s)

with something like

cross(fader,duration=start_next,s)

===
Problem TWO

if i use function

radio = crossfade(start_next=1., fade_in=0., fade_out=0., radio)
or
radio = crossfade(start_next=0., fade_in=0., fade_out=0., radio)

this is response from liquidsoap console log:

... Waiting for [EMAIL PROTECTED] to be ready...
... Waiting for [EMAIL PROTECTED] to be ready...
etc

this is WITH annotate liq_fade_in/out/start_next set like above, not to 
zero.



10x,
Daniel





-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


Re: [Savonet-users] Multiple hierarchical sources limitations

2008-05-16 Thread David Baelde
Hi,

Just a notice that Romain actually implemented kicking (as the stop
command if I followed correctly) and per-mount passwords. See
http://savonet.rastageeks.org/ticket/139 for details.

On Mon, May 12, 2008 at 9:25 AM, Dimitris Nastos [EMAIL PROTECTED] wrote:
 Our DJ's use SAM Broadcaster to stream their music to Icecast. When
 there's nothing playing (i.e., temporary network congestion, no song
 queued up, no voice), SAM streams nothing, although it remains
 connected. Icecast does not disconnect, but liquidsoap gets the
 following error:

 2008/05/12 00:27:23 [stream.mp3:2] Read error Unix.Unix_error(2, read, )
 2008/05/12 00:27:23 [/dj0:2] Feeding stopped: Mad.End_of_stream

 Which is kinda normal, but unless I have a way to define a timeout,
 liquidsoap will start jumping back and forth between live and playlist
 in case of temporary stream interruptions. Currently I am using a
 transition with a few seconds of blank to work around this.

Regarding this issue, you can try playing with the buffer size
parameters (cf. liquidsoap -h input.harbor) so that if the
interruption is less than the buffer size, liq doesn't switch back to
automated playlist. If that doesn't work, then I should try to
understand why.. Anyway, buffering a lot of data might have its
problems, in which case using a transition seems sensible.

Cheers,
-- 
David

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


Re: [Savonet-users] request.dynamic runs a script 3 times

2008-05-16 Thread Romain Beauxis
Le Thursday 15 May 2008 23:52:39 Benoït Leudet, vous avez écrit :
 Hi,

Hi !

 It works well except that I was surprised to see that the script is
 called three times (two times if length=30.) and I would like that only
 one title is sent because I want to manage the playlist a more precise way.

 Is it possible or do I try another solution?

Well, the script is called several times until the queue is fed, but the songs 
are played one by one...

How does it cause trouble for you ?

Romain
-- 
How can a man
Discover a land
That already populated with Indians?

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


Re: [Savonet-users] crossfade and liq_fade_out

2008-05-16 Thread David Baelde
Hi,

On Fri, May 16, 2008 at 9:46 AM, bede [EMAIL PROTECTED] wrote:
 To get tracks i use an external script to read next file from a playlist
 and return metadata according to track type :
 nofade for jingles/commercials and fade for songs. I send
 liq_fade_in and liq_fade_out too.

First a small remark: the type=nofade/fade does not seem to be
used in your script. Liquidsoap doesn't recognize anything like that:
all it does is reacting to the liq_fade_* and liq_start_next metadata.

 def crossfade(~start_next,~fade_in,~fade_out,s)
  s = fade.in(duration=fade_in,s)
  s = fade.out(duration=fade_out,s)
  fader = fun (a,b) - add(normalize=false,[b,a])
  cross(fader,s)
 end

You made a good point about this function taken from our wiki: the
start_next parameter is unused. In normal times I'd have advised you
to fix it on our wiki, but now we're moving to another system for
documentation, soon online. I'll fix it there. As you correctly said,
the last line should be cross(duration=liq_start_next,fader,s).

 Now, at first impression, liq_fade_out is not correct. In almost all
 cases, some 4-5 seconds overlap i hear.

The overlap is controlled by start_next, not fade_out. Cross_fade is
only the duration of the fading, that is re-shaping of the enveloppe
of an end of track.

 If i add liq_start_next parameter to META (annotate), all is ok.

That makes sense. In the end, you understood the problem quite well,
I'm just confirming everything you said :)

 Problem TWO
 if i use function
 radio = crossfade(start_next=1., fade_in=0., fade_out=0., radio)
 this is response from liquidsoap console log:
 ... Waiting for [EMAIL PROTECTED] to be ready...
 ... Waiting for [EMAIL PROTECTED] to be ready...
 etc

Thanks a lot. You spotted a bug. The fade.out() operator fails to
declare itself as ready when its duration is zero. I've fixed it on
SVN. If you don't want to rebuild from SVN, you can safely use
fade.out=0.0001 -- smaller than that may result in a rounding to 0.

Have fun with liquidsoap!
-- 
David

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users


Re: [Savonet-users] Questions about delay and switch

2008-05-16 Thread Benoït Leudet
David Baelde a écrit :
 I don't think you can get anything precise from icecast. Still
 imprecise, you can play with harbor's buffer:
 input.harbor(buffer=80.,...). A little less should be better actually,
 since other buffers come into play in the pipeline, before and after
 liquidsoap.
   
I forgot to tell you that this is the solution we use and it works well 
with a buffer of 82.

We just made our first shoutcasts with the delay and the results are 
very good. We need more tests to be sure.
The only problem is we pray that the source will not be disconnected 
because if we reconnect immediately, we lost the sync. In this case, we 
have to wait 82 seconds to reconnect. OK, the shoutcast is cut but it's 
not dramatical.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users