Body: <p>I have a folder named <code>frames</code> with images, named <code>frame0001.png</code>, <code>frame0002.png</code>, <code>frame0003.png</code>, etc, all the way to <code>frame0061.png</code> (or <code>frames/frame%04d.png</code> using FFmpeg).</p>
  <p>I have an input video file simply named <code>video.mp4</code>.</p>
  <p>Starting at <code>00:00:03</code> (3rd second), I want next frames to be <strong>replaced</strong> with all frames from under <code>frames</code> folder, and then save the output video as <code>output.mp4</code> using ffmpeg.exe.</p>
  <p>For example, starting at 3 seconds, next 61 frames (because there are 61 frame files under the <code>frames</code> folder) in <code>video.mp4</code> will be overwritten with the frames under <code>frames</code> folder.</p>
  <p>Which command-line options should I pass to FFmpeg to apply this task?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-20T02:55:57.913Z
Comments.Text: `ffmpeg -i input.mp4 -itsoffset 3 -i frame%04d.png -lavfi "overlay=eof_action=pass" out.mp4`
Comments.UserDisplayName: Баяр Гончикжапов
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-20T09:12:12.313Z
Comments.Text: @БаярГончикжапов Thank you, the command you provided works. Can you post an answer instead of a comment so I mark it as accepted?
Comments.UserDisplayName: winscripter
Tags: <ffmpeg>
Title: How can I replace next frames using FFmpeg?
UserDisplayName: winscripter
ThreadText: # How can I replace next frames using FFmpeg?
  
  (Asked by: username_0 on 2024-03-19)
  
  I have a folder named `frames` with images, named `frame0001.png`, `frame0002.png`, `frame0003.png`, etc, all the way to `frame0061.png` (or `frames/frame%04d.png` using FFmpeg).
  
  I have an input video file simply named `video.mp4`.
  
  Starting at `00:00:03` (3rd second), I want next frames to be **replaced** with all frames from under `frames` folder, and then save the output video as `output.mp4` using ffmpeg.exe.
  
  For example, starting at 3 seconds, next 61 frames (because there are 61 frame files under the `frames` folder) in `video.mp4` will be overwritten with the frames under `frames` folder.
  
  Which command-line options should I pass to FFmpeg to apply this task?
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: `ffmpeg -i input.mp4 -itsoffset 3 -i frame%04d.png -lavfi "overlay=eof_action=pass" out.mp4`  
  > **username_0**: @username_1 Thank you, the command you provided works. Can you post an answer instead of a comment so I mark it as accepted?  
  
  ---
  
  ## 0 answers
  
  