• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Master List of Functions / Hierarchy

Community Expert ,
Jan 19, 2017 Jan 19, 2017

Copy link to clipboard

Copied

I've done some coding in the past, but I'm new to Premiere Pro panels. Wondering if there is some sort of master document or XSD that lists all the functions and hierarchies so I know where to find objects and operations.  Extend script doesn't seem to suggest very much.

Thanks,

Justin

TOPICS
SDK

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 20, 2017 Jan 20, 2017

There is no master document. The best place to see/learn the available ExtendScript API is in the ExtendScript Toolkit data browser.

PProPanel contains vestigial documentation of the available functions, and (better!) demonstrates usage of nearly all of them.

Votes

Translate

Translate
Adobe Employee ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

There is no master document. The best place to see/learn the available ExtendScript API is in the ExtendScript Toolkit data browser.

PProPanel contains vestigial documentation of the available functions, and (better!) demonstrates usage of nearly all of them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

Thanks, the Data Browser is exactly what I'm looking for. More specifically, I was trying to customize the "Render Active Sequence in AME" function into a new function I'm making, however I keep getting the error message "Could not find output preset." I tried adding the output .EPR preset to the code, but think I'm putting it in the wrong place. If you have any ideas, I'd really appreciate it.

Thanks!

-------------Function Listed Below (Bolded the line in question)------------------

    renderWP : function(outputPresetPath) {

app.enableQE();

var activeSequence = qe.project.getActiveSequence();  // we use a QE DOM function, to determine the output extension.

if (activeSequence) {

app.encoder.launchEncoder(); // This can take a while; let's get the ball rolling.

/*var timeSecs = activeSequence.CTI.secs; // Just for reference, here's how to access the CTI

var timeFrames = activeSequence.CTI.frames; // position, for the active sequence.

var timeTicks = activeSequence.CTI.ticks;

var timeString = activeSequence.CTI.timecode;

var seqInPoint = app.project.activeSequence.getInPoint(); // new in 9.0

var seqOutPoint = app.project.activeSequence.getOutPoint(); // new in 9.0*/

var projPath   = new File(app.project.path);

var outputPath  = Folder("E:\Wheel Pros\Wheel Videos\09 Exports");

if ((outputPath) && projPath.exists){

var outPreset  = new File("C:\Users\Justin\Documents\Adobe\Adobe Media Encoder\11.0\Presets\WP1080ytHDmrq.epr");

                    if (outPreset.exists === true){

var outputFormatExtension   = activeSequence.getExportFileExtension(outPreset.fsName);

if (outputFormatExtension){

var outputFilename = activeSequence.name + '.' + outputFormatExtension;

var fullPathToFile = outputPath.fsName +

$._PPP_.getSep() +

activeSequence.name +

"." +

outputFormatExtension;

var outFileTest = new File(fullPathToFile);

if (outFileTest.exists){

var destroyExisting = confirm("A file with that name already exists; overwrite?", false, "Are you sure...?");

if (destroyExisting){

outFileTest.remove();

outFileTest.close();

}

}

app.encoder.bind('onEncoderJobComplete', $._PPP_.onEncoderJobComplete);

app.encoder.bind('onEncoderJobError', $._PPP_.onEncoderJobError);

app.encoder.bind('onEncoderJobProgress', $._PPP_.onEncoderJobProgress);

app.encoder.bind('onEncoderJobQueued', $._PPP_.onEncoderJobQueued);

// use these 0 or 1 settings to disable some/all metadata creation.

app.encoder.setSidecarXMPEnabled(0);

app.encoder.setEmbeddedXMPEnabled(0);

            // For reference, here's how to export from within PPro (blocking further user interaction).

         

            // activeSequence.exportAsMediaDirect(fullPathToFile,  outPreset.fsName, app.encoder.ENCODE_WORKAREA);

var jobID = app.encoder.encodeSequence( app.project.activeSequence,

fullPathToFile,

outPreset.fsName,

app.encoder.ENCODE_WORKAREA,

1);    // Remove from queue upon successful completion?              

$._PPP_.message('jobID = ' + jobID);

outPreset.close();

}

} else {

alert("Could not find output preset.");

}

} else {

alert("Could not find/create output path.");

}

projPath.close();

} else {

alert("No active sequence.");

}

},

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

First, in your output preset path, you'll need to escape those backslashes ('\\', not '\'):

new File("C:\\Users\\Justin\\Documents\\Adobe\\Adobe Media Encoder\\11.0\\Presets\\WP1080ytHDmrq.epr");

Second, you're running into an error I recently introduced into PProPanel; namely, not passing the output preset path INTO the render function.

Fix, by replacing the 'guts' of the render() function with the following:

var filterString = "";

  if (Folder.fs == 'Windows'){

  filterString = "EPR files:*.epr";

  }

  var outputPresetPath = File.openDialog ( "Choose output preset", // title

  filterString, // filter available files?

  false); // allow multiple?

        app.enableQE();

  var activeSequence = qe.project.getActiveSequence(); // we use a QE DOM function, to determine the output extension.

  if (activeSequence) {

  app.encoder.launchEncoder(); // This can take a while; let's get the ball rolling.

  var timeSecs = activeSequence.CTI.secs; // Just for reference, here's how to access the CTI

  var timeFrames = activeSequence.CTI.frames; // (Current Time Indicator), for the active sequence.

  var timeTicks = activeSequence.CTI.ticks;

  var timeString = activeSequence.CTI.timecode;

  var seqInPoint = app.project.activeSequence.getInPoint(); // new in 9.0

  var seqOutPoint = app.project.activeSequence.getOutPoint(); // new in 9.0

  var projPath   = new File(app.project.path);

  var outputPath  = Folder.selectDialog("Choose the output directory");

  if ((outputPath) && projPath.exists){

  var outPreset = new File(outputPresetPath);

  if (outPreset.exists === true){

  var outputFormatExtension = activeSequence.getExportFileExtension(outPreset.fsName);

  if (outputFormatExtension){

  var outputFilename = activeSequence.name + '.' + outputFormatExtension;

  var fullPathToFile = outputPath.fsName +

  $._PPP_.getSep() +

  activeSequence.name +

  "." +

  outputFormatExtension;

  var outFileTest = new File(fullPathToFile);

  if (outFileTest.exists){

  var destroyExisting = confirm("A file with that name already exists; overwrite?", false, "Are you sure...?");

  if (destroyExisting){

  outFileTest.remove();

  outFileTest.close();

  }

  }

  app.encoder.bind('onEncoderJobComplete', $._PPP_.onEncoderJobComplete);

  app.encoder.bind('onEncoderJobError', $._PPP_.onEncoderJobError);

  app.encoder.bind('onEncoderJobProgress', $._PPP_.onEncoderJobProgress);

  app.encoder.bind('onEncoderJobQueued', $._PPP_.onEncoderJobQueued);

  // use these 0 or 1 settings to disable some/all metadata creation.

  app.encoder.setSidecarXMPEnabled(0);

  app.encoder.setEmbeddedXMPEnabled(0);

  /*

  For reference, here's how to export from within PPro (blocking further user interaction).

    

     activeSequence.exportAsMediaDirect( fullPathToFile, 

    outPreset.fsName,

    app.encoder.ENCODE_WORKAREA);

  Bonus: Here's how to compute a sequence's duration, in ticks. 254016000000 ticks/second.

  var duration = app.project.activeSequence.end - app.project.activeSequence.zeroPoint;

  */

  var jobID = app.encoder.encodeSequence( app.project.activeSequence,

  fullPathToFile,

  outPreset.fsName,

  app.encoder.ENCODE_WORKAREA,

  1);   // Remove from queue upon successful completion?

  $._PPP_.message('jobID = ' + jobID);

  outPreset.close();

  }

  } else {

  alert("Could not find output preset.");

  }

  } else {

  alert("Could not find/create output path.");

  }

  projPath.close();

  } else {

  alert("No active sequence.");

  }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

Just a thank you for  your good work. Not sure where else to post it. I love the frank, to the point, responses I've seen from you and Zack over the years. "The problem I introduced..." lol.

Just always very helpful to users.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

Thanks very much, Stanley—your post brightened an otherwise dreary afternoon.

Zac and I have been supporting Adobe's video partners for a while now (between us, 38 years—yikes!). We very much appreciate and enjoy the sense of community we've been lucky enough to encounter (and on good days, engender). I find working together with partners and customers to solve issues, build workflows and enable creative work that wasn't before possible, deeply rewarding.

Many partners build their livelihoods around our products; THANK YOU PARTNERS! Trust is critical to such relationships, and honest conversations (even about embarrassing 'rookie move' bugs like the one I recently introduced, above...<sigh>) help build that trust.

Happy Friday, everyone!

-bbb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

LATEST

Thanks Bruce, the forward slashes were my issue! Works great now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines