If your encoder, web service, and media service are all on one server, it is vital that you don’t let one service overrun your maximum CPU for the entire server. Case in point, FFMPEG.
While this is more evident on VPS servers with much fewer processors than dedicated servers, it can still effect entry to mid level dedicated servers.
Review KVS php script that controls your FFMPEG encoding rate.
Below we have step by step instructions on how to set this.
Need to know: How many cores does your server have? $39/month plan starts with four vCores.
1) Login to KVS website admin
2) Click Settings
3) Under Formats category Click Video Formats.
4) FFmpeg options (*): Find the variable listed below and change the number to half of your server vCores.
-threads 2
Extra Note: This is what sets the maximum amount of processors that FFMPEG can use for encoding videos. The value 0 (zero) indicates unlimited. While new sites that aren’t under any traffic loads can use more threads for FFMEPG, we recommend setting this value at 1/2 your total number of processors. This ensures your web and media service has plenty of CPU to perform vital functions of your site.
5) Click Save