ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Start playback of clip in credits roll when clip comes on screen

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
joel penner
Start playback of clip in credits roll when clip comes on screen
on Nov 2, 2019 at 4:14:16 am

Hi. I am making a credits roll in AE. In this roll there are a bunch of video clips that I'm arranging in a huge comp. I will then animate a scrolling effect in a 4k frame master comp. Is there any way (script, etc) to have it so that the clips automatically start when they come on screen? The alternative would be arranging the clips in the huge comp so that they start at the timecode that corresponds to the point at which they come on screen in the master comp - doable but tedious.

tx!


Return to posts index

Tomas Bumbulevičius
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 2, 2019 at 9:11:06 am

Hey Joel, not sure about such a script - but most likely this could be achieved by setting timeremapping expression, which would trigger playback at the certain time.

Now how that 'certain' time should be decided.. It depends on the size of layers in comp. Vertical scrolling in Y should be linked to relative position change of videos. And once their layer space transformations enters the global position of a comp - timeremapping would be triggered. Is this sounds as whats needed?

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 2, 2019 at 5:17:39 pm

Thanks for the response. Yeah that sounds like it would work! Do you have any leads for expressions that I could use as templates to work from? I haven't worked with expressions before and can't really write scripts.


Return to posts index


Tomas Bumbulevičius
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 5, 2019 at 11:33:29 am

Joel, could you please share a copy of composition on how it looks like? To grasp the sizes of layers / layout, would be even better - if sample .aep is prepared. That way it would be easier to propose things, instead of blind guessing.

Also, it is important when video clips should start playbacking (when whole scrolled-in or at the time its border reaches comp boundaries) as well as whether thumbnail of a clip should be first frame of the video.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 7, 2019 at 8:41:28 pm

So here is an .aep file (from CC 2014, but I also have CC 2019). The layout is just a rough sketch at this point and I've attached thumbnails of the clips in lieu of the full-sized files, but the general idea is just having each clip start to play when its border reaches the comp boundaries. I'm thinking that the point at which the clip comes on screen will be determined by a null parent layer that controls the speed of the animation as I've done here, but I've also thought of arranging the whole thing in a precomp.

The first frame of each clip should be just the actual first frame, unless I'm misunderstanding the question.

I've also attached a thumbnail preview of the (very) rough sketch of the entire list of clips that will be scrolled through.

https://www.dropbox.com/s/i6lvsjz4r7baea7/cow-videos-and-aep.zip

Thanks!


Return to posts index

Dan Ebberts
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 8, 2019 at 1:29:49 am

For the way that you have things set up, a time remapping expression like this for each movie should work:


if (toComp([0,0])[1] > thisComp.height || toComp([0,height])[1] < 0){
0;
}else{
t = time - thisComp.frameDuration;
while(toComp([0,0],t)[1] <= thisComp.height){
t -= thisComp.frameDuration;
}
time - t;
}



Dan



Return to posts index


joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 8, 2019 at 2:19:46 am

This is perfect, thanks! Since time remapping is now controlled by the expression, is there a way to adjust speed of clip playback when it comes on screen with the expression?


Return to posts index

Dan Ebberts
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 8, 2019 at 3:55:35 am

Setting the rate could be done like this, but if you wanted to animate it, that's a lot trickier:


rate = 2.0;
if (toComp([0,0])[1] > thisComp.height || toComp([0,height])[1] < 0){
0;
}else{
t = time - thisComp.frameDuration;
while(toComp([0,0],t)[1] <= thisComp.height){
t -= thisComp.frameDuration;
}
(time - t)*rate;
}



Dan



Return to posts index

joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 8, 2019 at 4:56:19 pm

Perfect, thanks!


Return to posts index


joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 9, 2019 at 3:57:50 am

One more question. I'm getting this error with some clips in the sequence, seemingly at random:

"After Effects warning: an expression was disabled as a result of an error.
Error at line 6 in property 'Time Remap' of layer 54 ('(name of layer)') in comp 'credits'. Timeout while waiting for the engine."

If I copy that problem layer (that has the same expression as the ones that are working) and paste it into a new comp it works fine. I thought that maybe it was due to the amount of layers in the comp (around 40 video layers), so I deleted the rest of the videos from the credits comp, but that didn't help either. Any idea as to how to solve this issue? Thanks.


Return to posts index

Dan Ebberts
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 9, 2019 at 6:30:53 am

The expression makes certain assumptions and will time out if at least part of the layer is visible in the comp, but there was never a time where it was completely below the comp. If that's a condition that can happen in your setup, then you probably need to build something into the expression to defend against that. One thing that could help is to always make sure the layer movement is animated (starting below the comp) before the time remapping expression is added.

Dan



Return to posts index

joel penner
Re: Start playback of clip in credits roll when clip comes on screen
on Nov 9, 2019 at 7:03:37 pm

Ok great, thanks. Adding the expression when the layer is below the come fixes it.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]