首页 > 其他 > 详细

FFmpeg限制CPU的使用率

时间:2015-03-25 19:08:09      阅读:433      评论:0      收藏:0      [点我收藏+]

1、–threads 2

 

使用–threads 2 可以将CPU的使用率控制在50%左右。

FFmpeg -i IN  –threads 2   OUT

 

源文链接:https://stackoverflow.com/questions/11357713/how-to-limit-ffmpeg-cpu-usage

The solution as outlined here

How can I limit FFMpeg CPU usage?

is to limit the number of threads that FFMpeg uses to less than the number of available cores on the computer.

Following up on your comment, you can supply an Argument via StartInfo

Process ffmpeg = new Process();
ffmpeg.StartInfo.UseShellExecute = false;
ffmpeg.StartInfo.FileName = "..\ffmpeg.exe";
ffmpeg.StartInfo.Arguments = "-threads 2";  // <=== Add this line
ffmpeg.StartInfo.CreateNoWindow = true;
ffmpeg.Start();

 

FFmpeg限制CPU的使用率

原文:http://www.cnblogs.com/yuanloo/p/4366194.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!