我正在尝试使用 Liquidsoap 检测 Icecast MP3 流的 BPM,但我无法让它工作。
我的 Dockerfile:
FROM savonet/liquidsoap:8101608
# Copy the script into the image
COPY script.liq /usr/src/app/script.liq
# Set the command to run the script
CMD ["liquidsoap", "/usr/src/app/script.liq"]
我想使用这里提到的功能:https://www.liquidsoap.info/doc-dev/reference#bpm。如果那不可能,我可以向 dockerfile 添加额外的依赖项。
如果每10秒将bpm保存到本地文件就好了。我认为它只是几行代码,但我对 liquidsoap 是全新的,而且文档对初学者来说并不是很友好。
感谢您的帮助!
我随便问了他们,得到了答案:)
就这么简单:
s = input.http("https://icecast...")
s = bpm(s)
thread.run(every=5., fun () -> print("bpm: #{s.bpm()}"))
output.dummy(fallible=true, s)
(我现在只需要将输出通过管道传输到文件中)