# Cross-dissolve in real time between end and start point of looping clip

I'm trying to achieve the following: I have a short movie clip that I want to loop for an indefinite amount of time. However, as of now, it doesn't particularly good every time the clip starts over (it just sort of jitters back to the starting point without any form of smooth transition), so I would need a cross-dissolve effect to be applied to it in realtime.

Is there any (preferably free) software solution that could help me accomplish what I want to do here? Preferably, I'd like some kind of free solution that works both across Windows and OS X, but tips relating to the platforms individually are appreciated as well. I don't care whether I need some stand alone software to achieve this (as opposed to using some kind of plug-in for a program that I'm already using, like VLC).

• We're going to need a clarification of "it doesn't particularly every time" – Jim Mack Feb 26 '15 at 2:05
• @JimMack Oops, I forgot a word there. Thanks for reminding me :) – Speldosa Feb 26 '15 at 10:07
• What platform, OS, player etc are you trying this with? More details will help us help you. – Jim Mack Feb 26 '15 at 11:27
• @JimMack I've expanded my question now :) – Speldosa Feb 26 '15 at 15:10

You can't seamlessly loop a clip that wasn't designed to loop. Some suggestions below, but all require video editing software. No plugin for a player that I know of.

### Option 1: Clip has a distinctive/necessary beginning & end that have to be seen, or has audio/narration that cannot be edited or shortened

The best option in this case would be to edit the clip to fade-in from and fade-out to black (and/or an identical image) at the beginning & end.

Now when it loops it at least appears the same (even if the player hiccups slightly). Black works well since most players go to black after finishing a clip.

### Option 2: No audio, the clip's start/end location doesn't matter & you want a seamless loop

In this case you could try the following, using whatever software - iMovie, Premiere, After Effects, MovieMaker etc...

• Place the entire clip on a timeline.
• Duplicate the clip.
• Find a point in the clip that has as little motion/change as possible.
• On the top copy of the clip, move 1 frame to the left and trim everything after this point.
• On the bottom copy, go back to the chosen frame and trim everything before this point.
• Move the bottom copy left so it starts at the beginning of the timeline
• Your chosen point now starts at 0:00:00
• Shift the top copy to the right until it only overlaps slightly with the bottom copy.
• The original start/end points are now overlapping somewhere in the middle
• Add a cross-dissolve to the beginning of the top copy
• The original end point will be obscured by the dissolve.
• Experiment w/the length and location of overlap/dissolve to find a suitable result. It could work w/just a few frames, or might require a longer overlap to not look jumpy. How well it works depends on how different the original start/end frames are.
• Ensure the dissolve only occurs during overlapping frames or else you'll see clips jumping on & off screen.
• Trim the end of the timeline so it stops exactly at the last frame of the top clip.
• Your edited video will be shorter by the length of the dissolve.
• The new last frame is now exactly 1 frame before the new first frame at the beginning.
• Export timeline to your required format

The result of this process is that the beginning and end now only differ by a single frame, making a loop with minimal jump when you restart playback. The cross-dissolve in the middle takes care of the smooth transition that you don't currently have, at the expense of ~1 second of original length.

You could also flip the directions around so the top clip shows the original "end" point clearly & fades to the "start" of the bottom clip. Either way works...

There still may be a slight stutter no matter what, depending on the delivery platform. VLC is decent about looping, but iTunes and WMP have a noticeable gap even in a clip that should be seamless. If your clip is for DVD there might be a slight pause, but visually it would look the same.

If the video is for web or mobile use, it'll depend on the platform. iOS and Android are horrible about looping videos natively (there's always a noticeable gap while it restarts, if looping is allowed at all). With HTML5 video or Flash you could code it to seek to the beginning immediately before it reaches the end, hopefully preventing much stutter and avoiding the need to go to all this editing hassle...

I hope this helps!

• It sure did help. I'm going to go for some version of the cross-dissolve built into the clip itself so that the start of a new iteration of the clip can't be detected. – Speldosa Feb 27 '15 at 16:57
• @Speldosa - You can't say "You can't seamlessly loop a clip that wasn't designed to loop" without knowing the content of the video – ashleedawg Nov 22 '18 at 10:05

I upvoted mc01's answer. But I also want to suggest a couple of alternatives (which is something I do a lot on this forum!).

1. If possible, you could shoot a new ending and beginning that utilize the skip/jump. It could be a gunshot or part of a quick earthquake. Or a character could mention that there might be a power outage, or a ripple in the space-time continuum (if something like that fits with the tone of the video). Then, when it occurred, the skip/jump would actually appear as an intentional part of the video.
2. You mentioned that the clip is short. Let's assume for this example that it's 3 minutes long. You could make a new edit of the video, where you loop the footage 20 times so it takes up an hour. Each time the footage starts again, you could have complete control over the smoothness of the transition. After outputting it, when you played the footage as a loop, 19 of the transitions would be smooth and flawless; every hour there would be one brief hiccup when the footage restarted at the beginning.
• These advices aren't applicable to my specific situation, but they are good tips anyhow. Thumbs up :) – Speldosa Feb 27 '15 at 14:51
• Thank you! I always like to post alternative solutions, even if they're a little crazy. – BrettFromLA Feb 27 '15 at 19:31

The issue could be primarily technical or mainly aesthetic. Assuming that the clip is designed to be loopable, it's a technical issue. But if you edit two copies of the clip end-to-start and the transition still looks bad, it's more aesthetic.

On the technical side, I've had success with Windows Media Player looping WMV and FLV clips. This depends somewhat on the bitrate: high bitrates tax the cache and may cause a slight hitch at the transition (usually a freeze on the last frame). But the clip has to be designed to loop, either with matching frames or a good-looking cut.

If it's not technical, you could trim the end of the clip so that it A) ends on a full GOP and B) matches or complements the start of the clip as noted above.

An alternate approach is to create a transition-only clip, like the dissolve you mention, add it to a playlist, and put the playlist on repeat. WMP usually handles playlists seamlessly.

• Thanks for the heads-up regarding the bitrate. I'll try to keep an eye on this. – Speldosa Feb 27 '15 at 14:50

I know this is kind of old but I just had a similar problem and I came up with what I thing is a MUCH better option and doesn't require the compromise of fade in/out. Of course, you must have a simple video editor:

Import the "clip that wasn't meant to loop" and cut in half. Simply reverse the two halves. This makes the start and end frame sequential so when the clip loops back on itself it behaves like it was made to loop. Now, simply overlap the joint in the middle and create whatever cross dissolve makes it look seamless and export!

Of course, this will make your clip start in the "middle" but for many applications it won't matter. If it does matter, simply reimport this new clip and repeat the process to get the proper clip back at the beginning!