How can I add files imported into sequences using ExtendScript connection of Premiere Pro?

I really want to know the answer to this... I'm trying to create a script (in ExtendScript for Premiere Pro) that will load into the specified video files, attach them to the specified start and stop time, place it in a sequence and then export the resulting film.

I understand that Adobe has no official documentation on the scripts for Premiere Pro, so I worked from the data (in the ExtendScript Toolkit or ESTK) browser and a collection of handy references I found to links like this:

http://WEBCACHE.googleusercontent.com/search?q=cache:http://cssdk.adobesites.com/SDK/2.1/d ocs/WebHelp/references/csawlib/com/adobe/premiere/App.html

(You can replace the 'App' with other class names, but they must always be properly capitalized, as a 'Project' or 'TrackCollection'. Pages list properties and methods to the classes, and are the only place where I was able to find what kind of parameters/arguments methods expect.)

I loaded correctly in the CSV file that specifies the information required. I also know how to import video files and create a new sequence (as explained here: http://forums.adobe.com/thread/1177191). The pain that I am experiencing now is to get the imported files properly cut and placed in the sequence. (I see that the activeSequence has methods like setInPoint and setOutPoint, but that doesn't seem to translate into the correct trimming to export).

Here is my code (with comments to show the flow of the global script):

#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<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, & clip 2 right after // - export the sequence as a new video file

The example PProPanel shows how to import files and make the sequences. The missing part (from above) = there is no supported method for adding clips to sequences.

Tim, if you would, please write to me at my day job [b b b at adobe dot com] an overview of the workflow (s) you wish to support, and I can better frame.

Tags: Premiere

Similar Questions

Maybe you are looking for