title: How can I hold last frame of the video for several seconds with ffmpeg
body: <p>I want to hold last frame of the video for some more seconds so that I can overlay another video on it with ffmpeg. </p>
  
  <p>I have tried </p>
  
  <ul>
  <li>extracting last frame</li>
  <li>make it last some seconds </li>
  <li>and concatenating it with video.</li>
  </ul>
  
  <p>This works fine, although when I test on Android overlay video freezes and I believe the reason must be the static image because I also tried overlaying video on a static image and had the same problem.</p>
  
  <p>Now I was thinking maybe I could just hold the last frame of the video with ffmpeg?</p>
  
  <p>Here is the command</p>
  
  <pre><code>ffmpeg -i video.mp4 -loop 1 -t 10 -i image.png -i overlay.mp4 -filter_complex [0:v][1:v]concat[a];[2:v]pad=1280.0:720:(ow-iw)/2:(oh-ih)/2,setpts=PTS+7/TB[b];[a][b]blend=all_mode='addition':all_opacity=1,format=yuva422p10le -y output.mp4
  </code></pre>