FFMPEG 和 CPU 利用率

标签 ffmpeg cpu

关闭。这个问题是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/

相关文章:

java - 为什么 java 单线程在双核 (i5) 上的上限为 25%

c++ - 用 bool 逻辑替换 IF 语句(随机条件) - 执行时间是否相同?

macos - 如何在 Macbook Pro 上启用 CPU 虚拟化支持?

java - 为什么单线程操作比无线程操作花费的时间长3倍?

ffmpeg - 如何用 ffmpeg 连接两个 .aac 文件?

读取到 iTunes 时,ffmpeg m4a/m4b/mp4 输出文件的 "Time"值不正确

python - 考虑 `var = 5` ,一旦我将另一个值重新分配给 `5` ,计算机会自动删除值 `var` 吗?

java - JAVE (Java Audio Video Encoder) 库异常仅在 Linux (CentOS 7)

windows - ffmpeg如何在http协议(protocol)的windows中流式传输视频文件

android - 用于 android 的 ffmpeg(使用教程 : "ffmpeg and Android.mk")