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