1

I used ffmpeg to split AVI movies like

ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:22:33 -to 1:2:3 out.avi

But the output file out.avi is sometimes weird when played (in MPlayerX, for example) -- it will stop at the first frame, freezing like a picture, but if I drag the process bar forward, then continue playing at a different place, everything would be fine and the video just goes on smoothly.

I have limited knowledge on AVI format and ffmpeg, can you guys point out what's the problem here? If it's a matter of kerFrame or what?

rojomoke
  • 3,765
  • 2
  • 21
  • 30
qweruiop
  • 3,156
  • 6
  • 31
  • 55

1 Answers1

4

This happens because with -ss after the -i you might be seeking to a non-key frame. You need -copyinkf, which the manual describes as:

When doing stream copy, copy also non-key frames found at the beginning.

ffmpeg -i input.avi -c copy -copyinkf -ss 00:22:33 -to 1:2:3 out.avi
Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
relaxed
  • 41
  • 2