An easy way to have a 24/7 audio stream of music.
1#!/usr/bin/liquidsoap 2# Allow root 3settings.init.allow_root.set(true) 4 5# Playlist 6i_playlist = crossfade( 7 duration=3.0, 8 smart=true, 9 blank.eat( 10 start_blank=true, 11 max_blank=1.0, 12 threshold=-45.0, 13 playlist( 14 mode="randomize", 15 reload=1, 16 reload_mode="rounds", 17 "/music" 18 ) 19 ) 20) 21 22# Make it safe 23radio = mksafe(i_playlist) 24 25# Output 26output.icecast( 27 %mp3( 28 bitrate=128, 29 id3v2=true 30 ), 31 name=environment.get("STREAM_NAME", default="Radio"), 32 description=environment.get("STREAM_DESC", default="Our selection of music"), 33 url=environment.get("STREAM_URL"), 34 mount=environment.get("STREAM_MOUNTPOINT", default="live"), 35 password=environment.get("ICECAST_SOURCE_PASSWORD", default="hackme"), 36 host="icecast", 37 port=8000, 38 encoding="UTF-8", 39 radio 40)