<p>Assume there are three pauses of 3 seconds each at 5s, 12s and 20s of the original video. Here's the basic form of the command,</p>

<p><code>ffmpeg -i in -vf "setpts='PTS-STARTPTS + gte(T,5)*(3/TB) + gte(T,12)*(3/TB) + gte(T,20)*(3/TB)'" -af "asetpts='PTS-STARTPTS + gte(T,5)*(3/TB) + gte(T,12)*(3/TB) + gte(T,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync cfr out</code></p>

CC BY-SA 4.0
2019-05-23T05:21:53.523Z
I get the following error while running the command:

ffmpeg -i abc.avi -vf "setpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)'" -af "asetpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync crf out.avi


**error**: Expected number for vsync but found: crf
if I add -vsync 0, then
**error**: Unable to find a suitable output format for 'crf'
mumtaz
CC BY-SA 4.0
2019-05-23T05:35:00.220Z
It's not `crf`, See answer.
Gyan
CC BY-SA 4.0
2019-05-24T09:16:58.940Z
thanks.. but there is still some error. I have posted it in the answer below.
mumtaz
CC BY-SA 4.0
2019-05-24T09:28:25.970Z
Your command is missing the * in `gte(t,5)*(3/TB)` and in other expressions.
Gyan
CC BY-SA 4.0
2019-05-22T04:55:14.893Z
2019-05-26T11:21:50.507Z
2019-05-26T11:21:50.507Z
Gyan
<p>The code by @gyan didn't work out for me, I found another (longer) way to do it:</p>

<p>I extracted the audio file from the video first using:</p>

<pre><code>ffmpeg -i input.mp4 -vn -ab 128 audio.mp3
</code></pre>

<p>then combined them together with an offset:</p>

<pre><code>ffmpeg.exe -i "input.mp4" -itsoffset 3 -i "input_audio.wav" -map 0:v -map 1:a -c copy "output.mp4"
</code></pre>

CC BY-SA 4.0
2019-05-24T10:54:52.953Z
Did you add the `*`?
Gyan
CC BY-SA 4.0
2019-05-26T06:11:55.480Z
**yes I did try your code, but it shows error **:       ffmpeg -i sb.mp4 -vf "setpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)'" -af " asetpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync cfr  outsb.mp4
mumtaz
CC BY-SA 4.0
2019-05-24T10:15:22.200Z
2019-06-12T15:07:41.653Z
2019-06-12T15:07:41.653Z
mumtaz
<p>I want to freeze some frames in a video so that it gives a buffering video type look. Also the audio should freeze with the video.</p>

<ffmpeg>
How to add freeze frame to a video using ffmpeg
mumtaz
# How to add freeze frame to a video using ffmpeg

(Asked by: username_0 on 2019-05-21)

I want to freeze some frames in a video so that it gives a buffering video type look. Also the audio should freeze with the video.

**Tags:** ffmpeg


---

## 2 answers

### Answer by username_1 on 2019-05-22. Score: 2

Assume there are three pauses of 3 seconds each at 5s, 12s and 20s of the original video. Here's the basic form of the command,

`ffmpeg -i in -vf "setpts='PTS-STARTPTS + gte(T,5)*(3/TB) + gte(T,12)*(3/TB) + gte(T,20)*(3/TB)'" -af "asetpts='PTS-STARTPTS + gte(T,5)*(3/TB) + gte(T,12)*(3/TB) + gte(T,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync cfr out`

> **Comments:**
> **username_0**: I get the following error while running the command:  ffmpeg -i abc.avi -vf "setpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)'" -af "asetpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync crf out.avi   **error**: Expected number for vsync but found: crf if I add -vsync 0, then **error**: Unable to find a suitable output format for 'crf'  
> **username_1**: It's not `crf`, See answer.  
> **username_0**: thanks.. but there is still some error. I have posted it in the answer below.  
> **username_1**: Your command is missing the * in `gte(t,5)*(3/TB)` and in other expressions.  

---

### Answer by username_0 on 2019-05-24. Score: 0

The code by @gyan didn't work out for me, I found another (longer) way to do it:
I extracted the audio file from the video first using:
ffmpeg -i input.mp4 -vn -ab 128 audio.mp3

then combined them together with an offset:
ffmpeg.exe -i "input.mp4" -itsoffset 3 -i "input_audio.wav" -map 0:v -map 1:a -c copy "output.mp4"

> **Comments:**
> **username_1**: Did you add the `*`?  
> **username_0**: **yes I did try your code, but it shows error **:       ffmpeg -i sb.mp4 -vf "setpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)'" -af " asetpts='PTS-STARTPTS + gte(t,5)*(3/TB) + gte(t,12)*(3/TB) + gte(t,20)*(3/TB)',aresample=async=1:first_pts=0" -vsync cfr  outsb.mp4  

---

