Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd imported files into sequences using Premiere Pro's ExtendScript connection
    text
    copied!<p>I'm trying to create a script in <code>ExtendScript</code> for Premiere Pro that will load-in specified video files, clip them at specified start and stop times, place them into a sequence and then export the resulting movie.</p> <p>I understand that Adobe doesn't have an official documentation about scripting for Premiere Pro, so I've been working from the data browser (in the <code>ExtendScript Toolkit</code>, or <code>ESTK</code>) and a collection of handy class references I've found <strong><a href="http://cssdk.s3-website-us-east-1.amazonaws.com/sdk/2.1/docs/WebHelp/references/csawlib/com/adobe/premiere/package-detail.html">here</a></strong>. </p> <p>I have successfully loaded in the CSV file that specifies the needed info and also know how to import the video files and create a new sequence (as explained <strong><a href="http://forums.adobe.com/thread/1177191">here</a></strong>). The trouble I'm having now is getting the imported files clipped correctly and placed into the sequence. I see that the activeSequence has methods like setInPoint and setOutPoint, but that doesn't seem to result in the correct trimming upon export.</p> <p>Here is my code with comments to show flow of overall script:</p> <pre><code>#target premierepro var myDir = "G:\\directoryWithVideoFiles\\"; // defined "indexOf" subfunction here // ***** begin main body of script ***** // (dataRuns has fields runName, startVideo, startTime, stopVideo, stopTime) // Import video files listed in dataRuns var vidFiles = new Array; for (i=0; i&lt;dataRuns.length; i++) { if (indexOf.call(vidFiles,myDir + dataRuns[i].startVideo + '.MPG') == -1) { vidFiles.push(myDir + dataRuns[i].startVideo + '.MPG'); } if (indexOf.call(vidFiles,myDir + dataRuns[i].stopVideo + '.MPG') == -1) { vidFiles.push(myDir + dataRuns[i].stopVideo + '.MPG'); } app.project.createNewSequence(dataRuns[i].runName,''); } app.project.importFiles(vidFiles); // at this point, for each run (called runName) I need to: // - take a clip of the startVideo from the startTime to the end of the video // - take a clip of the stopVideo from the start of the video to the stopTime // - put clip 1 at the beginning of the associated sequence, &amp; clip 2 right after // - export the sequence as a new video file </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload