2

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?

1
  • It may be related to the this question. Check the answer. Make sure the clips properties match. You may also try using inpoint and outpoint as described here. Try using it instead of using -ss {starttime} and -t {ets}
    – Rotem
    Commented Sep 2, 2022 at 10:51

0

You must log in to answer this question.

Browse other questions tagged .