Skip to main content
Participant
Jan 16, 2026 7:25 AM UTC
Answered

Using insertClip to add video to end at specific tick

I have no problem with adding a video with Extendscript to start at a specific point. But I need it to end at a specific point related to another movie's end tick.

bbb_999
bbb_999Correct answer
Community Manager
Jan 22, 2026 4:55 PM UTC

Hi Bruce. Many thanks for helping. I was missing the .duration calc. Where can I find guide to all the ExtendScript actions? I am also trying to figure out how to move clips around once they are on the timeline aalready. Is that possible or can you only dtermine a specific placement by insert from bin?


Here's all available PPro ExtendScript API documentation., including the trackItem.move() function. 🙂

5 replies

Bruce Bullis
Legend
Jan 16, 2026 10:16 PM UTC

I don't see any technical reason you couldn't do that; have you encountered a problem, doing so?

Translate
Participant
Jan 19, 2026 9:24 AM UTC

Thanks for reply, but perhaps I did not explain well. When I get the end tick of clip on layer 0 and use that to insertClip on layer 1, the clip on layer 1 starts at the end of the clip on layer 0. But what I want to do is insert the clip on layer 1 to end at the same point as the clip on layer 0. This is more a "how to" question than reporting any errors. What would the code be to ensure that the clip I add to layer 1 position it to end at the same time as clip on layer 0?

Translate
Bruce Bullis
Legend
Jan 20, 2026 5:13 PM UTC

I'd imagine that the starting time of trackItem inserted onto Track 1, which ends at the same time as an existing trackItem on Track 0, 

newTrackItemStartTime = existingTrack0TrackItem.end - newTrackItem.duration;


Does that work?

 

 

Translate