From: Romain B. <to...@ra...> - 2013-07-24 19:14:55
|
Hi, 2013/7/22 Beau Walker <bj...@gm...>: > Hi Guys, I'm having some dramas with liquidsoap (on ubuntu 12.04) only > playing one jingle on startup and then never playing another one until I > restart it. Can anyone see what I've done wrong here? > > #!/usr/bin/liquidsoap > > # Log dir > set("log.file.path","/home/user/log/backyard-radio.log") > > # Music > musicplaylist = > playlist(mode='randomize',reload=1,reload_mode="rounds","/home/users/Music") > > # Start building the feed with music > radio = smart_crossfade(musicplaylist) > > # Some jingles > jingles = > playlist(mode='randomize',reload=1,reload_mode="rounds","/home/users/StationID") > > # If something goes wrong, we'll play this > security = single("/home/users/live/broken.mp3") > > #the security > radio = fallback( track_sensitive = false, [radio, security] ) > > #nominalize on the fly > radio = amplify(1.,override="replay_gain",radio) > #radio = normalize( radio ) > > radio=mksafe( radio ) > > # Now add some jingles > radio = rotate(weights=[1,3],[jingles, radio]) > > # Stream it out as 160kbps > output.icecast(%mp3(bitrate=160, samplerate=44100), > host = "localhost", port = 8000, > description = "Radio!", > name = "Radio!", > url = "", > public = false, > user = "source", password = "*******", mount = "listen.mp3", > radio ) > > Thanks I think that your problem comes from the fact that smart_crossfade removes track limits, which is natural if you think about it. However, this will confuse the rotate operator.. What you should do instead is put the smart_crossfade on top of the rotate. You should even be able to annotate the jingle playlist in order to have a special transition for jingles. See for instance radiopi there: http://liquidsoap.fm/doc-svn/radiopi.html There is a custom crossfade there to take care of jingles. You can add a "annotate:..:" prefix to your playlist using the.. prefix parameter :-) Good luck! Romain |