hello,

I got a strange problem now,
I have a normal stream (source) in witch I need to include news at the begening 
of some time.
for exemple 8 am there is a 15 mn news.
the news is a .mp3 file I play with switch option.
but I want to include to the stream before playind the file, a jingle on the 
stream witch says « and now the news », and a fade out of the stream.
it works perfectly one time, then it doens’t work anymore for next set hours.
next time I have the news only without the jingle on the stream, neither the 
fadeout…
any idea?
here is the code,
thank’s ! :-)





#!/usr/local/bin/liquidsoap
set("init.daemon",true)
set("log.level",3)

live = input.http(new_track_on_metadata=false, 
"http://stream.sing-sing.org:8000/source_Live";)
source_N = input.http(new_track_on_metadata=true, 
"http://stream.sing-sing.org:8000/source_N";)
DERNIER_SECOURS=single("/usr/local/etc/liquidsoap/silence.mp3")
journal10 =  single(id="journal10", 
"/home/singsing/liquidsoap_Journaux_RFI/journal10mn_00m.aac")
jingleJournal =  single(default_duration=4., length=3., 
"/usr/local/etc/liquidsoap/jingleJournal.mp3")
live = merge_tracks (live)
source_N = merge_tracks (source_N)


source = fallback(track_sensitive=false, [strip_blank(track_sensitive=false, 
max_blank=20., min_noise=5., live), source_N, DERNIER_SECOURS])


                     
  # we create jingle+news
  topOfTheHour=sequence(merge=true,[
                            jingleJournal,
                            journal10,
                    ])
 
# we fadeout source stream under the jingle
def getTop()
        add([fade.final(duration=4., type="log", source), topOfTheHour])
end


  # differents times for news
s=switch(track_sensitive=false,[
({
 ((1w or 2w or 3w or 4w or 5w or 6w) and 06h00m16s-06h15m20s)
or ((1w or 2w or 3w or 4w or 5w or 6w) and 07h00m16s-07h15m20s)
or ((1w or 2w or 3w or 4w or 5w or 6w) and 08h00m16s-08h15m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 09h00m16s-09h10m20s)
or ((7w) and 10h00m16s-10h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 11h00m16s-11h10m20s
or ((1w or 2w or 3w or 4w or 5w or 6w) and 12h00m16s-12h10m20s)
or ((1w or 2w or 3w or 4w or 5w) and 13h00m16s-13h15m20s)
or ((6w or 7w) and 13h00m16s-13h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 14h00m16s-14h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 15h00m16s-15h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 16h00m16s-16h10m20s)
or ((1w or 2w or 3w or 4w or 5w or 6w or 7w) and 17h00m16s-17h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 18h00m16s-18h10m20s)
#or ((1w or 2w or 3w or 4w or 5w) and 19h00m16s-19h10m20s)
or ((1w or 2w or 3w or 4w or 5w or 6w or 7w) and 20h00m16s-20h10m20s)
}, getTop()),

 ({ true }, source)
])



              
              
# we merge all tracks
s = merge_tracks (s)



#output
output.icecast(%vorbis.cbr(samplerate=44100, channels=2, bitrate=500), host = 
"localhost", port = 8000, password = "xxxxxx", mount = "testMountpoint", 
name="blablabla", description="point de montage de base", 
url="http://www.sing-sing.org";, genre="eclectic", s)


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to