<p>I have a video file say <code>input.mp4</code> and I would like to loop this file say 6 times
The following command does the job</p>
<pre><code>ffmpeg -stream_loop 5 -i input.mp4  -c copy out.mp4
</code></pre>
<p>However, the result is a shaky video. It plays the <code>input.mp4</code> first time without any problem and then it adds a few milliseconds before playing it the second time. And the third time and so on. The second iteration onwards, the video looks shaky and not as clear as the first time.</p>
<p>Am I using the command/option wrong ?
Any hints would be appreciated.</p>
<p>I looked at <a href="https://video.stackexchange.com/questions/21759/why-does-ffmpegs-stream-loop-option-add-a-pause">this question</a> but it did not help</p>

CC BY-SA 4.0
2022-11-08T08:06:37.343Z
Which ffmpeg version?
Gyan
CC BY-SA 4.0
2022-11-09T20:34:10.457Z
It is  version `5.1.2`
Trojosh
<ffmpeg>
ffmpeg stream_loop option produces shaky video and adds (milli) seconds to the beginning
Trojosh
# ffmpeg stream_loop option produces shaky video and adds (milli) seconds to the beginning

(Asked by: username_0 on 2022-11-07)

I have a video file say input.mp4 and I would like to loop this file say 6 times
The following command does the job
ffmpeg -stream_loop 5 -i input.mp4  -c copy out.mp4

However, the result is a shaky video. It plays the input.mp4 first time without any problem and then it adds a few milliseconds before playing it the second time. And the third time and so on. The second iteration onwards, the video looks shaky and not as clear as the first time.
Am I using the command/option wrong ?
Any hints would be appreciated.
I looked at this question but it did not help

**Tags:** ffmpeg

> **Comments:**
> **username_1**: Which ffmpeg version?  
> **username_0**: It is  version `5.1.2`  

---

## 0 answers

