如何限制ffmpeg只使用我的CPU的50%? [英] How to restrict ffmpeg to use only 50% of my CPU?
问题描述
我的cpu有单个核心
2 gb ram
FFMpeg有一个选项 -threads
。您可以定义它,如果它将是 auto
(默认),或者您可以限制已使用的线程数(CPU内核)。建议您根据可用线程的数量减去1或2设置您的号码。因此,如果您有8个线程,则设置为 -threads 6
将是非常好的。但是如果你只有一个核心和2GB的RAM,我不知道是否是这样的情况! 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
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.
这篇关于如何限制ffmpeg只使用我的CPU的50%?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!