Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/liquidsoap -v
- # Launched 2012-01-27 00:36
- set("log.stdout",true)
- #set("log.level",4)
- #set("server.telnet.bind_addr", "")
- set("server.telnet", true)
- set("log.file", true)
- set("log.file.path","/var/log/uryjukebox.log")
- # Interlude for sound break
- interludelong = mksafe(single("/jukebox/intermission-long.mp3"))
- interludelong = crossfade(start_next=2., fade_in=1.2, fade_out=1.2, interludelong)
- techdiff = mksafe(single("/jukebox/TechnicalDifficultiesVoice.mp3"))
- techlude = add([interludelong, switch([({0s}, techdiff)])])
- # Jingles every 15min~ish
- jingles = mksafe(playlist(mode="randomize", reload=3600, "/jukebox/jingles"))
- jingles = delay(900. , jingles)
- # Playlists - Change to ratios - A=4,B=3,CDN=1 (but maybe more N as playlists are not very long)
- # A list every 10min~ish
- alist = playlist(mode="randomize", "/etc/liquidsoap/playlists/a-list.pls", mime_type="application/xspf+xml")
- alist = delay(600. , alist)
- # B list
- #blist = playlist(mode="randomize", "/etc/liquidsoap/playlists/b-list.pls", mime_type="application/xspf+xml")
- #blist = delay(600. , blist)
- # C list
- #clist = playlist(mode="randomize", "/etc/liquidsoap/playlists/c-list.pls", mime_type="application/xspf+xml")
- #clist = delay(600. , clist)
- # D list
- #dlist = playlist(mode="randomize", "/etc/liquidsoap/playlists/d-list.pls", mime_type="application/xspf+xml")
- #dlist = delay(600. , dlist)
- # Main requests queue from Web API/Interface
- requests = request.queue(id="jukebox_requests")
- # Normal playlist is the default
- default = playlist(mode="randomize", "/etc/liquidsoap/playlists/normal-list.pls", mime_type="application/xspf+xml")
- # Watershed only between 11pm and 4am
- watershed = playlist(mode="randomize", "/etc/liquidsoap/playlists/watershed.pls", mime_type="application/xspf+xml")
- watershed = switch([({23h-4h}, watershed)])
- default = random(weights=[1,3], [watershed, default])
- # Super Campus Jukebox jingles every 30min
- cjjingle = mksafe(playlist(mode="randomize", reload=3600, "/jukebox/cj-jingles"))
- cjjingle = delay(1800., cjjingle)
- # Jukebox radio
- jukebox = fallback([cjjingle, jingles, requests, alist, default])
- jukebox = fallback(track_sensitive=false, [jukebox, techlude])
- # Avoid too much blank/silence in tracks
- jukebox = skip_blank(length=3., jukebox)
- # Apply replay gain
- jukebox = amplify(1.,override="replay_gain",jukebox)
- # Add in some crossfade
- jukebox = smart_crossfade(start_next=5., fade_in=3., fade_out=3., jukebox, conservative=true)
- # Output to soundcards
- output.alsa(device="hw:0,0", jukebox, start=true)
- # Icecast outputs use a seperate clock to remove lag from the ALSA output
- clock.assign_new(id="jukebox",
- [output.icecast(
- %mp3(bitrate=192, samplerate=44100, stereo=true),
- host="icecast",
- port=7070,
- password="<omitted>",
- mount="jukebox",
- start=true,
- url="http://ury.org.uk",
- description="UK's oldest legal independant radio station",
- name="URY Jukebox",
- genre="Student Radio",
- mksafe(buffer(jukebox)))])
- # Campus Playout Stream - adds studios when needed
- studio_stream = input.harbor(
- "studio-stream-harbor",
- password="<omitted>",
- )
- campus_playout = fallback(track_sensitive=false, [studio_stream, jukebox])
- #campus_playout = smart_crossfade(fade_in=3., fade_out=3., campus_playout) ## This causes the stream to speed up. ?!?
- # icecast clock
- clock.assign_new(id="campus-playout",
- [output.icecast(
- %mp3(bitrate=192, samplerate=44100, stereo=true),
- host="icecast",
- port=7070,
- password="<omitted>",
- mount="campus-playout",
- start=true,
- url="http://ury.org.uk",
- description="The UK's oldest legal independant radio station.",
- name="URY Campus Playout",
- genre="Student Radio",
- mksafe(buffer(campus_playout)))])
- # Outside Broadcast Stream
- # To do: Change this to a harbor, requires external jukebox access
- #ob_stream = input.http("<omitted>")
- #ob = fallback(track_sensitive=false, [ strip_blank(length=30.,ob_stream), techlude])
- # icecast clock
- #clock.assign_new(id="OB_line",
- #[output.icecast(
- # %mp3(bitrate=192, samplerate=44100, stereo=true),
- # host="icecast",
- # port=7070,
- # password="<omitted>",
- # mount="OB_line",
- # start=true,
- # url="http://ury.org.uk",
- # description="((URY)) Outside Broadcast Feed - internal use only",
- # name="URY Outside Broadcast Feed",
- # genre="Student Radio",
- # mksafe(buffer(ob)))])
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement