Why does FFmpeg's stream_loop option add a pause? 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.
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.