我正在使用液体肥皂测试网络广播.js。到目前为止,我已经将网络广播器演示连接到使用以下命令运行的 liquidsoap 服务器liquidsoap "output.ao(fallible=true,audio_to_stereo(input.harbor('mount',port=8080)))"
现在我想将liquidsoap连接到Icecast服务器并获取一个URL以收听流媒体。
我已经阅读了液体肥皂的文档,它显示了以下示例:
liquidsoap
'output.icecast(%vorbis,
host = "localhost", port = 8000,
password = "hackme", mount = "liq.ogg",
mksafe(playlist("playlist.m3u")))'
我只能使用input.harbor
的液体肥皂获得流媒体。如何更改它以发送到冰投?我需要创建配置文件吗?
在液体肥皂的示例中,它引用了一个播放列表.m3u我想要直播。
将以下内容另存为 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
)