Copy link to clipboard
Copied
Hi,
Any help would be greatly appreciated.
I would like to Pause video layer with an expression for x seconds. after x seconds it should play as normal. The video could be in a comp if that helps. I would like to trigger it either on the video layer or from elsewhere in the project but it must be done with an AE expression.
Thank you!
Nick
Copy link to clipboard
Copied
Not sure how close this is to what you're after, but you could enable time remapping on your video layer and apply this time remapping expression, which will pause for 1 second at each layer marker:
delay = 1; // delay 1 sec at each marker
m = marker;
t = time;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n--;
if (n > 0){
d = (n-1)*delay + linear(time - m.key(n).time,0,delay,0,delay);
t -= d;
}
}
t
Copy link to clipboard
Copied
Thank you! I will try this.
Copy link to clipboard
Copied
Hi,
I have been trying to implement this but am still stuck with the timeline not pausing on the markers.
Please see the attached image. Have i put it in the correct place? Am I missing somehting?
Generlly I am finding expressions quite challenging to get working. I understand that putting them on the right element is critical to them functioning correctly.
Is there a place to put global expressions for a project and then reference the correct elements?
Thank so much for your help!
Nick
Copy link to clipboard
Copied
The expression is expecting layer markers, not comp markers. You could change it to comp markers by changing the second line to:
m = thisComp.marker;
Copy link to clipboard
Copied
well Nick.. I've just launched a script that will do exactly what you are asking for, here's a quick tutorial for how you can use PlayPauseRepeat:
https://youtu.be/1lmLQwsyvyY?si=lF99IXQ3d1eUP4Ct
the link to download it is in the video discriptipon!
hope you like it! and if you do, please support by sharing, reviewing or donatiing.
thanks!
Awn