如何在 Heroku 中安装 FFMPEG? [英] How do I install FFMPEG inside Heroku?

查看:38
本文介绍了如何在 Heroku 中安装 FFMPEG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Heroku 上托管了一个 Discord 音乐机器人,但由于未找到 FFMPEG,它似乎无法播放音乐.这是可以理解的,因为 FFMPEG 仅在我的 PC 中可用,而不能在外部云上使用.如何在 Heroku 上安装 FFMPEG?

I am hosting a Discord music bot on Heroku and it seems it won't play music as the FFMPEG is not found. This is understandable as the FFMPEG is only available within my PC and not on the external cloud. What can I do to install FFMPEG on Heroku?

推荐答案

自我回答,因为我遇到了这个问题并希望分享我的发现:

Heroku 支持 ffmpeg 作为您应用程序的构建包.只需在 https://dashboard.heroku.com/apps/[app-name]/settings 打开您的应用设置,然后向下滚动到 Buildpacks,您应该在其中添加 https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git 到它.

Heroku supports ffmpeg as a buildpack to your app. Simply open you app settings at https://dashboard.heroku.com/apps/[app-name]/settings and scroll down to Buildpacks, where you should add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git to it.

或者,您也可以运行 CLI 命令:

Alternatively you can also run the CLI command:

$ heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

来源:

https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest

这篇关于如何在 Heroku 中安装 FFMPEG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆