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

查看:155
本文介绍了如何在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天全站免登陆