Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Time remap with adujstable length

  • Time remap with adujstable length

    Posted by Sean Jahnig on September 29, 2020 at 11:52 am

    I have a project in mind and i can’t figure out how to build it. I’m trying to find the easiest way to achieve it…

    I have a 1000x1000px square that will serve as a placeholder and a mask for video clips. The square transitions between 4 static positions, so it moves, then stops and waits, then moves again etc. In each position is a different video clip. The movement has been created and it works. Seeing as the video clips will vary in length, the idea was to pre-compose the square and animation, then time remap the static positions according to the length of each video clip. This works, but the problem is, the video clips need to be kept out of the pre-comp (in order to run in real time). At the moment, the only way i have solved this is by using a static image for the start of the video, and the end of the video for the ‘transition’ part .. and then once the square stops – the video plays from a layer outside of the time remapped comp.

    It’s just not a great practice when you deal with a lot of videos that need to be changed often and was wondering if anyone has any better suggestions.

    I knot this is not possible – but ideally the video clip needs to be inside the pre-comp so that the video clip can transition and interact with other overlays correctly.

    Thanks,

    Sean.

    Sean Jahnig replied 5 years, 7 months ago 3 Members · 4 Replies
  • 4 Replies
  • Michael Szalapski

    September 30, 2020 at 2:40 am

    Could you use the moving square comp as a track matte for a different comp that contains your videos?

  • Graham Quince

    October 4, 2020 at 11:38 am

    Been having a play around with this, as the thing that struck me is that if you’re using multiple videos of different lengths, then an expression using footage(layer).duration will probably help. And if you’re needing to drive videos based on positions which need to “pause”, then the easiest way I can think of is Layer Markers.

    This is what I have so far:

    On the animated layer, use an expression like this:

    pos1 = [0,0];
    pos2 = [500,400];
    vid1 = thisComp.layer("Arrow.mp4");
    vidMarker1 = marker.key(1).time;
    vidDuration1 = footage(vid1).duration+vidMarker1;
    if (time < vidMarker1) {
    pos1;
    } else {
    linear(time, vidDuration1, vidDuration1+2 , pos1 ,pos2);
    }

    This holds at pos1 until the layer marker is reached. Then it keeps holding, until the video has played, then it animates from pos1 to pos2

    And paste this @danebberts masterpiece into the time remap of the video layer:

    len = thisLayer.source.duration;
    L = thisComp.layer("Shape Layer 1");
    if(L.marker.numKeys > 0){
    m = L.marker.nearestKey(time).index;
    if(L.marker.key(m).time > time) m--;
    if(m > 0){
    mt = L.marker.key(m).time;
    if(time < mt+len){
    linear(time, mt, mt+len, 0, len);
    }else 0
    }else 0
    } else value;

    This looks for the marker on the animated layer, holding the video on the first frame, then it plays the entire video.

    Now this isn’t the complete solution, but might be an option. If you check out the Expressions Library(?? – the little arrow in a circle in the expressions options) and look at Interpolation, there’s different easing options.

    Hope that helps

    Graham

  • Sean Jahnig

    October 5, 2020 at 6:35 am

    @michaelszalapski

    Thanks, and sorry for the late reply.

    This would work if there was nothing else in the pre-comp with the mask. If there were other objects in that pre-comp then they would form part of the matte. If there was a way (from the main comp) to target a specific layer inside the pre-comp as matte, then that could hold part of the solution.

  • Sean Jahnig

    October 5, 2020 at 6:51 am

    @grahamquince2

    thanks for this suggestion, this is definitely sounds like the right path. I will experiment and let you know how it goes!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy