0

I'm writing an API that encode a video using ffmpeg.exe uploaded from users. To do this I just put the FFmpeg into a folder on my server:

C:\home\site\wwwroot\ffmpeg

This works fine with a single user. But if I try to upload and encode two or more video at the same time, something goes wrong and the backend crash. Probably because two or more processes are trying to use ffmpeg.exe at same time.

My question is: Is this an wrong approach? I'm using Azure as platform, I need to encode videos using ffmpeg. So what's the best practice?

Thanks!

Gaetano Lenoci
  • 179
  • 1
  • 10

1 Answers1

0

Run an .exe with asp.net core and Azure

  • In WebRole and WorkerRole, Windows Azure allows you to run EXEs.
  • On Azure, you could run an .exe in a web role

As per the document - Run background tasks with WebJobs in Azure App Service

Deploy WebJobs by using the Azure portal to upload an executable or script. You can run background tasks in the Azure App Service.

Please refer Azure WebJobs SDK for event-driven background processing and this for more information

Harshitha Veeramalla
  • 1,515
  • 2
  • 10
  • 11