[英]CPU usage overload with Ffmpeg in Video Upload Converter site
i am working on a video converter site in which you can upload a video an then convert it to the format you want. 我正在视频转换器网站上工作,您可以在其中上传视频,然后将其转换为所需的格式。
Everything works great only problem is CPU usage overload of ffmpeg, when I upload 4 instance 4 HD videos CPU usage gets to 70-80% 一切正常,唯一的问题是ffmpeg的CPU使用率过载,当我上传4个实例4个高清视频时,CPU使用率达到70-80%
To control this I would like to find a way to low cpu usage or priorizy it, I tried several tutorials like: http://www.nixtutor.com/linux/changing-priority-on-linux-processes/ 为了控制这一点,我想找到一种降低CPU使用率或对其进行优先处理的方法,我尝试了一些教程,例如: http ://www.nixtutor.com/linux/changing-priority-on-linux-processes/
but don't seem to control that, I tried this and then ffmpeg didn't work had to update it. 但似乎无法控制它,我尝试了一下,然后ffmpeg无法工作,必须对其进行更新。
So once i control CPU usage I would also like to use a php queue system to control video conversion. 因此,一旦我控制了CPU使用率,我还想使用php队列系统来控制视频转换。
Could anyone give me any tips, orientation on how to get this working? 谁能给我有关如何使它工作的任何提示和方向?
Thank you in advance 先感谢您
BTW My server is Centos Linux 6 顺便说一句,我的服务器是Centos Linux 6
您可以减少FFmpeg 的线程数
ffmpeg in.mp4 -threads 1 out.mp4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.