我在 Heroku 上托管了一个 Discord 音乐机器人,它似乎不会播放音乐,因为找不到 FFMPEG。这是可以理解的,因为 FFMPEG 仅在我的 PC 中可用,而在外部云中不可用。如何在 Heroku 上安装 FFMPEG?
最佳答案
我遇到了这个问题并希望分享我的发现:
Heroku 支持 ffmpeg 作为应用程序的构建包。只需在 https://dashboard.heroku.com/apps/[app-name]/settings
上打开您的应用设置并向下滚动到 Buildpacks,您应该在其中添加 https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git给它。
或者,您也可以运行 CLI 命令:
$ heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
资源:https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest
关于heroku - 如何在 Heroku 中安装 FFMPEG?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52142083/