Hi Florian!

It looks like you need to set the switch to `track_sensitive=true`, which
is the default. Otherwise, the switch does not wait for the end of the
current track to change sources and, since your time predicate is only good
for one minute, it switches back after one minute like you have seen.

Another way of doing it is to use a time range instead of a single fixed
time predicate. I believe the syntax is:
  0w22h00m-0w22h59m
for instance.

Lastly, you could also use a `track_sentitive=false` switch with a
`request.queue` source and push your file exactly when you want it to play.

If you want to learn more about all these options, I recommend checking out
the Liquidsoap book here: https://www.liquidsoap.info/doc-dev/book.html. It
should have gradual explanations of all the options and some
accessible examples.

All the best!
Romain

Le dim. 5 sept. 2021 à 15:40, Florian Reiterer <florianreite...@gmx.de> a
écrit :

>
>
> Hi all,
>
> i am stuck with this task. I want to add prerecorded shows every some
> weekdays at say 18:00.
>
> Cant get my head round this; I tried with a switch, but it only plays one
> minute of the Show („Beitrag“) and returns to the regular stream („radio“).
>
> I was hoping for help on this one, or to point the right direction to
> achieve this.
>
> I only got to the level of a _*very*_basic script (though it streams
> perfectly: liquidsoap rules!) and am using liquidsoap 1.4.4
>
> Here is the test script:
>
> set("log.stdout", true)
>
> set("init.allow_root",true)
>
> set("frame.audio.channels",2)
>
> set("frame.audio.samplerate",96000)
>
> set("request.metadata_decoders",["FLAC","OGG","TAGLIB"])
>
> def transition(radio,Beitrag)
>
>   add(normalize=false,
>
>       [ fade.in(duration=1.,Beitrag),
>
>         fade.out(duration=4.,radio) ])
>
> end
>
> Musik = playlist(reload_mode="watch","E:/FTP Mother Earth")
>
> Klassik = playlist(reload_mode="watch","E:/FTP Mother Earth/Bach")
>
> Beitrag = playlist(reload_mode="watch","E:/MER Sendungen")
>
> radio = rotate (weights = [12, 1],[Musik, Klassik])
>
>
>
> radio = fallback([switch(track_sensitive=false,
> transitions=[transition],[({0w22h00m}, Beitrag), ({ true }, radio)])])
>
>
>
> output.icecast(%ogg(%flac(samplerate=96000, channels=2, compression=5,
> bits_per_sample=24)), fallible = true, icy_metadata = "true",
> mount="source", radio)
>
>
>
> thanks!
>
> Florian
>
> Motherearthradio.de
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to