Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/liquidsoap
- # Log dir
- set("log.file.path","/tmp/basic-radio.log")
- # Server settings
- set("harbor.bind_addr","0.0.0.0")
- # An emergency file
- emergency = single("/home/radio/security/file.mp3")
- # A playlist
- playlist = playlist(mode="random",reload=60,"/home/radio/music")
- # Function to recode metadata
- def recode_meta(m) =
- def f(tv) =
- t = fst(tv)
- v = snd(tv)
- t = string.recode(t)
- v = string.recode(v)
- (t,v)
- end
- list.map(f,m)
- end
- # Recode metadata
- playlist = map_metadata(recode_meta,playlist)
- # A live source
- live = input.harbor("air",port=8088,password="Radio2025")
- #fallback
- radio = fallback(track_sensitive=false,[live,playlist,emergency])
- # Stream it out
- output.icecast(%mp3(bitrate=128),host="localhost",port=8000,
- password="test",mount="radio",description="test",
- genre="test",url="http://test.com",encoding="UTF-8",radio)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement