我如何限制ffmpeg内存使用 [英] How can I limit ffmpeg memory usage

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

问题描述

我使用ffmpeg在PHP中使用此命令将1080p视频转换为MP4。

I am using ffmpeg to convert a 1080p video to MP4 using this command in PHP.

$command = FFMPEG.' -i ' . $src . ' -sameq -strict -2 -vcodec libx264 -ar 22050 -y ' . $dest.'.mp4 2>&1'; 
exec($command,$output,$status);

问题是该进程使用了​​大量内存〜1600MB,这是我的服务器不允许的所以ffmpeg被终止。我可以将ffmpeg的内存限制限制在600-700MB左右吗?

The problem is that the process uses a lot of memory ~1600MB, which is not allowed by my server so ffmpeg gets terminated. Can I limit the memory usage of ffmpeg to about 600-700MB?

任何帮助都非常感谢...

Any help is greatly appreciated...

推荐答案

这不是PHP。这是关于如何限制FFMPEG内存使用。

It's not about PHP. It's about how to limit FFMPEG memory usage.

短回答否!

看这里: http://hwdmediashare.co.uk/forum/27-开发-customisation / 54700-limit-ffmpeg-memory-usage

这篇关于我如何限制ffmpeg内存使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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