However, i have a question.. using the fallback hack, airtime is constantly playing the default playlist (instead of silence), is there a way to start the liquidsoap script when silence is detected? this way a jingle or station id could be added at the beginning, instead of switching to the already running liquidsoap instance. I tried with fallback.skip to no avail. Here is my script:
# START MODIFICATION
# default = amplify(0.00001, noise())
# default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
clock = audio_to_stereo(single("/srv/airtime/stor/ls_script/clock.mp3"))
security = audio_to_stereo(single("/srv/airtime/stor/ls_script/security.m4a"))
# M3U Playlists are recreated everyday at 00h by a cron:
morning = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/playlists/morning.m3u")
midday = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/playlists/midday.m3u")
afternoon = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/playlists/afternoon.m3u")
night = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/playlists/night.m3u")
jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/playlists/jingles.m3u")
# Schedule
schedule = switch(track_sensitive=false,
[
({0h-6h}, night),
({6h-12h}, morning),
({12h-18h}, midday),
({18h-0h}, afternoon),
({ true }, night)
])
# Let's play!
rotation = rotate(weights=[2,4],[jingles, schedule])
# Add clock signal every hour
radio = add([rotation, switch([({0m0s},clock)])])
# Add security
radio = fallback([radio,security])
# Play a few seconds of silence first
radio = fallback(track_sensitive=false,[strip_blank(max_blank=3.,threshold=-45.,default),radio])
# Add normalization and crossfade:
radio = normalize(smart_crossfade(fade_out=0.5,fade_in=0.5,radio))
# Fallback.skip supposed to move to new track on transitions from airtime to fallback, but it does nothing
default = fallback.skip(input=radio,radio)
# END MODIFICATION
Thanks in advance
By the way, if you need time based jingles, we have a workaround that might be helpful, read here https://forum.sourcefabric.org/discussion/17312/jingle-with-expiration-date
If you want I can tell you how to add a transistion that plays a jingle or station ID before any Autodj chips in or make the time period anything you want
For further reading
It looks like you're new here. If you want to get involved, click one of these buttons!