当前位置: 动力学知识库 > 问答 > 编程问答 >

cloudfoundry - 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?

网友答案:

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.

网友答案:

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.

网友答案:

We were running into the same issue so we forked the standard node build pack and added the FFMPEG binaries.

You can use this as your build pack: https://github.com/BlueChasm/nodejs-buildpack-ffmpeg.git

just add the following line to your manifest.yml file:

buildpack: https://github.com/BlueChasm/nodejs-buildpack.git

Here is some more info: http://blog.bluechasm.com/post/142413412641/installing-ffmpeg-on-a-bluemix-instance-using-a

分享给朋友:
您可能感兴趣的文章:
随机阅读: