I'm starting up a Debian web server which will host a website where users can upload video files and play them.
Hence, the video files need to be converted into the proper format (mp4, ogg, webm) for compatibility with the different browsers out there.
So far, I've written a bash script which does the trick using FFmpeg. The problem is, when a lot of users upload a video at the same time, my web server will get very slow.
I'm looking for a short and easy solution which queues different calls to the conversion script, so only one instance can run at the same time. I've tried using the batch command, but I can't find very much information on how to use it. I've also considered creating a named pipe, also without success.
Any help much appreciated