关闭。这个问题是off-topic .它目前不接受答案。
想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。
10年前关闭。
Improve this question
有没有办法为 ffmpeg 设置最大 CPU 利用率,或者
(最好)以较低的优先级运行 ffmpeg 以便它仍然运行
100%,但根据需要放弃 CPU 给其他进程?
我不确定这是否可以在 ffmpeg 本身中设置,或者如果
我需要运行某种包装器命令或更改系统设置。
最佳答案
我猜你正在Linux上运行它。一个快速的谷歌给了我这个:
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.
创建具有特定优先级的新进程:
nice -n [nice-value from -20 to 19] [command]
所以,在你的情况下:
nice -n 10 ffmpeg .....
关于FFMPEG 和 CPU 利用率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7600142/