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

Getting the start frame offset for a comp imported from Premiere Pro

New Here ,
Mar 29, 2020 Mar 29, 2020

Copy link to clipboard

Copied

I'm trying to script some time manipulations in After Effects on a comp that was imported from a clip in Premiere Pro (using "Replace with After Effects Composition" in PP).

 

The problem I have is that the expression I'm using to modify time needs to make calculations relative to the start of the comp, not the start of the file containing the comp, but frame 0 is always the start of the file, and as such may exist well outside the boundaries of the clip from which I'm trying to build the composition.

 

I can see that AE knows where the start of the comp is in the file-- it displays that time when I enable time remapping.

 

How do I get at that time or frame number programmatically in the expression so I can make calculations relative to the start of the comp instead of the start of the file? (startTime, inPoint, and displayStartTime are all 0.)

TOPICS
Expressions , Scripting

Views

191

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
LEGEND ,
Mar 30, 2020 Mar 30, 2020

Copy link to clipboard

Copied

You can retrieve the source clip time code, you know, so I'm not sure what the actual problem is. If you need additional references for your calculations, simply split the clip or add markers. Other than that you can always create exactly trimmed new master clips in Premiere and avoid having to deal with complicated math at all once it fits the comp duration exactly...

 

Mylenium

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
New Here ,
Mar 30, 2020 Mar 30, 2020

Copy link to clipboard

Copied

I guess my question is HOW do I retrieve the time code of the start of the source clip?  The properties that I would have expected to contain this value are all relative to the comp, not relative to the clip (ie, they're all 0).

 

What property or method should I be using to get the time of the start of the clip for use in an expression?

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
LEGEND ,
Mar 30, 2020 Mar 30, 2020

Copy link to clipboard

Copied

thisLayer.source.timecode() not working?

 

Mylenium

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
New Here ,
Mar 30, 2020 Mar 30, 2020

Copy link to clipboard

Copied

LATEST

No, that produces an error that thisLayer.source.timecode() is not a function.

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