Skip to main content
Participating Frequently
May 20, 2017
Answered

Travelling loop of footage

  • May 20, 2017
  • 1 reply
  • 598 views

I have 1min of footage, I want to create an expression that creates a loop that advances forward one frame with each iteration.

I tried unsuccessfully time remapping with  LoopOutDuration(type = “offset”, duration = (4/24)).

What I’m looking for is if “n” is the duration of the loop and “a” is the first frame of the loop, say n = 4 then what I need is:

abcd bcde cdef  …. till the end of the footage.

If I could get that to work I’d be very happy.

If I could also get it to ping pong then I’d be extremely happy, e.g.:

abcdcba bcdedcb cdefedc

Any answers gratefully received.

Chris

-----

I should have kept looking:

https://forums.creativecow.net/thread/227/23446#23446

f = timeToFrames(time);
seg = Math.floor(f/5);
phase = f%5;
framesToTime(seg + ((phase == 4) ? 2 : phase))

Currently fiddling with this.

Does the travelling loop but not the pingpong.

Praise be to Dan.

Correct answer Dan Ebberts

This should give you a ping-pong version:

n = 7; // loop length

f = timeToFrames(time);

seg = Math.floor(f/n);

ph = f%n;

if (ph > n/2) ph = n - ph;

framesToTime(seg + ph)

Dan

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
May 20, 2017

This should give you a ping-pong version:

n = 7; // loop length

f = timeToFrames(time);

seg = Math.floor(f/n);

ph = f%n;

if (ph > n/2) ph = n - ph;

framesToTime(seg + ph)

Dan

PicSyncAuthor
Participating Frequently
May 21, 2017

Thanks a bunch Dan, it works a treat.

I don't understand it but it does the job perfectlly. I have a lot of reading to do to get my head around it.

best regards

Chris

Participant
October 23, 2025

Thats a really interesting topic about creating a travelling loop of footage I have worked on something similar before and I found that using a short overlap between the start and end frames with a gentle opacity blend can make the transition look much smoother. Adjusting the motion curve also helps keep the loop natural when the camera is not moving perfectly straight. I once came across a reliable  example of a seamless loop that used this method really effectively and it gave me a few new ideas for refining my own edits. Do you usually handle the looping manually or do you use expressions to automate parts of it?