• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Pause video layer with an expression for x seconds.

Community Beginner ,
Feb 23, 2023 Feb 23, 2023

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

TOPICS
Expressions , Freeze or hang , Scripting

Views

938

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2023 Feb 23, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2023 Feb 23, 2023

Copy link to clipboard

Copied

Thank you! I will try this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 24, 2023 Feb 24, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2023 Feb 24, 2023

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2024 May 04, 2024

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines