I want to loop an audio file infinitely. The -stream_loop -1
option adds a small pause / jerk between the loops, as also mentioned in this question with no solution.
The same question mentions that filter loop works fine without delay. But I am unable to get the filter loop to work. The below code along with rest of the command:
-filter_complex "[1:a]aloop=loop=-1"
gives a warning:
[Parsed_aloop_0 @ 0x55d83e516b80] Number of samples to loop is not set!
What is the correct way to loop an audio endlessly using filter loop? I am trying to merge a video and audio, having them both independently loop infinitely. I have got that part to work using -stream_loop -1
but it has a minor delay between loops as I mentioned. I am looking for a solution using either filter_complex
or any other way if possible. Thanks!
Note, I have also noticed that ffplay -loop 0
plays the loop smoothly without adding this pause.