1

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.

1

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.

19
  • Wow, reported 11 months ago already and it's still there.. Re-encoding is not an option for me unfortunately, clients have pre-made loops. – Mike Versteeg Jun 23 '17 at 8:15
  • Do you intend to 'live-stream' the looped output? – Gyan Jun 23 '17 at 8:30
  • It is processed live, so I guess that is a 'yes'. So it's not possible to cut out pauses, if that's where you're heading.. – Mike Versteeg Jun 23 '17 at 8:59
  • BTW: wrapping in ts (no difference) or mkv (shorter pause) is no fix either. Neither is re-encoding to intraframe. The very visible pause remains present. – Mike Versteeg Jun 23 '17 at 9:09
  • Strange. Can you upload your sample? – Gyan Jun 23 '17 at 9:13
0

I am streaming a looping video and was struggling with pauses in-between loops too. What I discovered was that I was streaming at 24 FPS, but my input video was 23.97. Re-encoding the video at 24 FPS with the FPS filter fps=fps=24 resolved the issue.

See https://trac.ffmpeg.org/wiki/ChangingFrameRate for more information on changing the frame rate with FFmpeg.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.