0

我正在使用液体肥皂测试Webcast.js 。到目前为止,我已经将Webcaster演示连接到使用以下命令运行的 liquidsoap 服务器liquidsoap "output.ao(fallible=true,audio_to_stereo(input.harbor('mount',port=8080)))"

现在我想将liquidsoap 连接到Icecast 服务器并获取一个URL 以便收听流媒体。

我已经阅读了liquidsoap 的文档,它显示了以下示例:

liquidsoap 
  'output.icecast(%vorbis,
     host = "localhost", port = 8000, \
     password = "hackme", mount = "liq.ogg", \
     mksafe(playlist("playlist.m3u")))'

我只能使用 Liquidsoap 获得流式传输input.harbor。如何更改它以发送到 Icecast?我需要创建配置文件吗?

在liquidsoap 的示例中,它引用了一个playlist.m3u,我想要直播。

4

1 回答 1

1

将以下内容另存为 script.liq 并运行liquidsoap script.liq

#!/usr/bin/liquidsoap

# Log dir
set("log.file.path","/tmp/some-radio.log")

# Live DJ stuff
set("harbor.bind_addr","0.0.0.0")
set("harbor.verbose",true)
livedj = input.harbor(
       "mount",
       port=8080,
       password="hackme"
)

# If something goes wrong, we'll play this
#security = single("/home/osboxes/Documents/liquidsoap/error.mp3")

# Set Radio
radio = fallback(track_sensitive = false, [livedj])


# Stream it out
output.icecast(
        %mp3(bitrate=128),
        fallible=true,
        host = "localhost",
        port = 8000,
        password = "hackme",
        mount = "master",
        radio
)
于 2017-10-14T00:26:29.593 回答