Search code examples
herokuffmpegdiscord

How do I install FFMPEG inside Heroku?


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?


Solution

  • Self answering as I had this problem and wish to share what I found:

    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.

    Alternatively you can also run the CLI command:

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

    Source:

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