Advertisement
Guest User

Untitled

a guest
Aug 8th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #!/usr/bin/liquidsoap
  2. # Log dir
  3. set("log.file.path","/tmp/basic-radio.log")
  4.  
  5. # Server settings
  6. set("harbor.bind_addr","0.0.0.0")
  7.  
  8. # An emergency file
  9. emergency = single("/home/radio/security/file.mp3")
  10.  
  11. # A playlist
  12. playlist = playlist(mode="random",reload=60,"/home/radio/music")
  13.  
  14. # Function to recode metadata
  15. def recode_meta(m) =
  16. def f(tv) =
  17. t = fst(tv)
  18. v = snd(tv)
  19. t = string.recode(t)
  20. v = string.recode(v)
  21. (t,v)
  22. end
  23. list.map(f,m)
  24. end
  25.  
  26. # Recode metadata
  27. playlist = map_metadata(recode_meta,playlist)
  28.  
  29. # A live source
  30. live = input.harbor("air",port=8088,password="Radio2025")
  31.  
  32. #fallback
  33. radio = fallback(track_sensitive=false,[live,playlist,emergency])
  34.  
  35. # Stream it out
  36. output.icecast(%mp3(bitrate=128),host="localhost",port=8000,
  37. password="test",mount="radio",description="test",
  38. genre="test",url="http://test.com",encoding="UTF-8",radio)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement