I wrote a program that takes multiple clips from a video, then concats them into a single, shorter video, using FFMPEG. The issue that I have come across is that, in the output video, the clips freeze for 1-3 seconds before the next one comes up. I'm not well versed enough with FFMPEG to debug this, can I get some help?
Here is the initial command to download the source video (from YT):
yt-dlp -f 22 {url} -o "rawvid.%(ext)s"
Here is the command to take a clip from the source video. This runs on a loop for however many N number of clips that I want from the video. The clips are saved as .mkv files:
ffmpeg -i rawvid.mp4 -ss {starttime} -t {ets} -vcodec copy -acodec copy {pth}
Then, I made a txt file of the paths of the clips to send into the demuxer, then I run this command:
ffmpeg -f concat -safe 0 -i mergelist.txt -c copy final.mkv
The output video is completely fine, with only the freeze between clips being an issue. How do I resolve this?
inpoint
andoutpoint
as described here. Try using it instead of using-ss {starttime}
and-t {ets}