Highlighted

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

New Here ,
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

50

Likes

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

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

New Here ,
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

51

Likes

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
Most Valuable Participant ,
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

Likes

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
Reply
Loading...
New Here ,
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?

Likes

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
Reply
Loading...
Most Valuable Participant ,
Mar 30, 2020

Copy link to clipboard

Copied

thisLayer.source.timecode() not working?

 

Mylenium

Likes

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

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...