Skip to main content
Participant
January 24, 2025
Answered

Help Needed: ExtendScript to Cut Clips at Specific Timestamps

  • January 24, 2025
  • 2 replies
  • 1016 views

Hi everyone,

I'm trying to write an ExtendScript to automate cutting clips in Premiere Pro at specific timestamps. My goal is to:

  1. Use a script to cut the video clips on Video Track 0 at multiple timestamps (e.g., 00:00:05:00 to 00:00:06:10 , 00:00:10:00 to 00:00:12:10, etc.).
  2. Ensure it adheres to ES2 standards (no modern JS features).
  3. Follow the official Premiere Pro API guidelines without using AI tools or unofficial APIs.

Problem:

I’ve tried a few scripts, but none seem to work correctly. Here are the issues I’m facing:

  • The script doesn’t cut the clips at the specified timestamps.
  • It seems like the split() method isn’t behaving as expected.
  • I’m not sure if I’m calculating the timecode-to-ticks conversion properly.

    Can anyone please create and share the code for my use case here? It will be beneficial. Thanks in Advance.
Correct answer Bruce Bullis

> It seems like the split() method isn’t behaving as expected.

 

There is no split method.

You could truncate (change the end point) of the earlier trackItem, and insert a new trackItem (based on the same projectItem) at the end of the earlier trackItem. 

I’m not sure if I’m calculating the timecode-to-ticks conversion properly.

A Time() object will perform the conversion for you; see PProPanel. There are 254016000000 ticks/second.

2 replies

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
January 24, 2025

> It seems like the split() method isn’t behaving as expected.

 

There is no split method.

You could truncate (change the end point) of the earlier trackItem, and insert a new trackItem (based on the same projectItem) at the end of the earlier trackItem. 

I’m not sure if I’m calculating the timecode-to-ticks conversion properly.

A Time() object will perform the conversion for you; see PProPanel. There are 254016000000 ticks/second.

Participant
January 27, 2025

Hi @Bruce Bullis ,

Could you provide me with a sample or example code? It would be very helpful. I have tried all possibilities, but nothing has worked for me.

Bruce Bullis
Community Manager
Community Manager
January 27, 2025

The PProPanel sample (to which I linked above) is the best source of example code.

Kevin-Monahan
Community Manager
Community Manager
January 24, 2025

HI @ALSHEFAN_A2162,

Thanks for the note and welcome to the forum. I'm Kevin from Adobe Support, a moderator here. I appreciate the information you gave. Hopefully, an Adobe Expert or developer will respond shortly. Take care.

 

Thanks,
Kevin

 

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio