开发者

FFMPEG and CPU utilization [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

开发者_如何学运维 Improve this question

Is there a way to either set a maximum CPU utilization for ffmpeg, or (preferably) to run ffmpeg at a lower priority so that it still runs at 100% but gives up CPU to other processes as needed?

I am not sure if this is something I could set in ffmpeg itself or if I need to run some sort of wrapper command or change a system setting.


I guess you are running this on Linux. A quick Google gave me this:
Changing Priority on Linux Processes

These guidelines are called niceness or nice value. The Linux niceness scale goes from -20 to 19. The lower the number the more priority that task gets. If the niceness value is high number like 19 the task will be set to the lowest priority and the CPU will process it whenever it gets a chance. The default nice value is zero.

Create new process with a specific priority:

nice -n [nice-value from -20 to 19] [command]

So, in your case:

nice -n 10 ffmpeg .....
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜