I've got a short video that I'd like to export as an mp4 and use in a seamless loop.

The content of the video is very abstract so it doesn't really matter where the loop occurs/what parts of the clip are butting against each other. In practice with the same file, within editors and elsewhere, edits are always seamless.

While working within both Premiere CS6 and After Effects CS6 the clip loops seamlessly. It's when I export and view the media that the short pause/stutter is visible.

I've tried to output the video in many file formats (H.264, Quicktime, MPEG4, etc.) using various export settings. The resulting file always has a short pause at the beginning of the loop when viewed on OS X Quicktime and VLC, as well as when embedded as HTML5 video (but don't get distracted by the web component.)

An example mp4 file is embedded here: http://mechaneyes.com/vid/ . It's slight, but the video is 2 seconds long, so you'll repeatedly see the hiccup. If needed you can right click on the video and save it to view elsewhere.

Thanks in advance for any assist you can give!

Within an editor each frame is complete in itself, but in the output formats you mention, the video is almost always compressed in such a way that only certain frames (called I-frames) are complete and independent. The rest are 'difference' frames that rely on information from surrounding frames.

At a loop point there's often a need for the player to start over, to refill its buffers and prime the engine. You can often help out by ending your segment with a I-frame. But the only sure way to replicate what you see in the editor is to output only I-frames. MJPEG is an example of a codec that always does this, but there are other codecs that can be instructed to. The downside is that the video will be considerably larger.

Try MJPEG and see if it does what you need.

  • Thanks, @jim-mack, and thanks for the thoroughness of your answer. Without knowing what was happening behind the scenes I've been using MJPEG files when playing out with VDMX. It's the only format that performs/functions. Unfortunately in this case I need to keep the file sizes as small as possible as they'll live out their lives embedded on the web. Need all the bandwidth I can get. Thanks again. – Ray Weitzenberg Apr 21 '15 at 0:41
  • Another workaround is to have a few of the loops in the video, so that if there is any stuttering it will happen less frequently. Of course, this will increase your file size too. I do this for video that gets used in a large public venue. A lot of times the video is played back using devices like Roku boxes that can stutter on each loop. I edit the loops into as long a video as I can fit on the card, so there'll only be a stutter once every hour or so. – stib Apr 21 '15 at 6:27
  • It could be fiddly, but another way to workaround the problem would be to remove a few frames from the beginning or end of the loop. This would only work for certain content, but it might may the transition less noticeable. – stib Apr 21 '15 at 6:28

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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