简体   繁体   English

ffmpeg-如何提高性能?

[英]ffmpeg - How to increase performance?

I'm trying to speed up and add background to mp4 videos. 我正在尝试加快速度,并将背景添加到mp4视频中。 It taken a lots of time. 花了很多时间。

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.91*PTS[i]; [0:a]atempo=1.1000[p]" -map "[i]" -map "[p]" output-1.mp4 2>&1

Above command take about 30 minutes to do. 上面的命令大约需要30分钟。 The size of input file about 30-40MB, is not too large. 输入文件的大小大约为30-40MB,不能太大。
And next, I run below command to add background to video, take about 30 mins (Background's resolution is 1280x720) 接下来,我运行以下命令将背景添加到视频中,大约需要30分钟(背景分辨率为1280x720)

ffmpeg -i output-1.mp4 -i background.png -filter_complex "overlay=0:0" output.mp4 2>&1

It make my system very slow, and performance is very bad. 它使我的系统非常慢,并且性能非常差。
What can I do to improve? 我该怎么做才能改善?

您可以按照@Mulvya的建议使用-preset veryfast/superfast/ultrafast ultrafast或检查此链接以供参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM