6

I use ffmpeg to cut a video into clips. By this command:

ffmpeg -ss 00:00:00 -i video.mp4 -to 00:01:00 -c copy cut.mp4

Ffmpeg has to cut at key frames, thus when I concatenate each clip back to the entire video, there are some repeated frames at the beginning of each clip. Then I found this command:

ffmpeg -i video.mp4 -ss 00:00:00 -to 00:01:00 -c copy cut.mp4

By putting -i first solves the above problem, but it introduces some frozen frames when I concatenate my video clips back into the whole video. In fact, I saw it introduces some black frames at the beginning of each clip, so when I concatenate these clips back, there are frozen frames.

So is there any way that I can cut my video into clips accurately without introducing black frames or frozen frames in ffmpeg?

Demonedge
  • 1,363
  • 4
  • 18
  • 33
  • 4
    Since you are stream-copying you can't avoid this. If you can re-encode, you can use either of your shown commands with accuracy, but the first will be faster. – Gyan Apr 26 '16 at 06:33
  • 1
    Yes, you are right! As soon as I got rid of '-c copy', it works fine now, with lower time efficiency, of course. Thanks! – Demonedge Apr 26 '16 at 06:45
  • 1
    Is this what you're looking for? http://stackoverflow.com/questions/14005110/how-to-split-a-video-using-ffmpeg-so-that-each-chunk-starts-with-a-key-frame – martin Apr 26 '16 at 09:32

0 Answers0