2

I've been trying to make a server that can visualize music (This is what I have so far). That's been successful but I want to try and make it work with youtube videos, and I've found a lot of repositories on github for youtube video to audio conversion that make this reasonably doable, but in order to deploy a server on heroku that can host temporary audio files of youtube videos in the format that I want, I'd need to include ffmpeg in a buildpack and I'm not sure how to go about doing that. This is the heroku buildpack for node.js but I don't really understand how it works.

TL;DR: What steps would I need to follow after forking the heroku-buildpack-nodejs repository on github in order to successfully deploy a node.js server to heroku and run this code?

var conversionProcess = child_process.spawn(
  'ffmpeg',
  ['-i', 'some_youtube_audio.mp3', 'some_youtube_audio.webm'],
  {
    cwd: __dirname + '/tmp'
  }
);

The documentation for this function is on the node.js API, by the way.

4

1 回答 1

3

你应该使用合装包https://github.com/ddollar/heroku-buildpack-multi

然后使用节点 buildpack 以及 ffmpeg buildpack https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest

于 2015-05-16T00:57:30.607 回答