papillon-ls2.liq 3.94 KB
Newer Older
hark's avatar
new ls  
hark committed
1 2 3 4 5
#!/usr/bin/liquidsoap

# We're 48k!
set("frame.audio.samplerate",48000)
set("harbor.bind_addr","0.0.0.0")
hark's avatar
ports  
hark committed
6
set("harbor.port",8052)
hark's avatar
new ls  
hark committed
7 8 9 10 11 12 13 14 15
set("harbor.password","source")
set("harbor.password","hackme")
# Put the log file in some directory where
# you have permission to write.
set("log.file.path","/tmp/<script>.log")
# Print log messages to the console,
# can also be done by passing the -v option to liquidsoap.
set("log.stdout", true)
# Use the telnet server for requests
hark's avatar
ports  
hark committed
16 17
set("server.telnet.port", 9052)

hark's avatar
new ls  
hark committed
18 19 20 21
set("server.telnet", true)



hark's avatar
ports  
hark committed
22 23


hark's avatar
new ls  
hark committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
# Add a skip function to a source
# when it does not have one
# by default
def add_skip_command(s) =
 # A command to skip
 def skip(_) =
   source.skip(s)
   "Done!"
 end
 # Register the command:
 server.register(namespace="#{source.id(s)}",
                 usage="skip",
                 description="Skip the current song.",
                 "skip",skip)
end

# Lines starting with # are comments, they are ignored.

# A bunch of files and playlists,
# supposedly all located in the same base dir.

hark's avatar
hark committed
45 46
#default = mksafe(single("~/src/streaming-media-stuff/liquidsoap/technical-problem.ogg"))
default = noise()
hark's avatar
new ls  
hark committed
47 48
notlive = single("~/src/streaming-media-stuff/liquidsoap/notlive.ogg")

nixopper's avatar
nixopper committed
49
#jingles     	= playlist(timeout=20.0,mode="random",reload=300,reload_mode="seconds","/mnt/radio/jingles")
hark's avatar
new ls  
hark committed
50 51 52
#musicsquat     	= playlist(timeout=20.0,mode="random",reload=300,reload_mode="seconds","/mnt/storage5/radio/music_squat_related/albums/")
#musicsquatlive     = playlist(timeout=20.0,mode="random",reload=300,reload_mode="seconds","/mnt/storage5/radio/music_squat_related/live/")
#talks     = playlist(reload=600, "/mnt/radio/talks/")
nixopper's avatar
nixopper committed
53 54 55 56 57
#papillon_archive     = playlist(reload=600, "/mnt/radio/papillon_archive/")
#admfest = playlist(reload=600, "/mnt/radio/Live Recordings/")
music = playlist(reload=600, "/home/user/media/music/")
 
#archive_mix = random(weights=[1,1,2,2],[ jingles, notlive, papillon_archive, admfest ])
hark's avatar
new ls  
hark committed
58 59 60 61 62


#radio = random(weights=[3,5,2,1,1,2,2],[ jingles, musicsquat, musicsquatlive, talks, notlive, archive, admfest ])

# Attach a skip command to the source s:
nixopper's avatar
nixopper committed
63
add_skip_command(music)
hark's avatar
new ls  
hark committed
64 65


nixopper's avatar
nixopper committed
66 67
#papa = input.harbor(id="mount-a", port=8052,  "pap-a")
#papb = input.harbor(id="mount-b", port=8052, "pap-b")
hark's avatar
hark committed
68 69 70 71 72
papa = strip_blank(max_blank=115.,input.harbor(id="pap-a", port=8052,  "pap-a"))
papb = strip_blank(max_blank=115.,input.harbor(id="pap-b", port=8052, "pap-b"))
papc = strip_blank(max_blank=115.,input.harbor(id="pap-c", port=8052, "pap-c"))
papd = strip_blank(max_blank=115.,input.harbor(id="pap-d", port=8052, "pap-d"))
pape = strip_blank(max_blank=115.,input.harbor(id="pap-e", port=8051, "pap-e"))
nixopper's avatar
nixopper committed
73 74 75

#full = fallback(track_sensitive = false, [papa, papb, normalize(smart_crossfade(archive_mix)), default ])
full = fallback(track_sensitive = false, [papa, papb, papc, papd, pape, normalize(smart_crossfade(music)), default ])
hark's avatar
hark committed
76 77


hark's avatar
new ls  
hark committed
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92


### stream outputs in pap-streams.liq


%include "pap-streams.liq"

#icecast_archive_flac(full, host="10.205.25.56", port=8000, password="icecold")
#icecast_archive_flac(full, host="10.205.25.56", port=8000, password="icecold")
#icecast_archive_aac(full, host="deathstar.puscii.nl", port=8000, password="icecold")

icecast_ogg(full, mount="pap-ls2.ogg", host="deathstar.puscii.nl", port=8000, password="icecold")
icecast_mp3(full, mount="pap-ls2.mp3", host="deathstar.puscii.nl", port=8000, password="icecold")
icecast_opus(full,mount="pap-ls2.opus", host="deathstar.puscii.nl", port=8000, password="icecold")

hark's avatar
hark committed
93 94 95
#icecast_ogg(full, mount="pap-ls2.ogg", host="localhost", port=8000,  password="WXyo3SmT")
#icecast_mp3(full, mount="pap-ls2.mp3", host="localhost", port=8000,  password="WXyo3SmT")
#icecast_opus(full,mount="pap-ls2.opus", host="localhost", port=8000,  password="WXyo3SmT")
hark's avatar
relay  
hark committed
96 97


hark's avatar
hark committed
98 99 100
#icecast_ogg(full, mount="pap-ls2.ogg", host="10.205.25.98", port=8000, password="WXyo3SmT")
#icecast_mp3(full, mount="pap-ls2.mp3", host="10.205.25.98", port=8000, password="WXyo3SmT")
#icecast_opus(full,mount="pap-ls2.opus", host="10.205.25.98", port=8000, password="WXyo3SmT")
hark's avatar
pass  
hark committed
101 102