Quantcast
Channel: Adobe Community : Popular Discussions - Premiere Pro SDK
Viewing all articles
Browse latest Browse all 53010

Get clip position in sequence?

$
0
0

Hi everyone,

 

I'm writing a script to export all the individual clips in my sequences as individual videos.

I have the PProPanel example and have ESTK up and running nicely.

I can iterate through all the tracks and clips in a sequence no problem.

I was thinking of simply setting the Sequence In/Out to the beginning of each clip,

and then calling render() (as in the PProPanel) .

The following script works, except clip.start and clip.end are relative to the clip source media, not the sequence.

So how to retrieve the start and end of a clip relative to the sequence?

(p.s. before anyone suggests a manual way of exporting clips individually, note that I have to export around 6000 clips)

Any help appreciated, MM

function ExportClipsInSequence(sequence)

{

  if (!sequence) return;

 

  var videoTracks = sequence.videoTracks;

 

  for (var trackIndex = 0; trackIndex < videoTracks.numTracks; trackIndex++)

  {

      var track = videoTracks[trackIndex];

      var clips = track.clips;

      for (var c = 0; c < clips.numTracks; c++)

  {

  var clip = clips[c];

  sequence.setInPoint(clip.start.seconds);

  sequence.setOutPoint(clip.end.seconds);

  render(sequence);

  }

}

}


Viewing all articles
Browse latest Browse all 53010

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>