<p>This can happen if the GOP structure is unclosed at the end of the video. If you can assure that your video ends with an I frame, and that the audio is exactly the same length as the video, you stand a much better chance of getting a smooth recycle. Sorry, I don't know how to force that using ffmpeg.</p>

CC BY-SA 3.0
2014-12-21T01:47:08.717Z
Thanks for the info, helped me learn a lot about how encoding works. I was able to figure out how to set the keyframe interval and make sure the last frame was a keyframe but it didn't change anything. I have a WebM video that loops seamlessly with ffplay but not in Chrome/Firefox, it seems like they just don't support gapless video/audio playback.
Brendon
CC BY-SA 3.0
2014-12-20T16:36:05.940Z
2014-12-20T16:36:05.940Z
Jim Mack
<p>It's possible to produce mp4/webm videos without sound that loop seamlessly, but if you add sound to the video with matching length it adds a noticeable stutter at the end, even if the audio is slightly shorter than the video.</p>

<p>Is it possible to produce a web friendly (mp4/webm) video with sound that is gapless?</p>

<p>I use Adobe products and ffmpeg to produce my videos, if that matters.</p>

<audio><adobe><production>
Gapless audio in video
Brendon
# Gapless audio in video

(Asked by: username_0 on 2014-12-20)

It's possible to produce mp4/webm videos without sound that loop seamlessly, but if you add sound to the video with matching length it adds a noticeable stutter at the end, even if the audio is slightly shorter than the video.

Is it possible to produce a web friendly (mp4/webm) video with sound that is gapless?

I use Adobe products and ffmpeg to produce my videos, if that matters.

**Tags:** audio, adobe, production


---

## 1 answers

### Answer by username_1 on 2014-12-20. Score: 1

This can happen if the GOP structure is unclosed at the end of the video. If you can assure that your video ends with an I frame, and that the audio is exactly the same length as the video, you stand a much better chance of getting a smooth recycle. Sorry, I don't know how to force that using ffmpeg.

> **Comments:**
> **username_0**: Thanks for the info, helped me learn a lot about how encoding works. I was able to figure out how to set the keyframe interval and make sure the last frame was a keyframe but it didn't change anything. I have a WebM video that loops seamlessly with ffplay but not in Chrome/Firefox, it seems like they just don't support gapless video/audio playback.  

---

