http.liq 692 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env liquidsoap
  2. # A simple script that will both record to file and expose an http server.
  3. # The http server uses (aggressive) silence detection
  4. set('log.file', false)
  5. set('log.stdout', true)
  6. audioin = in()
  7. audioin = rewrite_metadata([("artist", "Direttoforo")], audioin)
  8. audioin = server.rms(id="rms", audioin)
  9. f = output.file(
  10. id="rec",
  11. %vorbis(quality=0.2, samplerate=44100, channels=2),
  12. "rec/%Y/%m/rec-%Y-%m-%d_%H-%M-%S.ogg",
  13. audioin
  14. )
  15. http = output.harbor(
  16. id="http",
  17. mount="/stream.ogg",
  18. %vorbis(quality=0.2, samplerate=44100, channels=2),
  19. #strip_blank(id="strip", max_blank=3., min_noise=0.2, track_sensitive=false, audioin)
  20. audioin
  21. )