Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding FFMPEG to Bluemix Node.JS buildpack

It appears that Bluemix does not include FFMPEG as part of the standard runtime. However, we'd like to use FFMPEG in our application.

It seems the "correct" way to do this is to use a custom buildpack.

Consequently, a few questions:

  1. Should we be forking a Bluemix buildpack for this, or is it recommended practice to fork a CloudFoundry buildpack?
  2. Are there Bluemix customisations we'd lose if we forked a CloudFoundry buildpack?
  3. Is there a publicly accessible repository where the Bluemix buildpacks can be forked from?
like image 749
Nick Maynard Avatar asked May 17 '15 21:05

Nick Maynard


2 Answers

I've recently integrated a third-party C library into the standard NodeJS buildpack. You can find details here to help you build your own: http://jamesthom.as/blog/2015/03/04/cloud-foundry-custom-buildpacks/

I forked the standard NodeJS buildpack from the external repo.

like image 144
James Thomas Avatar answered Nov 14 '22 16:11

James Thomas


There is a Heroku buildpack for FFMPEG here which should work on Bluemix. As noted in the description of the buildpack you will need to combine this with another buildpack in order to get the runtime. The other option is to add what is done in this buildpack to your forked buildpack (all buildpacks have the same bin/detect, bin/compile, bin/release scripts).

Another option (which I prefer) is to not fork a buildpack but to add ffmpeg as a dependency (as that is what it is). There is a npm package called easy-ffmpeg that includes the binaries for ffmpeg on Windows, Mac and Linux (you would use the Linux binaries for Bluemix). So all you need to do is add it as a dependency in your package.json for your node.js app.

like image 3
whitfiea Avatar answered Nov 14 '22 16:11

whitfiea