Request: We’re using moviepy library (which uses ffmpeg under the hood) to generate video thumbnail/preview image during upload. Heroku does not have ffmpeg available natively. What’s the ideal solution? I can think of:
a) Adding a buildpack. This one seems promising: https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest
b) Adding ffmpeg installation command in Dockerfile. I can use some help with this!
c) Use some third-party service - seems like an overkill to me.
Project ID: 15115
Project Link: https://app.crowdbotics.com/dashboard/app/15115
The buildpack is a great solution, as long as the app is going to run on Heroku for the future.
Thanks @anand. How do I add the buildpack without breaking CB dash deployment process? - or someone with access to Heroku needs to add it directly?
@kalpit, thanks for writing in!
Our apps are set up to run on a container runtime at Heroku. The buildpacks are only available for their proprietary runtimes. This allows better portability.
Your second option (adding ffmpeg to your Dockerfile) is therefore preferred. Just add it to the list of other packages installed with
apt (you’d need to use an unofficial source), or compile it as part of building the image.
If your project is using the old alpine image as a base, feel free to switch to the newer ubuntu-based Dockerfile, which is easier to expand - Crowdbotics Django Scaffold - Dockerfile
There’s plenty of documentation online, here are some links:
Thanks @dmitrii.k. The docker solution worked like a charm!
I’m glad it did, @kalpit!