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!