简体   繁体   English

Video Upload Converter站点中的Ffmpeg使CPU使用率超载

[英]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.

相关问题 FFmpeg 饱和 memory + 在 PNG 文件到 MP4 视频的基本转换过程中 CPU 使用率降至 0% - FFmpeg saturates memory + CPU usage drops to 0% during very basic conversion of PNG files to MP4 video 使用ffmpeg转换器的最佳视频格式 - Best video format using ffmpeg converter 通过降低质量来改善CPU使用率 - Improve ffmpeg CPU usage by compromising quality 商业网站的视频上传API - Video upload APIs for commercial site 如何使用Video Converter for .NET(C#)或其他FFMpeg包装器在Asp MVc中创建视频缩略图 - How can use Video Converter for .NET (C#) or other FFMpeg wrapper To create Video Thumbnail in Asp MVc 在iOS SDK中暂停视频后,为什么CPU使用率会迅速增加? - Why CPU Usage increases rapidly when video is paused in iOS SDK? 具有可嵌入上传控件的视频共享网站 - Video sharing site with embeddable upload control 创建递归ffmpeg转换器 - Creating a recursive ffmpeg converter Windows Phone 7.1视频(3GP,MP4)到音频(MP3)转换器— Windows Phone上的ffmpeg? - Windows Phone 7.1 Video (3GP,MP4) to Audio (MP3) Converter — ffmpeg on windows phone? 如何通过PHP上传视频,以及如何通过FFmpeg对其进行转码 - How to upload a video through PHP, and transcode it via FFmpeg
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM