Convert HTML5 audio using NodeJS on Heroku

I have an HTML5 application that allows users to download and play audio files. Node Server runs on Heroku.

In order to allow playback in a cross browser, I understand that I need to at least support two formats for each audio file, say .mp3 and .ogg. Therefore, I need to transcode the files automatically on the server side.

The problem is that Heroku does not start ffmpeg. I found this project that creates a custom buildpack for heroku that supports ffmpeg but seems to be for Rails applications: https://github.com/dzello/ffmpeg-heroku .

I was thinking of starting an external server for transcoding, to which the nodejs application sends the file, transcodes and reloads the new file on my nodejs server. But I don’t know how to configure such a server, and is there a ready-made solution that does this work?

So here are my questions:

1- Is there a solution to run ffmpeg on heroku+nodejs? 2- How can I set up a transcoding server that communicates with my nodejs+heroku server? 

Thanks!

+6
source share
1 answer

Why do you need to run it on a hero? Just set up some kind of virtual server, for example, on Digital Ocean

And use linux server to configure node. It is quite easy and will run every package. It already has a bit of pre-configured node.js + mongodb stack

0
source

Source: https://habr.com/ru/post/950558/


All Articles