<p>Let's call the video frame rate <code>F</code>. And the start time of the overlay <code>t</code></p>

<p>Use</p>

<pre><code>ffmpeg -i in.mp4 -i ol.png -filter_complex
         "[0]trim=0:t,loop=X*F:1:t*F,setpts=N/FRAME_RATE/TB[fol];
          [0]trim=t,setpts=N/FRAME_RATE/TB[post]
          [fol][1]overlay[pre];[pre][post]concat" out.mp4
</code></pre>

<p>The loop filter accepts frame index numbers, so you have to convert your start time and loop time to frame counts and substitute with those values.</p>

CC BY-SA 3.0
2016-11-19T03:50:53.380Z
2016-11-19T03:50:53.380Z
Gyan
<p>I'd like to overlay a png onto a video at a certain timestamp and have the video pause (loop) on that frame for X seconds with the overlay.  What would be the best method to accomplish this?</p>

<ffmpeg><timecode><photos>
pause video with overlay ffmpeg
tonyl7126
# pause video with overlay ffmpeg

(Asked by: username_0 on 2016-11-18)

I'd like to overlay a png onto a video at a certain timestamp and have the video pause (loop) on that frame for X seconds with the overlay. What would be the best method to accomplish this?

**Tags:** ffmpeg, timecode, photos


---

## 1 answers

### Answer by username_1 on 2016-11-19. Score: 2

Let's call the video frame rate F. And the start time of the overlay t
Use
ffmpeg -i in.mp4 -i ol.png -filter_complex
         "[0]trim=0:t,loop=X*F:1:t*F,setpts=N/FRAME_RATE/TB[fol];
          [0]trim=t,setpts=N/FRAME_RATE/TB[post]
          [fol][1]overlay[pre];[pre][post]concat" out.mp4

The loop filter accepts frame index numbers, so you have to convert your start time and loop time to frame counts and substitute with those values.


---

