我正在编写一个使用 对视频进行编码的 API ffmpeg.exe 从用户上传。为此,我只需将 FFmpeg 放入服务器上的文件夹中:
C:\home\site\wwwroot\ffmpeg
这适用于单个用户。但是,如果我尝试同时上传和编码两个或更多视频,就会出现问题并且后端崩溃。可能是因为两个或多个进程试图同时使用 ffmpeg.exe。我的问题是:这是一种错误的方法吗?我使用 Azure 作为平台,我需要使用 ffmpeg 对视频进行编码。那么最佳实践是什么?
谢谢!
最佳答案
Run an .exe with asp.net core and Azure
WebRole
和 WorkerRole
, Windows Azure 允许您运行 EXE。 根据文件 - 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.
请引用 Azure WebJobs SDK for event-driven background processing和 this了解更多信息
关于azure - 使用 asp.net 核心和 Azure 运行 .exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72605439/