How to Loop a Layer in After Effects
StyleFrame Team8 min read
To loop a layer in After Effects, use one of two methods. For footage, right-click the item in the Project panel, choose Interpret Footage > Main, and set Loop to the number of repeats you need. For any layer, including precomps, enable Time Remapping (Layer > Time > Enable Time Remapping), Alt/Option-click the Time Remap stopwatch, enter loopOut("cycle"), and drag the layer's out point to the length you want. If you only need to repeat keyframed property animation, apply the same loopOut() expression directly to that property.
Pick the Right Loop Method
"Loop a layer" covers several different jobs, and the right method depends on what the layer is.
Method 1: Interpret Footage
This is the fastest option for a clip that lives in the Project panel.
- Select the footage item in the Project panel (not the layer in the timeline).
- Right-click and choose Interpret Footage > Main.
- In the Other Options section, find Loop and enter the number of times the clip should play.
- Click OK and drag the footage into your comp.
After Effects treats the footage as if it were that many times longer. If the layer is already in your comp, its out point won't always extend by itself, so drag the end of the layer to reveal the repeats.
Limits to know about:
- It works on footage items, not on compositions. If you right-click a comp, there's no Interpret Footage option. Use Time Remapping for precomps.
- The loop count is fixed. For a template where the final video length changes, set a deliberately high number, or use Time Remapping instead.
- It repeats the clip exactly as it is. If the last frame doesn't match the first, you'll see a hitch at each repeat.
Method 2: Time Remapping with loopOut()
Time Remapping is the most flexible approach because it works on footage, nested comps, and precomps. It's also a common choice when the Loop setting isn't available.
- Select the layer. If your animation cycle is in its own comp, drop that comp into a new, longer comp first. That makes it a precomp layer.
- Choose Layer > Time > Enable Time Remapping, or press Cmd+Opt+T (Mac) / Ctrl+Alt+T (Windows). Two keyframes appear on the Time Remap property, one at the start and one at the end of the layer.
- Alt/Option-click the stopwatch next to Time Remap to open the expression field.
- Replace the default text with
loopOut("cycle"). You can also type justloopOut(), since cycle is the default. - Drag the layer's out point to the length you need. With Time Remapping enabled, the layer can extend well beyond its original duration.
Fix the Black Frame at the Loop Point
A very common problem is a black frame or a frozen frame at the end of each cycle. The final Time Remap keyframe sits on the layer's last frame, so the loop shows a blank or duplicated frame before restarting.
To fix it:
- Move the playhead to the last Time Remap keyframe.
- Step back one frame (Cmd/Ctrl + Left Arrow).
- Add a new keyframe there.
- Delete the original end keyframe.
Do this before you extend the layer. The loop then ends on the last real frame of the animation and jumps cleanly back to the start.
Make a Layer Loop Without Restretching It Each Time
If you're building a template, such as overlays that must run under whatever clip you drop in, extend the looping overlay layer far past the end of the comp. A layer can be much longer than its comp, and anything beyond the comp's end is ignored on render. When you change the comp duration for a new video, the overlay still covers the whole timeline, so you never drag its out point again. Pair this with Time Remapping and loopOut() and the overlay keeps repeating.
Method 3: Loop Keyframed Properties
Sometimes you don't want to repeat the whole layer, only the animation on it. A spinning gear, a bobbing icon, or a pulsing glow only needs two or three keyframes plus an expression.
Alt/Option-click the stopwatch on the property and enter one of these:
loopOut("cycle")repeats the keyframes after the last one. When playback reaches the end, it jumps to the first keyframe.loopOut("pingpong")plays forward, then backward, then forward again.loopOut("offset")repeats the motion while adding each cycle's change to the last value. It suits continuous drift, such as a conveyor or a steadily rotating object.loopOut("continue")extends the velocity of the last keyframe, so the property keeps moving at that speed.loopIn()does the same thing before the first keyframe. This is rarely needed, but useful when animation must run backward from the start.
You can limit what repeats. loopOut("cycle", 2) loops only the last two keyframes' worth of animation, and loopOutDuration("cycle", 1) loops the last second of animation. Both are handy when an intro should play once and a shorter section should repeat.
For a seamless result, make the first and last keyframes match in value, and decide whether the last keyframe is also the first frame of the next cycle. If both are identical, you'll get a duplicate frame (a visible stutter) unless you shorten the cycle by one frame.
Method 4: Handle Footage That Doesn't Loop Seamlessly
Real footage rarely loops perfectly. Smoke, water, light leaks, and handheld textures all have a visible jump when the end meets the start.
Crossfade Overlap
- Trim the clip to the section you want to repeat.
- Duplicate the layer (Cmd/Ctrl+D).
- Slide the copy so its start overlaps the end of the original by a second or so.
- Fade the top layer's opacity in across the overlap.
Repeat as needed along the timeline. It's manual, but it works on any footage and hides the seam on organic textures.
Looping Plugins
Third-party tools can automate this. Boris FX's BCC Looper, for example, is applied as an effect (Effect > BCC Time > BCC Looper). It offers control over cycle count, start frame, loop mode, and fade options, and it can sit on an adjustment layer pointing to the layer you want to loop. If you loop footage often, a plugin saves time over building overlaps by hand.
Reverse for Ping-Pong
If the motion allows it, Time Remapping with loopOut("pingpong") plays the clip forward and then backward. It hides the seam entirely, but only suits motion that looks natural in reverse, like clouds, fabric, or abstract textures. It won't suit anything with obvious directionality such as walking or falling water.
Troubleshooting Common Loop Problems
- The loop stops after the original length. The layer's out point is too short. Drag it out, or extend it past the comp end for templates.
- The expression doesn't seem to do anything. Confirm Time Remapping is enabled, and that the expression is on the Time Remap property rather than on a transform property. Check that the expression isn't disabled (the equals sign icon next to the property).
- A hitch at every repeat. The first and last frames are probably identical, so one frame displays twice. Trim the final frame, or shift the last keyframe back one frame.
- Frame rate mismatches. If the layer's frame rate differs from the comp's, timing can shift. Check the footage's interpretation and conform it before looping.
- Nested loops drift. When a looped precomp sits inside another comp, make sure the inner comp's duration equals the intended loop length exactly. Extra frames at the end of the precomp will show up in every cycle.
- Need to stop the loop at a specific moment. Use
loopOut("cycle", n)with a limited keyframe count, or trim the layer's out point.
Create Loop-Friendly Source Material
A loop is only as clean as the footage you start with. If you build the animation cycle yourself, design it so frame one and the final frame line up. For stylized or generated elements such as background textures, atmospheric motion, or character idles, that planning matters more than any expression.
Import the footage or image sequence, interpret it at the right frame rate, and loop it with Time Remapping or Interpret Footage as above. The loop mechanics stay in your compositing app, where you already have full control.
Quick Workflow Summary
- Decide what needs to loop: footage, a precomp, or property keyframes.
- Footage with a set repeat count: use Interpret Footage > Main > Loop.
- Anything indefinite, or a precomp: enable Time Remapping, add
loopOut(), fix the end keyframe, and extend the layer. - Keyframed properties: apply
loopOut("cycle"),"pingpong","offset", or"continue". - Imperfect footage: crossfade overlaps, ping-pong, or a looping plugin.
- Templates: extend the looping layer past the comp's end so you never restretch it.
Once you know which of these applies to your layer, looping takes only a few seconds. The expression and Time Remapping approach covers most real-world cases, and the rest comes down to preparing footage that cycles cleanly in the first place.