Copy link to clipboard
Copied
I have a directory with 281 MXF files in it, not all of which are the same duration. Is it possible to somehow create a text file that is essentially a table of the metadata of these files using Premiere Pro, or by scripting in Premiere? Essentially, I'm wanting some way to obtain the information displayed in list view:
in a parsable, plain-text format. I am primarily interested in obtaining the "Meda Duration" column (with the associated filepath as the key), but it would be nice if I could get the other metadata as well.
Is this possible with a Premiere Pro script, or within Premiere directly? If so, can you give an example of how to do it? Thanks!
Copy link to clipboard
Copied
Yes, using the XMP External Object, more details in the PPRO Sample Panel. Here's an example of how I get projectItem duration in one of my extensions:
function getPrMetadata(projectItem, fieldNames) {
var kPProPrivateProjectMetadataURI = "http://ns.adobe.com/premierePrivateProjectMetaData/1.0/";
if (app.isDocumentOpen()) {
if (projectItem) {
if (ExternalObject.AdobeXMPScript === undefined)
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
if (ExternalObject.AdobeXMPScript !== undefined) {
var retArray = []
var retArray2 = []
var projectMetadata = projectItem.getProjectMetadata();
var xmp = new XMPMeta(projectMetadata);
for (var pc = 0; pc < fieldNames.length; pc++) {
if (xmp.doesPropertyExist(kPProPrivateProjectMetadataURI, fieldNames[pc])) {
retArray.push([fieldNames[pc], xmp.getProperty(kPProPrivateProjectMetadataURI, fieldNames[pc])])
retArray2.push([xmp.getProperty(kPProPrivateProjectMetadataURI, fieldNames[pc])])
}
}
return (retArray2);
}
}
}
return (false);
}
// usage
getPrMetadata(thisItem, ["Column.Intrinsic.MediaDuration"])
Copy link to clipboard
Copied
Thank you, this is helpful. However, what exactly is the "kPProPrivateProjectMetadataURI" variable? It seems like it's a link to something. When I attempt to put that link in my web browser, it just gives me a "this site cannot be reached" error.
Copy link to clipboard
Copied
It’s just the unique XML Namespace uri for Adobe’s XMP metadata, not a functioning website.
Copy link to clipboard
Copied
In Avid you can export an ALE file from a bin, not sure if similar exists in PP