Thanh Dao
Thanh Dao

Reputation: 1260

ffmpeg - How to increase performance?

I'm trying to speed up and add background to mp4 videos. 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. The size of input file about 30-40MB, is not too large.
And next, I run below command to add background to video, take about 30 mins (Background's resolution is 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?

Upvotes: 4

Views: 7892

Answers (1)

dastan
dastan

Reputation: 930

You can use -preset veryfast/superfast/ultrafast as @Mulvya suggested or check this link for reference

Upvotes: 6

Related Questions