How to use the frame at 5s and replace all frames before it using ffmpeg? I have a video file a.flv. I want to use ffmepg to edit it. As I understand, each second of the video is a series of frames. What I want is to take the first frame of the fifth second and replace all frames before it. So the result video has exactly the same video data from the beginning to the first frame of the fifth second. Is it possible to do this using ffmpeg?
You can use a combination of the trim and tpad filters for this.
ffmpeg -i in.flv -vf &quot;trim=4,setpts=PTS-STARTPTS,tpad=start_duration=4:start_mode=clone&quot; -c:v libx264 -c:a copy out.flv