如何限制ffmpeg只使用我的CPU的50%? [英] How to restrict ffmpeg to use only 50% of my CPU?

查看:1862
本文介绍了如何限制ffmpeg只使用我的CPU的50%?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ffmpeg通过UDP流式传输我的桌面,但是我的问题是ffmpeg的进程总是花费100%的CPU在运行的时候没有别的其他应用程序,我的问题是我如何限制ffmpeg的进程只占用50 -60%的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆