CPU overloaded from multiple uploads! How to limit encoding to 1 video at a time?

There are 9 videos encoding at the same time. My server's load is at over 50 and it's been over an hour, none of the 9 videos finished encoding yet.

There needs to be a way to limit encoding to 1 video at a time with a queue or something similar so that a server won't halt due to CPU overload. My site takes over 5 minutes to load due to the CPU problem. Is there a setting in the script that can limit the parallel encoding?


  • I don't believe there is such a setting; definitely would be a great enhancement.

    What you can try though is prefixing your ffmpeg command with "nice". So if your ffmpeg command is currently set to:

    /usr/local/bin/ffmpeg -xx -xx -xx -xx


    /usr/bin/nice -n 10 /usr/local/bin/ffmpeg -xx -xx -xx -xx

    nice is a utility that runs a command with modified priority settings with -20 being the highest priority and 20 the lowest priority. You may still see it take up a lot of CPU but the idea is that if an other process needs CPU cycles (like your webserver), it will get first dips.
This discussion has been closed.