Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-23T05:21:53.523Z
Answers.Text: 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'
Answers.UserDisplayName: mumtaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-23T05:35:00.220Z
Answers.Text: It's not `crf`, See answer.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T09:16:58.940Z
Answers.Text: thanks.. but there is still some error. I have posted it in the answer below.
Answers.UserDisplayName: mumtaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T09:28:25.970Z
Answers.Text: Your command is missing the * in `gte(t,5)*(3/TB)` and in other expressions.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-22T04:55:14.893Z
Answers.LastActivityDate: 2019-05-26T11:21:50.507Z
Answers.LastEditDate: 2019-05-26T11:21:50.507Z
Answers.UserDisplayName: Gyan
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T10:54:52.953Z
Answers.Text: Did you add the `*`?
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-26T06:11:55.480Z
Answers.Text: **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
Answers.UserDisplayName: mumtaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T10:15:22.200Z
Answers.LastActivityDate: 2019-06-12T15:07:41.653Z
Answers.LastEditDate: 2019-06-12T15:07:41.653Z
Answers.UserDisplayName: mumtaz
Body: <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>
  
Tags: <ffmpeg>
Title: How to add freeze frame to a video using ffmpeg
UserDisplayName: mumtaz
ThreadText: # 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 @username_1 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  
  
  ---
  
  