Diogo Pinto
8 years ago
Hello,
Im struggling to configure a stream the way I want it. Things start to get complicated when I add a few playlists.
What I basically want is a radio that broadcasts a main playlist every day from 0h to 21h and from 22h to 0h. During the 21h-22h timeframe Id like it to broadcast a special playlist, thats different every day.
As extra features, Id like the stream to have a logfile, telnet communication with option to control volume (and integration with user requests, if possible), a jingle playing every 5 songs and live show relaying. I already have a script that does pretty much all this except the weekly schedule and live shows.
Followed documentation as I did for other streams and what I have is the following:
#!/usr/bin/liquidsoap
# Log file
set("log.file.path","~ /log.log")
# Log in console
set("log.stdout", true)
# Telnet
set("server.telnet", true)
# Telnet volume
v = interactive.float("volume", 1.)
# Playlists
main = playlist("~/Music/icecast-playlist.txt")
default = single("~/Music/jingles/jingle.mp3")
early = playlist("~/Music/early.txt")
euphoric = playlist("~/Music/euphoric.txt")
jingles = playlist("~/Music/jingles/jingle.txt")
raw = playlist("~/Music/raw.txt")
liveset = single("~/Music/liveset.mp3")
special = playlist("~/Music/special.txt")
# Play user requests if there are any,
# otherwise one of our playlists,
# and the default file if anything goes wrong.
radio = fallback([ request.queue(id="request"),
switch([({ 1w and 21h-22h }, early),
({ 2w and 21h-22h }, euphoric),
({ 3w and 21h-22h }, raw),
({ 4w and 21h-22h }, liveset),
({ 5w and 21h-22h }, special),
({ 6w and 21h-22h }, special),
({ 7w and 21h-22h }, special),
({ (1w or 2w or 3w or 4w or 5w or 6w or 7w) and 0h-21h and 22h-0h }, main),
random(weights = [1, 5],[jingles, radio]),
amplify(v, radio),
default])
# Add the ability to relay live shows
full =
fallback(track_sensitive=false,
[input.http("http://localhost:8000/live.ogg"),
radio])
# Output the full stream in MP3
output.icecast(%mp3,
host="localhost",port=8000,password="testpw",
mount="stream",full)
After developing the script and eliminating all parse errors, Im still left with two errors, on the last 2 sections of the script: one, on the code for live show relaying (parse error on the full = part) and one on the output part (line 45, char 16 which is the ( before %mp3). Even if I swap this output part for the output part on the script thats currently running perfectly fine, I get the same error.
Any clues regarding this? Tried searching the documentation, but nothing seems to be of help for this.
Thanks in advance.
Im struggling to configure a stream the way I want it. Things start to get complicated when I add a few playlists.
What I basically want is a radio that broadcasts a main playlist every day from 0h to 21h and from 22h to 0h. During the 21h-22h timeframe Id like it to broadcast a special playlist, thats different every day.
As extra features, Id like the stream to have a logfile, telnet communication with option to control volume (and integration with user requests, if possible), a jingle playing every 5 songs and live show relaying. I already have a script that does pretty much all this except the weekly schedule and live shows.
Followed documentation as I did for other streams and what I have is the following:
#!/usr/bin/liquidsoap
# Log file
set("log.file.path","~ /log.log")
# Log in console
set("log.stdout", true)
# Telnet
set("server.telnet", true)
# Telnet volume
v = interactive.float("volume", 1.)
# Playlists
main = playlist("~/Music/icecast-playlist.txt")
default = single("~/Music/jingles/jingle.mp3")
early = playlist("~/Music/early.txt")
euphoric = playlist("~/Music/euphoric.txt")
jingles = playlist("~/Music/jingles/jingle.txt")
raw = playlist("~/Music/raw.txt")
liveset = single("~/Music/liveset.mp3")
special = playlist("~/Music/special.txt")
# Play user requests if there are any,
# otherwise one of our playlists,
# and the default file if anything goes wrong.
radio = fallback([ request.queue(id="request"),
switch([({ 1w and 21h-22h }, early),
({ 2w and 21h-22h }, euphoric),
({ 3w and 21h-22h }, raw),
({ 4w and 21h-22h }, liveset),
({ 5w and 21h-22h }, special),
({ 6w and 21h-22h }, special),
({ 7w and 21h-22h }, special),
({ (1w or 2w or 3w or 4w or 5w or 6w or 7w) and 0h-21h and 22h-0h }, main),
random(weights = [1, 5],[jingles, radio]),
amplify(v, radio),
default])
# Add the ability to relay live shows
full =
fallback(track_sensitive=false,
[input.http("http://localhost:8000/live.ogg"),
radio])
# Output the full stream in MP3
output.icecast(%mp3,
host="localhost",port=8000,password="testpw",
mount="stream",full)
After developing the script and eliminating all parse errors, Im still left with two errors, on the last 2 sections of the script: one, on the code for live show relaying (parse error on the full = part) and one on the output part (line 45, char 16 which is the ( before %mp3). Even if I swap this output part for the output part on the script thats currently running perfectly fine, I get the same error.
Any clues regarding this? Tried searching the documentation, but nothing seems to be of help for this.
Thanks in advance.