Previous topicNext topic

Stutter at loop with VideoFile module

Questions, comments, feedback, etc.
Post Reply
pinmode
Posts: 44
Joined: Sun May 29, 2016 7:39 pm

Stutter at loop with VideoFile module

Post by pinmode »

Is there a way to guarantee that the VideoFile transition is seamless at the loop point? I've got about 12 VideoFile modules of ~100MB clips loaded and I'm switching between them with InputSelector. They don't always stutter but it often does, at the loop point. I can't figure out why it does sometimes and sometimes not, or how to prevent it. Thanks! 64GB RAM, Windows 10
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: Stutter at loop with VideoFile module

Post by Magic »

Is your loop point at the beginning of the file (frame 0), or is it at a different frame? Sometimes when you set the loop point to a frame which isn't a keyframe, the decoder has to decode all the frames from the previous keyframe.

For example, if you set the loop point to 1 second, but the keyframes are only spaced every 2 seconds, the decoder has to decode all the frames between time 0 and time 1, which would be 30 frames for a 30fps file. Decoding 30 frames at once can use a lot of CPU and hard disk activity. This is the biggest source of stutter.

Hard drive and CPU speed are also important. If your project has many VideoFile modules in it, you probably will need a faster SSD drive to keep up. Most non-SSD hard drives have trouble switching between multiple videos.

If you are willing to re-encode your videos, the best thing would be to encode them in a video format which has every frame as a keyframe, such as Motion JPEG or Hap. Mp4 is not a very good format for looping, because it uses lots of keyframes.

For a bit more info you can check out https://en.wikipedia.org/wiki/Key_frame ... ompression.

This forum topic might also be helpful: viewtopic.php?f=2&t=739
Post Reply