0
votes

I'm writing a python application which uses pydub and want to run it in the cloud, I'm using IBM's ibmcloud Cloud Foundry implementation to deploy the application.

pydub requires access to ffmpeg. The python buildpacks do not include this tool.

How can I install ffmpeg and make sure that pydub can access it from within my application?

I tried to copy ffmpeg within the app's directory, even in the app's root directory, but I get a [Errno 2] No such file or directory: 'ffprobe': 'ffprobe' meaning that pydub cannot access ffmpeg.

I tried to include an additional buildpack (https://github.com/shunjikonishi/heroku-buildpack-ffmpeg) in my manifest.yaml

Nothing worked

this is my masked manifest.yaml

applications: - services: - xxx_de disk_quota: 1024M - name: ffmpeg buildpacks: https://github.com/shunjikonishi/heroku-buildpack-ffmpeg memory: 128M - name: xvz #route: eu-gb.mybluemix.net route: mybluemix.net instances: 1 memory: 128M

Could you suggest a fix or an alternative way to do this?

Thanks!!

2

2 Answers

1
votes
  1. Download from here
  2. Set environment with cmd or terminal in linux: setx /M PATH "path\to\ffmpeg\bin;%PATH%"

Look at: here

0
votes

You can also use the apt-buildpack and install ffmpeg from a .deb file or from a repo or PPA. It will then be available on the PATH for you.

You do need to use multi-buildpacks with this approach, but that's easy enough. Just put the apt-buildpack first, then your normal buildpack second.

Hope that helps!