title: ffmpeg - How to increase performance?
body: <p>I'm trying to speed up and add background to mp4 videos. It taken a lots of time.</p>
  
  <pre><code>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&gt;&amp;1
  </code></pre>
  
  <p>Above command take about 30 minutes to do. The size of input file about 30-40MB, is not too large.<br>
  And next, I run below command to add background to video, take about 30 mins (Background's resolution is 1280x720)</p>
  
  <pre><code>ffmpeg -i output-1.mp4 -i background.png -filter_complex "overlay=0:0" output.mp4 2&gt;&amp;1
  </code></pre>
  
  <p>It make my system very slow, and performance is very bad. <br>
  What can I do to improve?</p>