Skip to main content
Participant
January 29, 2019
Answered

Export frames or subclip between two markers

  • January 29, 2019
  • 1 reply
  • 1715 views

Hi!

I'm currently developing an extension using extendscript and i want to export frames or subclip between two markers.

I read the premiere scripting guide and didn't found any method that allows me to navigate the frames of a clip.

Is there any way that to get the next frame of a marker? Or the clip(s) between two markers?

Correct answer Bruce Bullis

You don't need to navigate frames of a clip, to transcode or sub clip a time range from source media.

transcode() and createSubclip() both take in and out point params, which you can get from your markers' start and end times.

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
January 29, 2019

You don't need to navigate frames of a clip, to transcode or sub clip a time range from source media.

transcode() and createSubclip() both take in and out point params, which you can get from your markers' start and end times.

gp123456Author
Participant
February 1, 2019

Thanks bbb_999 for the answer!

What's the specific projectItem where i should call the createSubclip() method?

I'm trying to call it on the first children of the rootItem but it says "undefined is not an object".

Bruce Bullis
Community Manager
Community Manager
February 1, 2019
What's the specific projectItem where i should call the createSubclip() method?

Re-reading above, I think you're talking about a range within a sequence, not footage. If that's the case, you'd want to create a sub-sequence, not a sub-clip. Here's how:


https://github.com/Adobe-CEP/Samples/blob/f7d41a21258d1b8a577183cd59216e7ca9abb74f/PProPanel/jsx/PPRO/Premiere.jsx#L2224


To determine the range to export; find the start and end times of the appropriate sequence markers. Here's some sequence marker accessing code:

https://github.com/Adobe-CEP/Samples/blob/f7d41a21258d1b8a577183cd59216e7ca9abb74f/PProPanel/jsx/PPRO/Premiere.jsx#L226


So, if you set the sequence's in and out points to match the start/end time(s) of appropriate markers, you can call encodeSequence() telling it to respect the sequence in/outs.

https://github.com/Adobe-CEP/Samples/blob/f7d41a21258d1b8a577183cd59216e7ca9abb74f/PProPanel/jsx/PPRO/Premiere.jsx#L587