user19257: I have tested several files with the added option
-fflags +genpts -stream_loop -1

to make them loop, but all have a slight pause just before they loop (250 ms or so). The loop filter does not have this issue, but it has other issues.

user1871: This is a known bug with stream_loop. See https://trac.ffmpeg.org/ticket/5719
Wrapping to MKV or TS and then looping may work. Re-encoding your video as intraframe is the safest option.

19257: <p>I have tested several files with the added option</p>

<pre><code>-fflags +genpts -stream_loop -1
</code></pre>

<p>to make them loop, but all have a slight pause just before they loop (250 ms or so). The loop filter does not have this issue, but it has other issues.</p>
 1871: <p>This is a known bug with stream_loop. See <a href="https://trac.ffmpeg.org/ticket/5719" rel="nofollow noreferrer">https://trac.ffmpeg.org/ticket/5719</a></p>

<p>Wrapping to MKV or TS and then looping <em>may</em> work. Re-encoding your video as intraframe is the safest option.</p>
