How to restrict ffmpeg to use only 50% of the CPU

ffmpeg

i m using ffmpeg for streaming my desktop over UDP but my problem is ffmpeg's process always takes 100% cpu for the entire time it is running leaving no room other application , my question is how can i restrict ffmpeg's process to take up only 50-60% of cpu ?

My cpu has single core
2 gb ram

Best Answer

FFMpeg has an option -threads. You can define there, if it's going to be auto (default) or you can limit the number of used threads (CPU cores). Recommended that you set your number based on the amount of available threads minus 1, or 2. So if you have 8 threads, setting to -threads 6 would be great. But if you have only one core and 2 gb of RAM, I'm not sure if this is the case! FFMpeg requires a lot of resources.

Related Topic