Hi all,
I'm a complete newbie with liquidsoap, and I need some help.
I managed to setup a script to run the station with four playlists for
different hours (7:00-13:00, 13:00-19:00, 19:00-1:00, 1:00-7:00). Every
list has its own jingles, and a jingle is played after every second song.
The problem is that the jingles often are shortened, parts of them are
skipped, and the same occures with the start of a song. A few seconds on
the start of 90% of the songs are skipped.
I also have a problem when somebody streams live. Sometimes, when any port
(including 8008) is receiving live stream, that live stream is played
instead of the liquidsoap output.
Here is my script, please check if there's any error which causes this
strange issues.

# Settings
set("server.telnet", true)
set("server.telnet.port", 1234)
set("harbor.bind_addr", "0.0.0.0")
# Music playlists
ro = playlist("/var/www/music/songs/RO")
vlasko = playlist("/var/www/music/songs/vlasko")
es = playlist("/var/www/music/songs/ES")
zabavno = playlist("/var/www/music/songs/zabavno")
# Some jingles
jingles_ro = playlist("/var/www/music/jingles/RO")
jingles_vlasko = playlist("/var/www/music/jingles/vlasko")
jingles_es = playlist("/var/www/music/jingles/ES")
jingles_zabavno = playlist("/var/www/music/jingles/zabavno")
# Connect playlist with respective jingles
ro = random(weights = [1, 2], [jingles_ro, ro])
vlasko = random(weights = [1, 2], [jingles_vlasko, vlasko])
es = random(weights = [1, 2], [jingles_es, es])
zabavno = random(weights = [1, 2], [jingles_zabavno, zabavno])
# If something goes wrong, play this
security = audio_to_stereo(single("/var/www/music/default.ogg"))
# Start building the feed with music
radio = switch([ ({1h-7h}, es), ({7h-13h}, vlasko), ({13h-19h}, ro),
({19h-0h59}, zabavno), ])
# Add the security, requests and smart crossfade
radio = fallback(track_sensitive = false,
[smart_crossfade(fallback([request.queue(id="request"), radio])), security])
# Add a skip command for the music stream
server.register(usage="skip", description="Skip the current song.", "skip",
fun(_) -> begin source.skip(radio) "Done!" end)
# Talk over stream using microphone mount.
mic = audio_to_stereo(input.harbor("mic", port=8008, password="mic
password", buffer=1.0))
radio = smooth_add(delay=0.8, p=0.15, normal=radio, special=mic)
# Add support for live streams.
live = audio_to_stereo(input.harbor("live", port=8008, password="live
password", buffer=1.0)) # here is the password used to connect a live
stream; it can (and should) be different from the source-password in
icecast.xml
full = smart_crossfade(fallback(track_sensitive=false, [live, radio]))
# Stream it out
output.icecast(%mp3.vbr, host="localhost", port=8000, password="password",
mount="autodj", name="Radio Dani (auto DJ)", description="Uvek sa tobom |
Siempre contigo | Always with  you", encoding="UTF-8", radio)
output.icecast(%vorbis, host="localhost", port=8000, password="password",
mount="autodj.ogg", name="Radio Dani (auto DJ)", description="Uvek sa tobom
| Siempre contigo | Always with you", encoding="UTF-8", radio)
output.icecast(%mp3.vbr, host="localhost", port=8000, password="password",
mount="stream", name="Radio Dani", description="Uvek sa tobom | Siempre
contigo | Always with you", encoding="UTF-8", full)
output.icecast(%vorbis, host="localhost", port=8000, password="password",
mount="stream.ogg", name="Radio Dani", description="Uvek sa tobom | Siempre
contigo | Always with you", encoding="UTF-8", full)

-----
Danijela Popović Dani
Ambassador of the Cash Reader app

Mobile: +381 61 177 96 11
Send me a WhatsApp Message <https://wa.me/381611779611>


<https://cashreader.app>
www.cashreader.app <https://cashreader.app>
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to