I don't understand your question about frames vs. seconds.
You can either sequence copies of your precomposition over and over to loop it or you can use a loopOut() expression on the Time Remapping value (you will also have to extend the layer).
I highly recommend going through these resources: Getting started with After Effects That set covers all the questions you've had so far and probably many others you didn't know you had.
1 person found this helpful
As Szalam said, pre-compose, time remap, and the use a loopOut() expression.
Here's the steps in detail.
First make sure you comp is exactly the right length to make a perfect loop. This means the last frame of the comp must perfectly line up with the first frame of the comp. You can test the loop by doing a RAM preview with the Loop option enabled in the Preview Panel. When your loop is perfect it's time to pre-compose. Make sure you move all attributes to the new comp.
Now you must change the duration of your original comp to allow time for the loop to run. Now enable time remapping. You'll see two keyframes, one at the start and one at the end. If you move to the end keyframe by pressing the K key you'll see that there is no image. Use the page up key to move back one frame and manually set a new keyframe. Delete the last keyframe now. Pressing the J and K key should now show you the first and last visible frame. Now extent the out point of the pre-comp by going to the last frame of the composition, select the pre-comp layer and then press Alt/Option + ] to set a new out point. Now hold down the Alt/Option key and click on the stopwatch for Time Remapping and type in loopOut() and your'e done. You can also use loopOut("cycle"), cycle is the default, or type in loopOut("pingpong") which will make the comp play frontwards then backwards, then frontwards. There are also some other properties you can include in the brackets but let's not get into that now.
There you go. EZ as pie once you know what you are doing.
if you want a perfect loop you need not to delete the last keyframe, but instead, copy the first keyframe over the last keyframe.
if you not do copy paste the first keyframe to replace the original last kf, you will always miss the first frame that will accumulate in time with every loop.
say you have one second precomp, so setting a keyframe one frame before the last keyframe and deleting the last keyframe will result in this:
1 – 00:00-01:00
2 – 00:01-01:00
as time progresses this delay will miss a frame each loop…
you can see a drift you duplicated your precomp over and over back to back and place it below your TR precomp to compare
as opposed to setting a keyframe one frame before the last keyframe and copying the first keyframe instead of the original last keyframe which will result in this:
2 – 00:00-01:00
and will be exactly like you pasted your precomp over and over back to back.