-1

I am currently developing a streaming music application, using Angular and hosting it on Firebase Hosting. The application's functionality involves placing MP3 files in Firebase Storage. Following that, there is a function code (in Angular) to convert from MP3 to M3U8 format. The resulting M3U8 output will be shared through an API.

Based on what I've seen on the internet, many tutorials use FFmpeg, but they seem to apply only when using a self-hosted server (often executed through the console, CMIIW). This approach may not be directly applicable to Firebase Hosting. Can Firebase Hosting run Ffmpeg or do you have any other suggestions? I would appreciate your guidance.

ltvie
  • 931
  • 4
  • 19
  • 48

1 Answers1

1

Can Firebase Hosting run Ffmpeg?

No, it can't run any code. It just serves static content, exactly what you deployed to it.

If you want to keep using Firebase Hosting for static content, and also run some backend code along with that, you should look in integrating Cloud Functions or Cloud Run. The complexity of your deployment will go way up, but it's the only way to run arbitrary code.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • Is there a specific link that discusses converting MP3 to M3U8 in cloud functions? – ltvie Aug 13 '23 at 14:15
  • Do a web search for that. If you can't find one, then it probably doesn't exist and you'll have to be creative. I suspect it's highly unlikely that you'll just be able to copy someone else's solution entirely – Doug Stevenson Aug 13 '23 at 14:48