Liquidsoap for attucks

From wiki.occupyboston.org
Jump to navigation Jump to search

Here's what I've got so far:

#!/usr/local/bin/liquidsoap

# General options
set("log.stdout", false)
set("log.file.path", "/home/members/occupyboston/sites/radio.occupyboston.org/users/obradio/liquidsoap/<script>.log")
# set("init.daemon", true)
# set("init.daemon.pidfile.path", "/home/members/occupyboston/sites/radio.occupyboston.org/users/obradio/liquidsoap/liq.pid")

# Harbor
# Rather than catch a stream from a.stream.mayfirst.org, we'll start listening for a connection here.
set("harbor.bind_addr","209.234.253.248")
live = input.harbor("test-harbor", port=8000, password="######")

# Define our playlists
rotation	= playlist("~/liquidsoap/rotation.pls")
bumps		= playlist("~/liquidsoap/bumps.pls")

# Define special tracks
#live_start	= single("~/liquidsoap/misc/live_start.ogg")
#live_stop	= single("~/liquidsoap/misc/live_stop.ogg")
tech_problems	= single("~/liquidsoap/misc/tech_problems.ogg")

# Set non-live priorities
radio = fallback([ rotation, tech_problems ])

# Timed bumps (they fade in over the normal stream)
radio = smooth_add(normal=radio, special=switch([({0m0s or 15m0s or 30m0s or 45m0s},bumps)]))

# Catch live shows (disregard in favor of harbor)
# full = fallback(track_sensitive=false, [input.http("http://stream.occupyboston.org:8000/ob-live.ogg"), radio])

# If the live feed exists, use that.
full = fallback(track_sensitive=false, [live, radio])
# With transitions and blank detection (5 minutes) WIP
# full = fallback(track_sensitive=false, transitions=[], [strip_blank(length=300.,live), radio])

# Setup the outputs
output.icecast(%vorbis, description="Occupy Boston Radio", genre="Revolution", host="stream.occupyboston.org", port=8000, password="######", mount="liq-test.ogg", full)
output.icecast(%mp3, description="Occupy Boston Radio", genre="Revolution", host="stream.occupyboston.org", port=8000, password="######", mount="liq-test.mp3", full)