0

When encoding a stream using -filter_complex loop=2:50:0 I expect a video containing the first 50 frames twice. However I end up with a video stream containing 2 loops, followed by the rest of the video. Why isn't the stream terminating once the loop is complete? Full command used for reference.

ffmpeg.exe -i input.mkv -c:v libx264 -preset veryfast -tune zerolatency -b:v 20M -x264-params keyint=1 -an -f mpegts -filter_complex "loop=2:50:0" -y test.mp4

Stax Zeta
  • 11
  • 1
  • 2
    Just because you tell ffmpeg to use filters on a specific part of the video, doesn't mean that it will simply discard the rest. [You also need to tell it to cut the video](https://superuser.com/questions/459313/how-to-cut-at-exact-frames-using-ffmpeg) – mashuptwice Dec 05 '22 at 21:38
  • I was under the impression that options like `shortest` would work (although I'm not sure on the syntax) but I suppose I can still use the `trim` filter beforehand. – Stax Zeta Dec 05 '22 at 21:55

0 Answers0